Get async image task
Look up an async image task by its id. status is one of:
- queued: waiting to be processed
- processing: the worker is calling upstream
- succeeded: complete;
resultcontains the image response, and images also appear in the gallery. For decomposition,result.datapreserves the base image, transparent PNG layers, and placement and stacking metadata. - failed:
errordescribes the cause, and the frozen amount is released
Poll every 3–5 seconds. Decomposition charges for the base image and each successful output layer by its actual output resolution.
When archiving outputs, the platform may replace inline b64_json with url while preserving layer fields such as z_index, name, description, and bounding_box.
Seedream 5.0 Pro billing
Regular generation and layer decomposition are billed by actual output resolution. Each successful image is classified by its actual width × height: up to and including 2,610,000 pixels is the lower tier, and larger images use the higher tier.
The base image counts as one output. Charge the base image and each successful layer separately by its own actual pixel tier; one request can contain both tiers. n=1 means one decomposition request, not a one-image charge.
Only successful outputs are billed. Failed requests incur no charge and release the frozen amount.
Pro's first reference image is free; references from the second onward are billed as input images. Reference fees per request are max(reference count − 1, 0) × your effective input rate, charged once and not multiplied by the output count. Output images are billed separately. Decomposition requires exactly one reference, so no input-image charge applies.
Applicable account discounts affect both input and output rates. See the model pricing list on your current site for rates and applicable discounts.
Authorization
BearerAuth API key authentication (OpenAI format). Pass in the Authorization header:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
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",
"size": "1273x265",
"output_format": "string",
"z_index": 0,
"name": "string",
"description": "string",
"bounding_box": {
"absolute": [
383,
120,
1655,
384
],
"normalized": [
187,
59,
808,
188
]
}
}
],
"usage": {
"input_images": 0,
"generated_images": 0,
"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"
}