Skip to Content
Cheapest Imagen
API reference

Get several tasks

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.

GET
/images/tasks

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.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, sent as Authorization: Bearer <key>.

Query Parameters

ids*string

The task ids, separated by commas, at most 100. Repeating the parameter (ids=a&ids=b) works too.

Response Body

The tasks that were found, and the ids that were not.

application/json
  1. response
object*"list"
Value in"list"
data*array<>

The tasks, in the order of ids.

not_found*array<string>

The ids that are not tasks of this account or are no longer kept.

Example Request
curl -X GET 'https://api.cheapestimagen.com/v1/images/tasks?ids=req_33ac10d3e9a8e6f120f4c0d3%2Creq_26e50328772b7d62f59d355a'
Example Response
{  "object": "list",  "data": [    {      "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"      }    }  ],  "not_found": [    "string"  ]}