# 영상 생성 작업 폴링

**API:** Model API

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

현재 작업 상태를 반환합니다. status가 succeeded이면 outputs에 익명으로 다운로드할 수 있는 서명된 미디어 URL(https://openapi.felo.ai/api/v1/media/{file_id}?exp=...&sig=...)이 포함됩니다. 5-10초 간격으로 폴링하세요. 작업 자체는 백그라운드에서 계속 진행됩니다.

## Base URL

- `https://openapi.felo.ai` — 프로덕션

## Authentication

- `FeloBearerAuth` (http bearer) — Felo API 키를 `Authorization: Bearer <key>` 형식으로 전송합니다.
- `FeloApiKey` (apiKey in header `X-API-Key`) — Felo API 키를 `X-API-Key: <key>` 형식으로 전송합니다.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `task_id` | path | yes | string | POST /api/v1/videos/generations에서 반환된 작업 ID입니다. |

## Responses

### 200 — 현재 작업 상태

**application/json**

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

### 401 — Felo API 키가 유효하지 않거나 누락되었습니다

**application/json**

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

### 404 — 이 계정에서 작업을 찾을 수 없습니다

**application/json**

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

### 503 — 생성 서비스를 일시적으로 사용할 수 없습니다

**application/json**

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

## Schema definitions

### GenerationError

`#/components/schemas/GenerationError`

```json
{
  "type": "object",
  "description": "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(익명 다운로드)이며, 그렇지 않으면 []입니다."
      }
    },
    "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": "작업이 실패했을 때 존재합니다."
    }
  }
}
```
