Cut out 25 product photos from an agent: rmbg_create and jobs_wait
An MCP agent submits 25 rmbg_create calls, waits with jobs_wait in two slices (20 ids, then 5), and pays 25 x $0.0225 = $0.5625. Idempotency keys inside.

An agent on Sume's hosted MCP server can cut out 25 product photos by calling rmbg_create 25 times and then jobs_wait twice, because a batch wait takes 1 to 20 job ids. That is one wait for 20 jobs and one for 5. The cost is 25 x $0.0225 = $0.5625.
The call sequence
rmbg_create is a paid tool, so every call must carry an idempotency_key. Make the key from the file name, for example cutout-sofa-0007. A retry with the same key and payload returns the same job instead of billing a second one.
jobs_wait with job_ids waits on up to 20 ids and returns a job_wait_batch. wait_for: "all" is the default. Each wait holds for at most 55 seconds, 50 by default, and the response tells you if the slice expired. On wait_slice_expired, call it again with the same ids and never submit the paid create again. Then read the results with jobs_result and the same list of ids.
| Step | Calls | Cost |
|---|---|---|
| rmbg_create, one per photo | 25 | 25 x $0.0225 = $0.5625 |
| jobs_wait, ids 1 to 20 | 1 or more slices | free |
| jobs_wait, ids 21 to 25 | 1 or more slices | free |
| jobs_result, batch read | 2 | free |
What to tell the agent
Be explicit in the prompt. Give the list of image URLs, say that each is a public HTTPS address, name the idempotency key pattern, and say that failed jobs are to be reported and not re-created without the first job's error. A good instruction also says what to do on a slice timeout: wait again, do not resubmit.
Hosted MCP cannot read files from your laptop. If the photos are local, upload them through the assets tools first (create an upload URL, put the bytes, complete it), or use URLs that already exist. The Higgsfield-style remove_background name is not a Sume tool. The Sume tool is rmbg_create.
Adding the upscale
For the 3 hero photos, a follow-up call to image_upscale_create costs 3 x $0.20 = $0.60. Together with the cutouts, the session total is $1.1625.
If a photo already has transparency, Sume flattens it onto gray first and the result is still one billed removal. Ask the agent to name which of the 25 had alpha, since it changes the edge you should expect.
A prompt that works
The shape of a good instruction for the agent is short and specific. Name the tool, the count, the key pattern and the stop rules.
"Call rmbg_create once for each of these 25 image URLs. Use idempotency_key cutout-<file name>. Then call jobs_wait on the first 20 job ids and again on the last 5. If a wait slice expires, call it again with the same ids. Do not call rmbg_create again for any file. Read all results with jobs_result and give me a table of file name, job id and PNG URL."
Agents tend to retry on their own when a call is slow. The explicit rule not to create again protects the $0.5625 from becoming $1.125.
Sources
Related posts
More in Integrations
- Haiku 5.5 in Cursor with Sume MCP: a 150k request costs 8x a 90k one
Cursor adds Claude Haiku 5.5 from Settings > Models. Its price steps up above 100k input tokens: 90k costs $0.009 and 150k costs $0.075 before output.
- Claude Code plugin userConfig: prompt for the Sume API key once
A plugin can ask for a sensitive value and reuse it as ${user_config.KEY} in an MCP header. A Sume plugin manifest that keeps the key out of settings.json.
- Codex account-scoped MCP grant cleanup and Sume's 1-hour token
Codex 0.161.0 adds account-scoped grant cleanup for enterprise MCP authentication. How that sits with Sume's one-hour OAuth token and its revoke endpoint.
- Codex 0.161: denied reads stay denied, so a Sume upload may fail
Codex 0.161.0 lets approved filesystem escalation widen writes while keeping denied reads. Why a local file upload to Sume can still fail, and how to fix it.
Written by Sume