Azimo
  1. 首页
  2. 开发者
  3. API 参考

参考

API 参考

Azimo REST API 的全部 57 个接口:参数、请求体、返回字段和 curl 示例,由线上接口定义实时生成。接口说明为英文原文。

把本页以 Markdown 复制到剪贴板,附带 Azimo 的基本信息,可直接粘贴给 AI 助手。查看 Markdown

基础约定

Base URL
https://azimo.ai
鉴权
每个 /v1 请求带 Authorization: Bearer <API key>。登录后在个人中心创建 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 传入即可取下一页。
价格
API 不返回任何价格。报价请联系 sales@azimo.ai。

错误

出错时返回 JSON,字段如下;报告问题时请附上 request_id。

名称类型说明
error必填object
error.code必填stringStable 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.detailsanyStructured context: validation errors, unmet workflow requirements, or null
error.request_id必填string可为 null
状态码含义
401Missing or invalid bearer key (`WWW-Authenticate: Bearer`)
402Wallet balance or spending limit would be exceeded
403Key role or project scope does not allow this; `contact_sales` for anything about pricing
404Resource not found in this organization/project
409State conflict, or Idempotency-Key reused with a different request
422Validation error; `details` lists the failing fields or requirements
429Hourly limit reached (`Retry-After` in seconds)
500Unexpected failure; cite `request_id` when reporting it

账户与能力

当前 Key 的身份,以及可用的工作流和视频类型。

Me

GET/v1/me

需要 API Key成功 200

参数

名称类型说明
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
key_id必填stringSame as id
organization_id必填string
project_id必填string
role必填string可选值:owner editor viewer
billing_mode必填string可选值:budget prepaid
wallet必填object
permissions必填map<string, boolean>

示例

curl "https://azimo.ai/v1/me" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Workflows

GET/v1/workflows

需要 API Key成功 200

参数

名称类型说明
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
router必填object
workflows必填map<string, object>

示例

curl "https://azimo.ai/v1/workflows" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Video Skills

GET/v1/workflows/creative_video/skills

需要 API Key成功 200

参数

名称类型说明
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<any>

示例

curl "https://azimo.ai/v1/workflows/creative_video/skills" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Video Types

GET/v1/video-types

需要 API Key成功 200

参数

名称类型说明
langquerystringDisplay language, zh (default) or en; when absent the first zh/en entry of Accept-Language is used;长度 ≤ 16;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null
accept-languageheaderstring可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].version必填any
data[].templateany
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/video-types" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Playground

GET/v1/playground

需要 API Key成功 200

The workflow gallery: seven fixed entries, each with routing values, whether this account can start it now, and a runnable example.

参数

名称类型说明
langquerystringDisplay language, zh (default) or en; when absent the first zh/en entry of Accept-Language is used;长度 ≤ 16;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null
accept-languageheaderstring可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填stringStable catalogue id
data[].name必填string
data[].summary必填stringOne benefit-oriented sentence
data[].workflow必填stringBackend routing value for options.workflow; null when the entry cannot be started yet;可为 null
data[].video_type必填stringoptions.video_type for structured explainers, otherwise null;可为 null
data[].aspect必填string可选值:16:9 9:16 1:1
data[].duration必填integerDefault options.duration_max in seconds
data[].duration_range必填array<integer>[minimum, maximum] seconds the workflow accepts
data[].needs_assets必填booleanReference material (photos, product pictures) is strongly recommended
data[].available必填boolean
data[].reason必填stringWhy available is false: coming_soon, not_configured (this environment) or contact_sales (not sold to this account);可选值:coming_soon not_configured contact_sales;可为 null
data[].coming_soon必填boolean
data[].example必填object
data[].example.prompt必填stringA ready-to-run creative brief for POST /v1/videos or POST /v1/plans
data[].example.content_data必填map<string, string>Sample value for every input of the workflow's video type (options.content_data); empty when the workflow has none

示例

curl "https://azimo.ai/v1/playground" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

素材

上传 PDF、PPT、图片等素材,拿到素材 ID 后在方案里引用。

List Assets

GET/v1/assets

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].filename必填string
data[].bytes必填integer
data[].sha256必填string
data[].created_at必填number
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/assets" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Upload Asset

POST/v1/assets

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 multipart/form-data

名称类型说明
file必填file

返回 201 application/json

名称类型说明
id必填string
project_id必填string可为 null
filename必填string
bytes必填integer
sha256必填string
created_at必填number

示例

curl -X POST "https://azimo.ai/v1/assets" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@deck.pdf"

Get Asset

GET/v1/assets/{asset_id}

需要 API Key成功 200

参数

名称类型说明
asset_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
filename必填string
bytes必填integer
sha256必填string
created_at必填number

示例

curl "https://azimo.ai/v1/assets/<asset_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Delete Asset

DELETE/v1/assets/{asset_id}

需要 API Key成功 200

Remove an upload and its bytes. Jobs that already consumed it keep their own copies.

参数

名称类型说明
asset_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/assets/<asset_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Download Asset

GET/v1/assets/{asset_id}/file

需要 API Key成功 200

参数

名称类型说明
asset_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/octet-stream

返回文件内容。

示例

curl "https://azimo.ai/v1/assets/<asset_id>/file" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

方案

制作前先出方案:冻结工作流、规格、素材和结构,告诉你还缺什么。

List Plans

GET/v1/plans

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].kind必填string
data[].name必填string
data[].version必填integer
data[].created_at必填number
data[].updated_at必填number
data[].data必填object
data[].data.status必填string可选值:planning ready needs_input unavailable
data[].data.request必填object
data[].data.assetsarray<object>
data[].data.routingobject可为 null
data[].data.requirementsarray<object>
data[].data.reasonstring可为 null
data[].data.job_idstringThe production this plan started; a plan starts at most one;可为 null
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/plans" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Plan

POST/v1/plans

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
promptstring长度 ≤ 4000
assetsarray<string>最多 30 项
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict
webhook_urlstring长度 ≤ 2000;可为 null
plan_idstring可为 null
template_idstring可为 null
brand_idstring可为 null
variablesmap<string, string>

返回 201 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object
data.status必填string可选值:planning ready needs_input unavailable
data.request必填object
data.assetsarray<object>
data.routingobject可为 null
data.requirementsarray<object>
data.reasonstring可为 null
data.job_idstringThe production this plan started; a plan starts at most one;可为 null

示例

curl -X POST "https://azimo.ai/v1/plans" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "<prompt>", "assets": ["<asset id>"]}'

Get Plan

GET/v1/plans/{plan_id}

需要 API Key成功 200

参数

名称类型说明
plan_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object
data.status必填string可选值:planning ready needs_input unavailable
data.request必填object
data.assetsarray<object>
data.routingobject可为 null
data.requirementsarray<object>
data.reasonstring可为 null
data.job_idstringThe production this plan started; a plan starts at most one;可为 null

示例

curl "https://azimo.ai/v1/plans/<plan_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Preview Route

POST/v1/route

需要 API Key成功 200

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
promptstring长度 ≤ 4000
assetsarray<string>最多 30 项
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict
webhook_urlstring长度 ≤ 2000;可为 null
plan_idstring可为 null
template_idstring可为 null
brand_idstring可为 null
variablesmap<string, string>

返回 200 application/json

名称类型说明
plan_id必填string
workflowstring可为 null
requirementsarray<object>

示例

curl -X POST "https://azimo.ai/v1/route" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "<prompt>", "assets": ["<asset id>"]}'

视频

确认方案后制作视频,查询进度,取回成片,续跑、修改或取消。

List Videos

GET/v1/videos

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
statusquerystring可选值:queued running needs_input complete rejected failed cancelled;可为 null
batch_idquerystring长度 ≤ 32;可为 null
created_afterquerynumber范围 ≥ 0;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].batch_idstring可为 null
data[].parent_idstring可为 null
data[].status必填string可选值:queued running needs_input complete rejected failed cancelled
data[].stage必填string可为 null
data[].progress必填integer可为 null
data[].errorstring可为 null
data[].created_at必填number可为 null
data[].updated_atnumber可为 null
data[].started_atnumber可为 null
data[].finished_atnumber可为 null
data[].deleted_atnumber可为 null
data[].recovery必填object
data[].recovery.attempt必填integer
data[].recovery.max_attempts必填integer
data[].recovery.retry_atnumber可为 null
data[].resultobject可为 null
data[].result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
data[].result.durationnumber可为 null
data[].result.shot_countinteger可为 null
data[].result.visual_mixany
data[].result.qaany
data[].result.briefany
data[].result.workflowstring可为 null
data[].result.routingany
data[].result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
data[].result.native_projectany
data[].requested_workflow必填string
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/videos" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Video

POST/v1/videos

需要 API Key成功 202

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
promptstring长度 ≤ 4000
assetsarray<string>最多 30 项
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict
webhook_urlstring长度 ≤ 2000;可为 null
plan_idstring可为 null
template_idstring可为 null
brand_idstring可为 null
variablesmap<string, string>

返回 202 application/json

名称类型说明
id必填string
project_id必填string可为 null
batch_idstring可为 null
parent_idstring可为 null
status必填string可选值:queued running needs_input complete rejected failed cancelled
stage必填string可为 null
progress必填integer可为 null
errorstring可为 null
created_at必填number可为 null
updated_atnumber可为 null
started_atnumber可为 null
finished_atnumber可为 null
deleted_atnumber可为 null
recovery必填object
recovery.attempt必填integer
recovery.max_attempts必填integer
recovery.retry_atnumber可为 null
resultobject可为 null
result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
result.durationnumber可为 null
result.shot_countinteger可为 null
result.visual_mixany
result.qaany
result.briefany
result.workflowstring可为 null
result.routingany
result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
result.native_projectany
requested_workflow必填string
webhook_signing_secretstringOnly present when the request set webhook_url: the project secret that signs that per-job callback (Vidgen-Signature). Store it; verify deliveries with it;可为 null

示例

curl -X POST "https://azimo.ai/v1/videos" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "<prompt>", "assets": ["<asset id>"]}'

Resume

POST/v1/videos/{job_id}/resume

需要 API Key成功 202

参数

名称类型说明
job_id必填pathstring
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
messagestring长度 ≤ 4000
questionnaire_idstring长度 ≤ 200;可为 null
answersarray<object>最多 30 项
assetsarray<string>最多 9 项
approve_budgetbooleanApprove the pending budget stop; the server computes the new limit;默认 false
credit_budgetintegerLegacy: explicit new Vikoo credit budget for a credit budget stop;范围 1–1000000;可为 null
budget_usdnumberLegacy: explicit new total USD limit for a budget stop;范围 0–100000;可为 null

返回 202 application/json

名称类型说明
id必填string
project_id必填string可为 null
batch_idstring可为 null
parent_idstring可为 null
status必填string可选值:queued running needs_input complete rejected failed cancelled
stage必填string可为 null
progress必填integer可为 null
errorstring可为 null
created_at必填number可为 null
updated_atnumber可为 null
started_atnumber可为 null
finished_atnumber可为 null
deleted_atnumber可为 null
recovery必填object
recovery.attempt必填integer
recovery.max_attempts必填integer
recovery.retry_atnumber可为 null
resultobject可为 null
result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
result.durationnumber可为 null
result.shot_countinteger可为 null
result.visual_mixany
result.qaany
result.briefany
result.workflowstring可为 null
result.routingany
result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
result.native_projectany
requested_workflow必填string

示例

curl -X POST "https://azimo.ai/v1/videos/<job_id>/resume" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"message": "<message>", "questionnaire_id": "<questionnaire_id>"}'

Revise Video

POST/v1/videos/{job_id}/revisions

需要 API Key成功 202

参数

名称类型说明
job_id必填pathstring
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
promptstring长度 10–4000;可为 null
assetsarray<string>最多 30 项;可为 null
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict

返回 202 application/json

名称类型说明
id必填string
project_id必填string可为 null
batch_idstring可为 null
parent_idstring可为 null
status必填string可选值:queued running needs_input complete rejected failed cancelled
stage必填string可为 null
progress必填integer可为 null
errorstring可为 null
created_at必填number可为 null
updated_atnumber可为 null
started_atnumber可为 null
finished_atnumber可为 null
deleted_atnumber可为 null
recovery必填object
recovery.attempt必填integer
recovery.max_attempts必填integer
recovery.retry_atnumber可为 null
resultobject可为 null
result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
result.durationnumber可为 null
result.shot_countinteger可为 null
result.visual_mixany
result.qaany
result.briefany
result.workflowstring可为 null
result.routingany
result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
result.native_projectany
requested_workflow必填string
webhook_signing_secretstringOnly present when the request set webhook_url: the project secret that signs that per-job callback (Vidgen-Signature). Store it; verify deliveries with it;可为 null

示例

curl -X POST "https://azimo.ai/v1/videos/<job_id>/revisions" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "<prompt>", "assets": ["<asset id>"]}'

Get Video

GET/v1/videos/{job_id}

需要 API Key成功 200

参数

名称类型说明
job_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
batch_idstring可为 null
parent_idstring可为 null
status必填string可选值:queued running needs_input complete rejected failed cancelled
stage必填string可为 null
progress必填integer可为 null
errorstring可为 null
created_at必填number可为 null
updated_atnumber可为 null
started_atnumber可为 null
finished_atnumber可为 null
deleted_atnumber可为 null
recovery必填object
recovery.attempt必填integer
recovery.max_attempts必填integer
recovery.retry_atnumber可为 null
resultobject可为 null
result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
result.durationnumber可为 null
result.shot_countinteger可为 null
result.visual_mixany
result.qaany
result.briefany
result.workflowstring可为 null
result.routingany
result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
result.native_projectany
requested_workflow必填string

示例

curl "https://azimo.ai/v1/videos/<job_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Delete Video

DELETE/v1/videos/{job_id}

需要 API Key成功 200

Purge a finished job's films, uploads copies and diagnostics; the job record stays for usage history.

参数

名称类型说明
job_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/videos/<job_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Cancel Video

POST/v1/videos/{job_id}/cancel

需要 API Key成功 200

queued / needs_input jobs cancel at once; a running job stops before its next paid step (cancelling).

参数

名称类型说明
job_id必填pathstring
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
status必填string可选值:cancelled cancelling

示例

curl -X POST "https://azimo.ai/v1/videos/<job_id>/cancel" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get File

GET/v1/videos/{job_id}/files/{name}

签名链接,无需 Key成功 200

参数

名称类型说明
job_id必填pathstring
name必填pathstring
expires必填queryinteger
sig必填querystring

返回 200 application/octet-stream

返回文件内容。

示例

curl "https://azimo.ai/v1/videos/<job_id>/files/<name>?expires=<expires>&sig=<sig>"

批量

一次提交多条视频。

List Batches

GET/v1/batches

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].name必填string
data[].created_at必填number
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/batches" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Batch

POST/v1/batches

需要 API Key成功 202

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
namestring默认 Batch;长度 1–160
items必填array<object>最多 50 项
items[].promptstring长度 ≤ 4000
items[].assetsarray<string>最多 30 项
items[].optionsobject
items[].options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
items[].options.goalstring长度 ≤ 2000
items[].options.audiencestring长度 ≤ 1000
items[].options.duration_maxinteger默认 60;范围 5–180
items[].options.widthinteger默认 1920;范围 640–3840
items[].options.heightinteger默认 1080;范围 360–2160
items[].options.fpsinteger默认 30;范围 24–60
items[].options.subtitlesboolean默认 false
items[].options.musicboolean默认 true
items[].options.skill_idstring长度 ≤ 200;可为 null
items[].options.credit_budgetinteger范围 1–1000000;可为 null
items[].options.video_typestring可选值:project product personal corporate;可为 null
items[].options.content_datamap<string, string>
items[].options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
items[].options.brandobject
items[].options.motion_stylestring可选值:mono photo;默认 mono
items[].options.photo_subjectstring长度 ≤ 120
items[].options.photo_licensestring可选值:strict sharealike;默认 strict
items[].webhook_urlstring长度 ≤ 2000;可为 null
items[].plan_idstring可为 null
items[].template_idstring可为 null
items[].brand_idstring可为 null
items[].variablesmap<string, string>

返回 202 application/json

名称类型说明
id必填string
name必填string
jobs必填array<object>
jobs[].id必填string
jobs[].project_id必填string可为 null
jobs[].batch_idstring可为 null
jobs[].parent_idstring可为 null
jobs[].status必填string可选值:queued running needs_input complete rejected failed cancelled
jobs[].stage必填string可为 null
jobs[].progress必填integer可为 null
jobs[].errorstring可为 null
jobs[].created_at必填number可为 null
jobs[].updated_atnumber可为 null
jobs[].started_atnumber可为 null
jobs[].finished_atnumber可为 null
jobs[].deleted_atnumber可为 null
jobs[].recovery必填object
jobs[].recovery.attempt必填integer
jobs[].recovery.max_attempts必填integer
jobs[].recovery.retry_atnumber可为 null
jobs[].resultobject可为 null
jobs[].result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
jobs[].result.durationnumber可为 null
jobs[].result.shot_countinteger可为 null
jobs[].result.visual_mixany
jobs[].result.qaany
jobs[].result.briefany
jobs[].result.workflowstring可为 null
jobs[].result.routingany
jobs[].result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
jobs[].result.native_projectany
jobs[].requested_workflow必填string
data必填array<object>Alias of jobs, kept for v0.3 clients
data[].id必填string
data[].project_id必填string可为 null
data[].batch_idstring可为 null
data[].parent_idstring可为 null
data[].status必填string可选值:queued running needs_input complete rejected failed cancelled
data[].stage必填string可为 null
data[].progress必填integer可为 null
data[].errorstring可为 null
data[].created_at必填number可为 null
data[].updated_atnumber可为 null
data[].started_atnumber可为 null
data[].finished_atnumber可为 null
data[].deleted_atnumber可为 null
data[].recovery必填object
data[].recovery.attempt必填integer
data[].recovery.max_attempts必填integer
data[].recovery.retry_atnumber可为 null
data[].resultobject可为 null
data[].result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
data[].result.durationnumber可为 null
data[].result.shot_countinteger可为 null
data[].result.visual_mixany
data[].result.qaany
data[].result.briefany
data[].result.workflowstring可为 null
data[].result.routingany
data[].result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
data[].result.native_projectany
data[].requested_workflow必填string
counts必填map<string, integer>
webhook_signing_secretstringSet when an item carried webhook_url: the project secret that signs those per-job callbacks (Vidgen-Signature). Store it; verify deliveries with it;可为 null

示例

curl -X POST "https://azimo.ai/v1/batches" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"items": [{}]}'

Get Batch

GET/v1/batches/{batch_id}

需要 API Key成功 200

参数

名称类型说明
batch_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
name必填string
jobs必填array<object>
jobs[].id必填string
jobs[].project_id必填string可为 null
jobs[].batch_idstring可为 null
jobs[].parent_idstring可为 null
jobs[].status必填string可选值:queued running needs_input complete rejected failed cancelled
jobs[].stage必填string可为 null
jobs[].progress必填integer可为 null
jobs[].errorstring可为 null
jobs[].created_at必填number可为 null
jobs[].updated_atnumber可为 null
jobs[].started_atnumber可为 null
jobs[].finished_atnumber可为 null
jobs[].deleted_atnumber可为 null
jobs[].recovery必填object
jobs[].recovery.attempt必填integer
jobs[].recovery.max_attempts必填integer
jobs[].recovery.retry_atnumber可为 null
jobs[].resultobject可为 null
jobs[].result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
jobs[].result.durationnumber可为 null
jobs[].result.shot_countinteger可为 null
jobs[].result.visual_mixany
jobs[].result.qaany
jobs[].result.briefany
jobs[].result.workflowstring可为 null
jobs[].result.routingany
jobs[].result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
jobs[].result.native_projectany
jobs[].requested_workflow必填string
data必填array<object>Alias of jobs, kept for v0.3 clients
data[].id必填string
data[].project_id必填string可为 null
data[].batch_idstring可为 null
data[].parent_idstring可为 null
data[].status必填string可选值:queued running needs_input complete rejected failed cancelled
data[].stage必填string可为 null
data[].progress必填integer可为 null
data[].errorstring可为 null
data[].created_at必填number可为 null
data[].updated_atnumber可为 null
data[].started_atnumber可为 null
data[].finished_atnumber可为 null
data[].deleted_atnumber可为 null
data[].recovery必填object
data[].recovery.attempt必填integer
data[].recovery.max_attempts必填integer
data[].recovery.retry_atnumber可为 null
data[].resultobject可为 null
data[].result.filesmap<string, string>Signed download links; present on GET once complete/rejected;可为 null
data[].result.durationnumber可为 null
data[].result.shot_countinteger可为 null
data[].result.visual_mixany
data[].result.qaany
data[].result.briefany
data[].result.workflowstring可为 null
data[].result.routingany
data[].result.input_requiredobjectWhy the job is needs_input: code, actor, message and what to send to /resume. A spending stop has code: budget_approval and approvable: true and carries no amounts; answer it with POST /v1/videos/{id}/resume {"approve_budget": true};可为 null
data[].result.native_projectany
data[].requested_workflow必填string
counts必填map<string, integer>

示例

curl "https://azimo.ai/v1/batches/<batch_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

事件与 Webhook

不想轮询时,用带签名的 Webhook 或事件列表接收状态变化。

List Events

GET/v1/events

需要 API Key成功 200

参数

名称类型说明
afterqueryinteger默认 0;范围 ≥ 0
limitqueryinteger默认 50;范围 1–200
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].sequence必填integer
data[].type必填string
data[].created_at必填number
data[].api_version必填string
data[].project_id必填string可为 null
data[].data必填object
next_cursor必填integerSequence number to pass as after; unchanged when the page is empty
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/events" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

List Webhooks

GET/v1/webhooks

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].kind必填string
data[].name必填string
data[].version必填integer
data[].created_at必填number
data[].updated_at必填number
data[].data必填object
data[].data.name必填string
data[].data.url必填string
data[].data.activeboolean默认 true
data[].data.has_secret必填boolean
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/webhooks" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Webhook

POST/v1/webhooks

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
namestring默认 Webhook;长度 ≤ 160
url必填string长度 ≤ 2000
activeboolean默认 true

返回 201 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object
data.name必填string
data.url必填string
data.activeboolean默认 true
data.has_secret必填boolean
signing_secret必填stringShown at creation/rotation and for the same actor's idempotent retry within 24 hours;可为 null

示例

curl -X POST "https://azimo.ai/v1/webhooks" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url": "<url>"}'

Rotate Webhook Secret

POST/v1/webhooks/{webhook_id}/rotate-secret

需要 API Key成功 200

参数

名称类型说明
webhook_id必填pathstring
expected_version必填queryinteger范围 ≥ 1
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object
data.name必填string
data.url必填string
data.activeboolean默认 true
data.has_secret必填boolean
signing_secret必填stringShown at creation/rotation and for the same actor's idempotent retry within 24 hours;可为 null

示例

curl -X POST "https://azimo.ai/v1/webhooks/<webhook_id>/rotate-secret?expected_version=<expected_version>" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Update Webhook

PUT/v1/webhooks/{webhook_id}

需要 API Key成功 200

参数

名称类型说明
webhook_id必填pathstring
expected_version必填queryinteger范围 ≥ 1
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
namestring默认 Webhook;长度 ≤ 160
url必填string长度 ≤ 2000
activeboolean默认 true

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object
data.name必填string
data.url必填string
data.activeboolean默认 true
data.has_secret必填boolean

示例

curl -X PUT "https://azimo.ai/v1/webhooks/<webhook_id>?expected_version=<expected_version>" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "<url>"}'

Delete Webhook

DELETE/v1/webhooks/{webhook_id}

需要 API Key成功 200

参数

名称类型说明
webhook_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/webhooks/<webhook_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

List Deliveries

GET/v1/webhook-deliveries

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].event_id必填string
data[].url必填string
data[].status必填string
data[].attempts必填integer
data[].last_error必填string可为 null
data[].delivered_at必填number可为 null
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/webhook-deliveries" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Replay

POST/v1/webhook-deliveries/{delivery_id}/replay

需要 API Key成功 202

参数

名称类型说明
delivery_id必填pathstring
webhook_idquerystring长度 ≤ 32;可为 null
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 202 application/json

名称类型说明
id必填string
status必填string可选值:pending

示例

curl -X POST "https://azimo.ai/v1/webhook-deliveries/<delivery_id>/replay" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

品牌与模板

保存品牌素材和常用模板,制作时直接引用。

Listing

GET/v1/brands

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].kind必填string
data[].name必填string
data[].version必填integer
data[].created_at必填number
data[].updated_at必填number
data[].data必填object
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/brands" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create

POST/v1/brands

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–120
sloganstring长度 ≤ 500
primary_colorstring默认 #0F4C81
themestring可选值:light dark;默认 dark
assetsarray<string>最多 30 项
notesstring长度 ≤ 2000

返回 201 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl -X POST "https://azimo.ai/v1/brands" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>"}'

Get

GET/v1/brands/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
versionqueryinteger范围 ≥ 1;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl "https://azimo.ai/v1/brands/<resource_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Revise

PUT/v1/brands/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
expected_version必填queryinteger范围 ≥ 1
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–120
sloganstring长度 ≤ 500
primary_colorstring默认 #0F4C81
themestring可选值:light dark;默认 dark
assetsarray<string>最多 30 项
notesstring长度 ≤ 2000

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl -X PUT "https://azimo.ai/v1/brands/<resource_id>?expected_version=<expected_version>" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>"}'

Remove

DELETE/v1/brands/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/brands/<resource_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Listing

GET/v1/templates

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].project_id必填string可为 null
data[].kind必填string
data[].name必填string
data[].version必填integer
data[].created_at必填number
data[].updated_at必填number
data[].data必填object
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/templates" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create

POST/v1/templates

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–160
prompt必填stringUse $variable or ${variable} placeholders;长度 10–4000
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict
assetsarray<string>最多 30 项
brand_idstring可为 null

返回 201 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl -X POST "https://azimo.ai/v1/templates" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>", "prompt": "<prompt>"}'

Get

GET/v1/templates/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
versionqueryinteger范围 ≥ 1;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl "https://azimo.ai/v1/templates/<resource_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Revise

PUT/v1/templates/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
expected_version必填queryinteger范围 ≥ 1
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–160
prompt必填stringUse $variable or ${variable} placeholders;长度 10–4000
optionsobject
options.workflowstring可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch;默认 explainer
options.goalstring长度 ≤ 2000
options.audiencestring长度 ≤ 1000
options.duration_maxinteger默认 60;范围 5–180
options.widthinteger默认 1920;范围 640–3840
options.heightinteger默认 1080;范围 360–2160
options.fpsinteger默认 30;范围 24–60
options.subtitlesboolean默认 false
options.musicboolean默认 true
options.skill_idstring长度 ≤ 200;可为 null
options.credit_budgetinteger范围 1–1000000;可为 null
options.video_typestring可选值:project product personal corporate;可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio;默认 cinematic_realism
options.brandobject
options.motion_stylestring可选值:mono photo;默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike;默认 strict
assetsarray<string>最多 30 项
brand_idstring可为 null

返回 200 application/json

名称类型说明
id必填string
project_id必填string可为 null
kind必填string
name必填string
version必填integer
created_at必填number
updated_at必填number
data必填object

示例

curl -X PUT "https://azimo.ai/v1/templates/<resource_id>?expected_version=<expected_version>" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>", "prompt": "<prompt>"}'

Remove

DELETE/v1/templates/{resource_id}

需要 API Key成功 200

参数

名称类型说明
resource_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/templates/<resource_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

项目、Key 与审计

管理项目和 API Key,查看变更记录。

List Projects

GET/v1/projects

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].organization_id必填string
data[].name必填string
data[].created_at必填number
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/projects" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Project

POST/v1/projects

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–120

返回 201 application/json

名称类型说明
id必填string
organization_id必填string
name必填string
created_at必填number

示例

curl -X POST "https://azimo.ai/v1/projects" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>"}'

Delete Project

DELETE/v1/projects/{project_id}

需要 API Key成功 200

参数

名称类型说明
project_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
deletedboolean默认 true

示例

curl -X DELETE "https://azimo.ai/v1/projects/<project_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

List Keys

GET/v1/api-keys

需要 API Key成功 200

参数

名称类型说明
limitqueryinteger默认 50;范围 1–200
cursorquerystring长度 ≤ 256;可为 null
afterquerystring长度 ≤ 256;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].name必填stringLabel given at creation (also returned as owner)
data[].owner必填string
data[].prefix必填string可为 null
data[].organization_id必填string可为 null
data[].project_idstringSet when the key is bound to one project;可为 null
data[].role必填string可选值:owner editor viewer
data[].active必填boolean
data[].created_at必填number可为 null
data[].last_used_atnumber可为 null
data[].expires_atnumber可为 null
data[].revoked_atnumber可为 null
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/api-keys" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Create Key

POST/v1/api-keys

需要 API Key成功 201

参数

名称类型说明
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
name必填string长度 1–120
rolestring可选值:owner editor viewer;默认 editor
project_idstring可为 null
monthly_budget_usdnumber范围 ≥ 0;可为 null
rate_per_hourinteger范围 ≥ 1;可为 null

返回 201 application/json

名称类型说明
id必填string
name必填stringLabel given at creation (also returned as owner)
owner必填string
prefix必填string可为 null
organization_id必填string可为 null
project_idstringSet when the key is bound to one project;可为 null
role必填string可选值:owner editor viewer
active必填boolean
created_at必填number可为 null
last_used_atnumber可为 null
expires_atnumber可为 null
revoked_atnumber可为 null
key必填stringThe bearer secret; shown once (an idempotent replay returns the same value)

示例

curl -X POST "https://azimo.ai/v1/api-keys" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name": "<name>"}'

Rotate Key

POST/v1/api-keys/{key_id}/rotate

需要 API Key成功 200

The old secret dies at once, or after grace_seconds so running fleets can switch without downtime.

参数

名称类型说明
key_id必填pathstring
grace_secondsqueryinteger默认 0;范围 0–604800
Idempotency-Keyheaderstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
key必填string
previous_id必填string
previous_expires_in必填integer可为 null

示例

curl -X POST "https://azimo.ai/v1/api-keys/<key_id>/rotate" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Revoke Key

DELETE/v1/api-keys/{key_id}

需要 API Key成功 200

参数

名称类型说明
key_id必填pathstring
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
id必填string
activeboolean默认 false

示例

curl -X DELETE "https://azimo.ai/v1/api-keys/<key_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Audit Log

GET/v1/audit

需要 API Key成功 200

Identity and configuration changes for this organization (keys, projects, webhooks), oldest first from after.

参数

名称类型说明
afterqueryinteger默认 0;范围 ≥ 0
limitqueryinteger默认 50;范围 1–200
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].sequence必填integer
data[].type必填string
data[].created_at必填number
data[].api_version必填string
data[].project_id必填string可为 null
data[].data必填object
next_cursor必填integerSequence number to pass as after; unchanged when the page is empty
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/audit" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

余额与用量

查看余额、流水和用量,在线充值。

Wallet

GET/v1/wallet

需要 API Key成功 200

参数

名称类型说明
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
balance_cents必填integer
held_cents必填integer
available_cents必填integer
low_balance_cents必填integer可为 null
currency必填string
organization_id必填string

示例

curl "https://azimo.ai/v1/wallet" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Wallet Entries

GET/v1/wallet/entries

需要 API Key成功 200

参数

名称类型说明
afterquerystring长度 ≤ 64;可为 null
limitqueryinteger默认 50;范围 1–200
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
data必填array<object>
data[].id必填string
data[].organization_id必填string
data[].kind必填string
data[].amount_cents必填integer
data[].hold_cents必填integer
data[].job_id必填string可为 null
data[].note必填string可为 null
data[].actor必填string可为 null
data[].created_at必填number
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page;可为 null
has_moreboolean默认 false

示例

curl "https://azimo.ai/v1/wallet/entries" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

Checkout

POST/v1/wallet/checkout

需要 API Key成功 201

参数

名称类型说明
Idempotency-Key必填headerstring调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次;长度 1–128
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

请求体 application/json

名称类型说明
amount_cents必填integerUSD cents, $5–$10,000;范围 500–1000000

返回 201 application/json

名称类型说明
id必填string
url必填string
amount_cents必填integer
currencystring默认 USD

示例

curl -X POST "https://azimo.ai/v1/wallet/checkout" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount_cents": 500}'

Usage

GET/v1/usage

需要 API Key成功 200

The amount billed for this project's paid calls in [from, to) (default: the last 30 days), plus job counts, grouped on request. group_by=job pages by job id with after; group_by=workflow reads at most 5000 jobs' request options.

参数

名称类型说明
fromquerynumber范围 ≥ 0;可为 null
toquerynumber范围 ≥ 0;可为 null
group_byquerystring默认 none
limitqueryinteger默认 50;范围 1–200
afterquerystring长度 ≤ 32;可为 null
X-Project-IDheaderstring要操作的项目;省略时使用默认项目;可为 null

返回 200 application/json

名称类型说明
project_id必填string
range必填map<string, number>
jobs必填map<string, integer>
list_usd必填numberAmount billed for the paid calls in the range
group_by必填string
groups必填array<object>可为 null
next_cursor必填string可为 null

示例

curl "https://azimo.ai/v1/usage" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

服务状态

健康检查,不需要 Key。

Healthz

GET/healthz

无需鉴权成功 200

返回 200 application/json

示例

curl "https://azimo.ai/healthz"

Readyz

GET/readyz

无需鉴权成功 200

返回 200 application/json

名称类型说明
ok必填boolean
db必填boolean
version必填string
queue_depth必填integer
running必填integer
worker_seen_atnumberLatest job start or running-job heartbeat;可为 null
worker_alive必填booleanA worker sent a durable heartbeat within the last 5 minutes

其他状态码

  • 503 Service Unavailable

示例

curl "https://azimo.ai/readyz"
反馈