跳到主要内容
限时活动每支视频只要 HK$1限量 1000 支,先到先得立即抢购
Axiom Lab
开发者文档

参考

API 参考 · 批量

一次提交多条视频。

查看 Markdown

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://axiomlab.online/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_maxintegerPlanned length in seconds, checked against the workflow's range, whose lower bound depends on the workflow (GET /v1/workflows: 30–180 for most, profile_card 30–90). It does not cap the film: its length is confirmed after the materials are analysed (needs_input with confirm_duration); 默认 60; 范围 5–180
items[].options.widthintegerWith height, the aspect ratio: 1920×1080 (16:9); profile_card 1080×1920 (9:16); 默认 1920; 范围 640–3840
items[].options.heightinteger默认 1080; 范围 360–2160
items[].options.fpsinteger默认 30; 范围 24–60
items[].options.subtitlesbooleanSubtitle preference, applied by profile_card only; other films usually come with subtitles burned in; 默认 false
items[].options.musicbooleanBackground music preference, applied by profile_card only; 默认 true
items[].options.skill_idstring长度 ≤ 200; 可为 null
items[].options.credit_budgetinteger范围 1–1000000; 可为 null
items[].options.video_typestring可选值:project product personal corporate name_card; 可为 null
items[].options.content_datamap<string, string>
items[].options.style_presetstring可选值:cinematic_realism clean_3d product_studio; 默认 cinematic_realism
items[].options.brandobject
items[].options.profileobject
items[].options.motion_stylestring可选值:mono photo; 默认 mono
items[].options.photo_subjectstring长度 ≤ 120
items[].options.photo_licensestring可选值:strict sharealike; 默认 strict
items[].options.stylestringA style id from GET /v1/styles; for video_type product one of the 15-second TVC looks cinematic, tech, lifestyle; unset uses the default style; 可为 null
items[].options.languagestringThe film's language when the request has no text of its own; unset: Chinese; 可选值:zh en; 可为 null
items[].options.founderobject企业家名片: name, company, titles, facts (0–12; a card counts as two), photos[{asset, role, caption}], template (ink | grid | renwu), consent, optional industry and name_pinyin; required with video_type name_card. Length is 30–90 seconds, set from the material; 可为 null
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[].waited_snumberGET /v1/videos/{id} only: seconds the video waited for its length to be confirmed, null until it is confirmed; its working time is (finished_at or now) - created_at - waited_s; 可为 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 carries no amounts. With approvable: true answer it with POST /v1/videos/{id}/resume {"approve_budget": true}; with approvable: false (actor: operator, prepaid flat-priced jobs) it is an internal review: nothing to approve, the price does not change; 可为 null
jobs[].result.native_projectany
jobs[].requested_workflow必填string
jobs[].video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
jobs[].stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
jobs[].titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
jobs[].profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
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[].waited_snumberGET /v1/videos/{id} only: seconds the video waited for its length to be confirmed, null until it is confirmed; its working time is (finished_at or now) - created_at - waited_s; 可为 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 carries no amounts. With approvable: true answer it with POST /v1/videos/{id}/resume {"approve_budget": true}; with approvable: false (actor: operator, prepaid flat-priced jobs) it is an internal review: nothing to approve, the price does not change; 可为 null
data[].result.native_projectany
data[].requested_workflow必填string
data[].video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
data[].stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
data[].titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
data[].profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
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://axiomlab.online/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[].waited_snumberGET /v1/videos/{id} only: seconds the video waited for its length to be confirmed, null until it is confirmed; its working time is (finished_at or now) - created_at - waited_s; 可为 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 carries no amounts. With approvable: true answer it with POST /v1/videos/{id}/resume {"approve_budget": true}; with approvable: false (actor: operator, prepaid flat-priced jobs) it is an internal review: nothing to approve, the price does not change; 可为 null
jobs[].result.native_projectany
jobs[].requested_workflow必填string
jobs[].video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
jobs[].stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
jobs[].titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
jobs[].profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
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[].waited_snumberGET /v1/videos/{id} only: seconds the video waited for its length to be confirmed, null until it is confirmed; its working time is (finished_at or now) - created_at - waited_s; 可为 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 carries no amounts. With approvable: true answer it with POST /v1/videos/{id}/resume {"approve_budget": true}; with approvable: false (actor: operator, prepaid flat-priced jobs) it is an internal review: nothing to approve, the price does not change; 可为 null
data[].result.native_projectany
data[].requested_workflow必填string
data[].video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
data[].stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
data[].titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
data[].profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
counts必填map<string, integer>

示例

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

← 全部接口