# 下载生成的媒体文件（匿名）

**API:** Model API

**Endpoint:** `GET /api/v1/media/{file_id}`

以流式传输生成的视频（或图像）文件。此端点支持匿名访问：URL 中的 HMAC 签名即认证凭据。请始终使用任务 outputs 数组中返回的完整 URL；不要自行构造 exp/sig。支持 Range 请求以便断点续传。签名或上游 TTL 过期后，媒体会被移除或失效。

## Base URL

- `https://openapi.felo.ai` — 生产环境

## Authentication

No authentication required — this endpoint is anonymous.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `file_id` | path | yes | string, (uuid) | 任务输出 URL 中的带签名文件 ID。 |
| `exp` | query | yes | integer, (int64) | 签名过期时间（Unix 秒），来自输出 URL。 |
| `sig` | query | yes | string | HMAC 签名，来自输出 URL。 |

## Responses

### 200 — 媒体文件

**application/octet-stream**

Schema: string, (binary)

```json
{
  "type": "string",
  "format": "binary"
}
```

**video/mp4**

Schema: string, (binary)

```json
{
  "type": "string",
  "format": "binary"
}
```

### 400 — 请求无效（例如不允许任意 ?url= 参数）

**application/json**

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

### 403 — 签名无效或已过期

**application/json**

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

### 404 — 未知媒体文件

**application/json**

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

### 410 — 媒体已过期，或上游已不再提供

**application/json**

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

### 429 — 此文件的请求频率受限

**application/json**

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

### 502 — 上游媒体获取失败

**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"
        }
      }
    }
  }
}
```
