Skip to content
API Reference

Generation result

GET /v1/requests/{request_id} — fetch the result.

Fetch the finished generation result with media links.

Playground

GET
/v1/requests/{request_id}
Authorization<token>

API-ключ в заголовке Authorization со схемой Bearer:

Authorization: Bearer clipia_live_xxxxxxxxxxxxxxxxxxxxxx

Передавайте полную строку, включая префикс схемы Bearer и пробел. Также принимаются Authorization: Key <ключ> и заголовок X-Api-Key: <ключ> — выбирайте удобную схему. Ключ создаётся в личном кабинете (Настройки → API-ключи) и показывается один раз. Формат: clipia_live_… (боевой), clipia_test_… (песочница).

Sandbox / тестовый режим. Ключ с префиксом clipia_test_… работает в песочнице: submit не списывает кредиты и не запускает реальную генерацию — он мгновенно возвращает status: COMPLETED с детерминированным mock-результатом (фиксированный sample-ассет на media.clipia.ai). Поле cost показывает расчётную стоимость, но она не списывается. Вебхуки приходят тем же подписанным механизмом (HMAC-SHA256). Режим предназначен для отладки интеграции до подключения боевого ключа.

In: header

Path Parameters

request_idstringrequired

Идентификатор запроса генерации, полученный при submit.

Formatuuid

Response Body

curl -X GET "https://api.clipia.ai/v1/requests/764cabcf-b745-4b3e-ae38-1200304cf45b"

{
  "request_id": "764cabcf-b745-4b3e-ae38-1200304cf45b",
  "status": "COMPLETED",
  "model": "nano-banana-2",
  "output": {
    "images": [
      {
        "url": "https://media.clipia.ai/works/8f3a1c7e.png",
        "width": 1024,
        "height": 1024
      }
    ]
  },
  "cost": 12,
  "created_at": "2026-06-01T12:00:00Z",
  "completed_at": "2026-06-01T12:00:18Z"
}

{
  "request_id": "764cabcf-b745-4b3e-ae38-1200304cf45b",
  "status": "IN_PROGRESS",
  "queue_position": null,
  "progress": 70,
  "logs": []
}

{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_api_key",
    "message": "API-ключ отсутствует, неверный или отозван."
  }
}

{
  "error": {
    "type": "invalid_request_error",
    "code": "not_found",
    "message": "Запрос с таким идентификатором не найден."
  }
}

{
  "error": {
    "type": "invalid_request_error",
    "code": "rate_limit_exceeded",
    "message": "Превышен лимит запросов. Повторите позже."
  }
}

GET /v1/requests/:id returns the generation result with an output field (code 200) once the status is terminal (COMPLETED / FAILED / CANCELED), or 202 while the request is still queued or running. All media URLs point to the media.clipia.ai CDN.

GET/v1/requests/:id

Request

Prop

Type

curl https://api.clipia.ai/v1/requests/764cabcf-b745-4b3e-ae38-1200304cf45b \
  -H "Authorization: Bearer $CLIPIA_KEY"
const result = await clipia.queue.result('764cabcf-b745-4b3e-ae38-1200304cf45b');

// While still running, the API returns 202 → result.pending === true.
if (result.pending) {
  console.log('still running:', result.status);
} else {
  console.log(result.output?.images?.[0]?.url);
}
result = client.result("764cabcf-b745-4b3e-ae38-1200304cf45b")

# While still running, the API returns 202 → result.pending == True.
if result.pending:
    print("still running:", result.status)
else:
    print(result.output["images"][0]["url"])

Image result

{
  "request_id": "764cabcf-b745-4b3e-ae38-1200304cf45b",
  "status": "COMPLETED",
  "model": "nano-banana-2",
  "output": {
    "images": [
      { "url": "https://media.clipia.ai/works/8f3a1c7e.png", "width": 1024, "height": 1024 }
    ]
  },
  "cost": 12,
  "created_at": "2026-06-01T12:00:00Z",
  "completed_at": "2026-06-01T12:00:18Z"
}

For images, output.images is an array of objects with url, width, and height. Each item holds a link to the finished frame; when the model returns a full-quality original, it is available in original_url.

Video result

{
  "request_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "status": "COMPLETED",
  "model": "seedance-2-fast-i2v",
  "output": {
    "video": {
      "url": "https://media.clipia.ai/works/a1b2c3d4.mp4",
      "width": 1280,
      "height": 720,
      "duration": 4
    }
  },
  "cost": 40,
  "created_at": "2026-06-01T12:00:00Z",
  "completed_at": "2026-06-01T12:00:42Z"
}

For video, output.video is an object with url, width, height, and duration.

Response fields

Prop

Type

Response codes

HTTPWhenBody
200COMPLETEDresult with output
200FAILED{ request_id, status: "FAILED", error: { code, message }, cost: 0, ... }
200CANCELEDterminal response with status CANCELED
202IN_QUEUE / IN_PROGRESScurrent status — keep polling
404unknown request_iderror envelope

202 is expected

A 202 arrives only for non-terminal statuses: the job is still running. The terminal FAILED and CANCELED are final responses and arrive with code 200. On FAILED, credits are fully refunded and error is sanitized.