Get task
Gets the state of one asynchronous request by its task id: `in_progress`, then `succeeded` with the images or `failed` with the error. A task can be read for as long as its images are kept, 72 hours. Poll every few seconds; reading a task does not count as a request in progress. To wait for several tasks, use `GET /images/tasks?ids=` and read them in one call.
Gets the state of one asynchronous request by its task id: in_progress, then succeeded with the images or failed with the error. A task can be read for as long as its images are kept, 72 hours. Poll every few seconds; reading a task does not count as a request in progress. To wait for several tasks, use GET /images/tasks?ids= and read them in one call.
apiKeyAuthorizationBearer <token>Your API key, sent as Authorization: Bearer <key>.
id*stringThe task id: the id of the 202 answer, which is also its x-request-id.
^req_[0-9a-f]{24}$The task.
application/json- response
id*stringThe task id: the id of the 202 answer, which is also its x-request-id.
object*"image.task""image.task"status*stringin_progress until the request ends, then succeeded or failed.
"in_progress""succeeded""failed"created*integerWhen the request was accepted, as a Unix timestamp in seconds.
finished*|When it ended, or null while it is in progress.
model*stringresult?Present when succeeded: what the synchronous call would have returned.
error?Present when failed: the error the synchronous call would have returned. A failed task is not charged, except a refusal on the Nano Banana stable channels.
curl -X GET 'https://api.cheapestimagen.com/v1/images/tasks/string'{ "id": "string", "object": "image.task", "status": "in_progress", "created": 0, "finished": 0, "model": "string", "result": { "created": 0, "data": [ { "b64_json": "string", "url": "http://example.com" } ] }, "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Edit image POST
Creates images from a prompt and one or more reference images, sent as files in a multipart form or as links.
Get several tasks GET
Gets the state of up to 100 asynchronous requests in one call, so a page that sent 10 requests polls once for all 10. Use it instead of one request per task when you are waiting for several. Tasks come back in the order asked for; an id that is not a task of your account, or is no longer kept, is listed in `not_found` and does not fail the call.