Sora API 代理服务

这是一个 Sora API 的代理服务,提供了完整的 Sora 功能接口。

认证

所有 API 请求都需要在 Header 中包含 Authorization:

Authorization: Bearer YOUR_TOKEN

可用接口

🎬 视频/图片生成

📊 系统信息

👤 用户相关

📱 动态 Feed

📁 文件管理

请求示例

文生图请求

POST /api/backend/video_gen
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "type": "image_gen",
  "operation": "simple_compose",
  "prompt": "描述文本",
  "width": 480,
  "height": 480,
  "n_variants": 2,
  "n_frames": 1,
  "inpaint_items": []
}

图生图请求

POST /api/backend/video_gen
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{
  "type": "image_gen",
  "operation": "remix",
  "prompt": "修改描述",
  "width": 480,
  "height": 480,
  "n_variants": 2,
  "n_frames": 1,
  "model": "turbo",
  "inpaint_items": [
    {
      "type": "image",
      "frame_index": 0,
      "upload_media_id": "media_01xxx",
      "source_start_frame": 0,
      "source_end_frame": 0
    }
  ]
}

文件上传

POST /api/backend/uploads
Content-Type: multipart/form-data
Authorization: Bearer YOUR_TOKEN

[文件数据]

分页参数

支持分页的接口通常接受以下参数:

错误处理

API 返回标准的 HTTP 状态码:

基于 Hono 框架构建