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.

5 min readSume
All posts

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.

25 cutouts through hosted MCP, as of 2026-10-08
StepCallsCost
rmbg_create, one per photo2525 x $0.0225 = $0.5625
jobs_wait, ids 1 to 201 or more slicesfree
jobs_wait, ids 21 to 251 or more slicesfree
jobs_result, batch read2free

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

All Integrations posts

Written by Sume