check_image_job

Poll an async image job (edit_image).

readSellerSheet

Call every ~15–30s until status='done' or 'error'. The deliverable is cdn_url. For a multi-turn refine chain, read cdn_url from the done payload and pass it as the next edit_image's image_sources.

Call it

In an AI client (MCP)

tools/call
{
  "name": "check_image_job",
  "arguments": {
    "job_id": "<job_id>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/check_image_job \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_id":"<job_id>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
job_idrequiredstringid returned by edit_image.

Result

Every tool answers {notification, data, human_action}; data carries:

  • data.status — 'pending' | 'processing' | 'done' | 'error'.
  • data.progress — human-readable status string.
  • data.elapsed_s — seconds since the worker started (null before); use it to estimate the time left (elapsed 30 s on a typical 90 s job → ~60 s more).
  • data.queue_wait_s — seconds from submit to worker pickup.
  • data.cdn_url — the saved image — the input for the next refine turn. A job that names a store and SKU reads 'done' only once its image is saved, so cdn_url is set; if the save fails the job ends 'error', nothing is charged and no image is attached. A job without a store and SKU saves nothing: its image comes back as an inline image block and cdn_url stays null.
  • data.error — the error message when status is 'error'.
  • data.revised_prompt — how the model rewrote the prompt — mention it so the user can spot drift; relay data.background_note when set.
  • data.mask — 'mask' (a real mask was applied) | 'described' (the box was written into the instruction — check the edit stayed inside it) | null.

Gotchas

  • Poll every ~20 s for nanobanana jobs (~15–30 s total), every ~30 s for OpenAI jobs (~60–120 s). There is no client timeout: a long 'processing' (edit up to ~2 min, compose ~5 min) is normal — never resubmit it (that rebills and duplicates); only 'error' warrants a fresh edit_image. Status is dropped ~15 min after submit — read cdn_url before then.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude