Own agent loop vs one Sume Agent Completion request
POST /v1/agent/completions runs the Sume Agent with tools and media generation in one async call: required spend cap, 30 images, a schema and a receipt.

An Agent Completion lets your backend start the Sume Agent with a single POST /v1/agent/completions, instead of running your own tool-calling loop against the generation APIs. It returns a 202 and an agent.run receipt you poll, and generation_spend_cap_usd is required with no default (Agent Completions).
What it covers
| Piece of a hand-built loop | Agent Completion |
|---|---|
| Choosing and calling generation tools | Same runtime as the Agents chat UI: sandbox, tools, MCP bridge, media generation |
| Your own prompt assembly | instruction, or messages of system and user turns joined into one prompt |
| Spend ceiling | Required generation_spend_cap_usd |
| Typed result | output_schema binds output to your JSON Schema |
| Images for the model to see | Up to 30 in attachments or input_image parts |
A request
Send exactly one of instruction or messages. Assistant turns are rejected; each completion runs in a new thread.
curl -sS -X POST "https://api.sume.com/v1/agent/completions" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ac-001" \
-d '{
"instruction": "Write one caption for the attached product shot.",
"attachments": [{"type":"input_image","image_url":"https://cdn.example.com/shot.jpg"}],
"generation_spend_cap_usd": 2
}'What it does not do
There is no streaming and no synchronous OpenAI-style choices[] response. Non-image attachments, continuing a prior thread with thread_id and team-owned threads are listed as not available yet.
Choosing among three surfaces
A Format stores how to do a job and takes inputs per call. A schedule stores what to do on a cadence. A completion stores nothing and fits a task that changes on each call. All three run the same agent and return the same receipt shape.
Polling the receipt
Poll GET /v1/agent-runs/{id} (or the receipt's status_url) until next_action is no longer poll_status. Statuses are queued, processing, completed, failed and canceled. A completed run fills output, with the last text in output.text and generated media in output.images, output.videos, output.audio and output.files. POST /v1/agent-runs/{id}/cancel stops a run in progress.
Keys created before Agent Completions shipped lack the agent_completions:* scopes and get 403 insufficient_scope; create a new key. Service-account keys cannot create completions.
Sources
Related posts
More in Comparisons
- Perfume ad shot at 1080p: H3 Max $2.00 vs Kling 3 $1.40 for 10 s
A 10-second 1080p product shot is $2.00 on MiniMax H3 Max and $1.40 on Kling 3 silent, $2.10 with sound. What the extra reference inputs on H3 Max buy.
- Qwen Image Max or Ideogram 4.5: 100 images, price and limits
100 images cost $9.375 on Qwen Image Max and $3.75, $7.50 or $27.50 on Ideogram 4.5 by quality. Ratios, references and output formats side by side on Sume.
- Recraft V4 or ChatGPT Image 2.5 for marketing graphics on Sume
Recraft V4 bills $0.05, text-only, webp only. ChatGPT Image 2.5 bills by tokens, makes transparent PNGs and takes a mask. Which row for which job.
- SCORM export for AI avatar video: HeyGen, Colossyan, and Sume
HeyGen Business and Colossyan Professional list SCORM export. Plan prices, export limits and quizzes, and what Sume returns instead: a plain MP4 with no SCORM.
Written by Sume