基础约定
- Base URL
https://axiomlab.online- 鉴权
- 大多数
/v1请求带Authorization: Bearer <API key>(公开风格接口GET /v1/styles*与签名下载链接免 Key;若携带无效 Key 仍返回401)。登录后在个人中心创建 Key,原始 Key 只显示一次。 - 项目
- 用
X-Project-ID选择项目,省略时使用默认项目。 - 幂等
- 创建类请求带
Idempotency-Key,超时重试时复用同一个值;同一个值配不同的请求内容会返回 409。 - 异步制作
POST /v1/videos返回 202 和视频 ID;轮询GET /v1/videos/{job_id}或用 Webhook 接收结果。needs_input表示还缺材料,不代表完成。- 分页
- 列表返回
data、next_cursor和has_more;把next_cursor作为cursor传入即可取下一页。 - 价格
- 按制作成功的成片从港币预付余额结算(没做成或取消不扣费);详见 价格说明,企业批量合作联系 sales@axiomlab.online。
错误
出错时返回 JSON,字段如下;报告问题时请附上 request_id。
| 名称 | 类型 | 说明 |
|---|---|---|
error必填 | object | |
error.code必填 | string | Stable machine-readable code, e.g. unauthenticated, not_found, idempotency_conflict, validation_error, rate_limited, insufficient_balance, budget_exceeded, contact_sales, internal_error |
error.message必填 | string | |
error.details | any | Structured context: validation errors, unmet workflow requirements, or null |
error.request_id必填 | string | 可为 null |
| 状态码 | 含义 |
|---|---|
401 | Missing or invalid bearer key (`WWW-Authenticate: Bearer`) |
402 | Wallet balance or spending limit would be exceeded |
403 | Key role or project scope does not allow this; `contact_sales` for anything about pricing |
404 | Resource not found in this organization/project |
409 | State conflict, or Idempotency-Key reused with a different request |
422 | Validation error; `details` lists the failing fields or requirements |
429 | Hourly limit reached (`Retry-After` in seconds) |
500 | Unexpected failure; cite `request_id` when reporting it |
接口目录
账户与能力 (8)
当前 Key 的身份,以及可用的工作流、视频类型和视觉风格。
素材 (5)
上传 PDF、PPT、图片等素材,拿到素材 ID 后在方案里引用。
草稿与方案 (10)
保存编辑器草稿、整理名片素材与脚本,并在制作前出方案:冻结工作流、规格、素材和结构,告诉你还缺什么。
视频 (16)
确认方案后制作视频,查询进度,取回成片,续跑、修改或取消。
批量 (3)
一次提交多条视频。
事件与 Webhook (8)
不想轮询时,用带签名的 Webhook 或事件列表接收状态变化。
品牌与模板 (10)
保存品牌素材和常用模板,制作时直接引用。
项目、Key 与审计 (8)
管理项目和 API Key,查看变更记录。
余额与用量 (9)
查看余额、流水、用量、月结账单与制作计费条件,在线充值。
服务状态 (2)
健康检查,不需要 Key。