> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omniall.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 文件上传 API

> 通过 multipart 上传文件，并复用返回的 CDN URL。

# 文件上传 API

| 说明 | 方法 | 路径 |
| - | - | - |
| 上传文件 | `POST` | `/v1/files` |

**API 主机：** `https://api.omniall.ai` · 鉴权 `Authorization: Bearer sk-...` · Content-Type `multipart/form-data`。

Body 字段：`file`（必需）。常见大小限制为 **10MB**（以站点配置为准）。

响应包含 `id`、`object`、`url`、`filename`、`bytes`、`created_at`。可将返回的 `url` 作为图像 / 视频 / 音频接口的参考资源。

```bash theme={null}
curl --location --request POST 'https://api.omniall.ai/v1/files' \
  -H "Authorization: Bearer $API_KEY" \
  --form 'file=@"/path/to/demo.pdf"'
```

完整字段见 **API Reference → 平台 API → 文件上传**。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.