# Thăm dò trạng thái tác vụ tạo video

**API:** Model API

**Endpoint:** `GET /api/v1/videos/generations/{task_id}`

Trả về trạng thái hiện tại của tác vụ. Khi trạng thái là succeeded, outputs chứa các URL phương tiện đã ký (https://openapi.felo.ai/api/v1/media/{file_id}?exp=...&sig=...) có thể tải xuống ẩn danh. Thăm dò cách nhau 5-10 giây; bản thân tác vụ vẫn tiếp tục chạy nền.

## Base URL

- `https://openapi.felo.ai` — Môi trường production

## Authentication

- `FeloBearerAuth` (http bearer) — Khóa API Felo được gửi dưới dạng `Authorization: Bearer <key>`.
- `FeloApiKey` (apiKey in header `X-API-Key`) — Khóa API Felo được gửi dưới dạng `X-API-Key: <key>`.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `task_id` | path | yes | string | ID tác vụ do POST /api/v1/videos/generations trả về. |

## Responses

### 200 — Trạng thái hiện tại của tác vụ

**application/json**

Schema: `VideoGenerationTask` (`#/components/schemas/VideoGenerationTask`)

### 401 — Khóa API Felo không hợp lệ hoặc bị thiếu

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

### 404 — Không tìm thấy tác vụ cho tài khoản này

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

### 503 — Dịch vụ tạo nội dung tạm thời không khả dụng

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

## Schema definitions

### GenerationError

`#/components/schemas/GenerationError`

```json
{
  "type": "object",
  "description": "Phong bì lỗi tương thích OpenAI.",
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "message",
        "type"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "invalid_request_error",
            "server_error"
          ]
        },
        "param": {
          "type": "string",
          "nullable": true
        },
        "code": {
          "type": "string"
        }
      }
    }
  }
}
```

### VideoGenerationTask

`#/components/schemas/VideoGenerationTask`

```json
{
  "type": "object",
  "required": [
    "task_id",
    "status",
    "kind",
    "outputs"
  ],
  "properties": {
    "task_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "interrupted"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "video"
      ]
    },
    "outputs": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "description": "URL phương tiện đã ký (tải xuống ẩn danh) khi thành công; ngược lại là []."
      }
    },
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": "string",
          "description": "Stable failure code, e.g. file_not_found."
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "description": "Có mặt khi tác vụ thất bại."
    }
  }
}
```
