Generation status and result

GET/v1/images/jobs/{job_id}

Poll the job a generation returned with 202: status, and the images once they are ready.

Request

job_idstringpathrequired
the id from the 202 reply (img_…)

Responses

completed

{
  "id": "img_9f2c1b7e…",
  "status": "completed",
  "cost_usd": "0.027",
  "data": [ { "b64_json": "iVBORw0KGgoAAAANSUhEUgAA…" } ]
}

processing

{ "id": "img_9f2c1b7e…", "status": "processing", "estimated_cost_usd": "0.027" }

failed

{ "id": "img_9f2c1b7e…", "status": "failed", "cost_usd": "0" }

archived

{
  "id": "img_9f2c1b7e…",
  "status": "completed",
  "cost_usd": "0.027",
  "data": [],
  "archived": true
}

no key in the request, or the key is not ours

no such job — or it is not yours

Details

Needs a key in Authorization: Bearer or x-api-key.

This is how a result is fetched after a 202. A job is visible only to the user who created it: someone else's real id answers exactly like a non-existent one — a leaked id must not even confirm that it is real.

The shape of the reply follows the status, and it is built around the money. completedcost_usd (what was charged) and data with the images. queued / processing / unknown_submitestimated_cost_usd, the size of the reserve that is still held. failedcost_usd: "0", because a failed generation is not billed and its reserve has already been released.

A result stays retrievable for 7 days. After that the bytes move out of the database into the archive, result_url is cleared, and the same GET /v1/images/jobs/{job_id} answers { "status": "completed", "archived": true, "data": [] }. That means expired, not "the generation produced nothing" — store the images on your side as soon as you get them. The job row and its money are never deleted: retention moves the payload only.

Code examples
curl https://api.teamtoken.store/v1/images/jobs/img_9f2c1b7e \
  -H "Authorization: Bearer sk-…"
Request
https://api.teamtoken.store/v1

The panel calls this domain; in your own code use the address above.

The key is never stored: it lives in this tab until you reload the page.

the id from the 202 reply (img_…)

This request really goes out, but the call itself costs nothing: reading a balance, a catalog or a job's status is not billed.

Response

Press “Send request” above and the answer shows up here.