XRToken API Docs

Get async image task

API Configuration
After saving, the Try It panel below sends real requests with this key.
Base: api.xrtoken.ai

Look up an async image task by id. status is one of:

  • queued: pending
  • processing: worker is calling upstream
  • succeeded: complete; result carries the OpenAI-shape {data:[{url}]} response and the image is also in the gallery
  • failed: error describes the cause; the freeze is automatically released

Recommended polling interval: 3-5 seconds.

GET
/v1/images/async/{taskId}

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication (OpenAI format). Pass in the Authorization header:

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

taskId*string

Task ID (the id returned by POST /v1/images/async)

Response Body

application/json

application/json

application/json

application/json

curl -X get "https://api.xrtoken.ai/v1/images/async/string"
{
  "id": "string",
  "status": "queued",
  "model": "string",
  "created_at": 0,
  "error": "string",
  "result": {
    "created": 0,
    "data": [
      {
        "url": "http://example.com",
        "b64_json": "string"
      }
    ],
    "usage": {
      "input_tokens": 0,
      "output_tokens": 0,
      "total_tokens": 0
    }
  }
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "rate limit exceeded",
  "type": "rate_limit_error"
}