# Retrieve task

Retrieve bytedance/seedream-5.5 task status, generated image URLs, layer metadata, rich-text OCR results, and settled cost via /v1/tasks/{id}.

Retrieve status and outputs for a `bytedance/seedream-5.5` task by ID. Always returns HTTP `200` regardless of completion state; inspect `status` to track progress.

`GET https://gateway.amux.ai/v1/tasks/{id}`

**Authorization**

`Authorization: Bearer <API key>`

**Response**

| Status | Description |
|---|---|
| `200` | Current task state; includes `output` when `status` is `succeeded`. |
| `404` | Task not found, or does not belong to the current workspace. |

**Example request**

```bash
curl https://gateway.amux.ai/v1/tasks/{id} \
  -H "Authorization: Bearer $AMUX_API_KEY"
```

**Example response**

```json
{
  "id": "task_01M5CWPZEAJ6FRGPDM1G7G1V29",
  "status": "queued",
  "model": "bytedance/seedream-5.5",
  "created_at": "2026-11-25T09:00:00Z",
  "output": {
    "images": [
      {
        "index": 0,
        "url": "https://cdn.amux.ai/gen/20261125/task_01M5CWPZEAJ6FRGPDM1G7G1V29-0.png",
        "layer": {
          "zIndex": 0,
          "role": "background",
          "bboxAbsolute": [
            0
          ],
          "bboxNormalized": [
            0
          ],
          "name": "<string>",
          "description": "<string>",
          "textRecognition": {
            "text": "<string>",
            "lines": [
              {
                "bboxAbsolute": [
                  0
                ],
                "bboxNormalized": [
                  0
                ],
                "runs": [
                  {
                    "text": "<string>",
                    "style": {
                      "similarFontFamily": "<string>",
                      "foregroundColor": "<string>",
                      "bold": false,
                      "italic": false,
                      "underline": false,
                      "strikethrough": false,
                      "shadow": false,
                      "translucent": false
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    ],
    "videos": [
      {}
    ]
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "cost": "0.035",
  "notes": [
    "dropped seed: this model has no seed parameter"
  ],
  "error": {
    "message": "<string>",
    "code": "<string>"
  }
}
```

## Polling cadence

Text-to-image and image-to-image tasks typically complete in 15–60 seconds, while layer decomposition and rich-text OCR take 60–150 seconds. Start polling 10 seconds after submission at 5–10 second intervals, or pass `Prefer: wait=60` when submitting to wait inline.

## Outputs, layer metadata, and rich-text OCR structure

Generated images reside under `output.images`; `output.videos` is always `[]` and must not be used to infer task modality.

When layer decomposition is enabled, the first item in `output.images` is the base image followed by one item per extracted transparent PNG layer, each carrying a camelCase `layer` metadata object (equivalent to `z_index`, `bounding_box`, and `text_recognition` on the native Volcengine Ark endpoint, with `bboxNormalized` expressed as integers from 0 to 1000):

```json
{
  "output": {
    "images": [
      { "index": 0, "url": "https://…/task_x-0.png", "layer": { "zIndex": 0, "role": "background" } },
      {
        "index": 1,
        "url": "https://…/task_x-1.png",
        "layer": {
          "zIndex": 1,
          "role": "layer",
          "bboxAbsolute": [0, 0, 836, 336],
          "bboxNormalized": [0, 0, 1000, 268],
          "name": "Headline text",
          "description": "Large white promotional headline text",
          "textRecognition": {
            "text": "SUMMER",
            "lines": [
              {
                "bboxAbsolute": [0, 0, 836, 336],
                "bboxNormalized": [0, 0, 1000, 268],
                "runs": [
                  {
                    "text": "SUMMER",
                    "style": {
                      "similarFontFamily": "TikTok Sans",
                      "foregroundColor": "#FFFFFF",
                      "bold": true,
                      "italic": false,
                      "shadow": true
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    ],
    "videos": []
  }
}
```

Image file URLs in `url` expire periodically; download files promptly for long-term storage.

## Usage and cost

Billed per image; all three token fields in `usage` are `0`. Check `cost` for the settled USD charge (including the base image, all extracted layers, and input reference images in decomposition mode).

## Errors

Error responses follow the OpenAI error schema. See [Errors and retries](/api-reference/errors) for `type` values and retry semantics.
