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

参考

API 参考 · 视频

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

查看 Markdown

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[].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
next_cursorstringOpaque; pass as cursor (or the after alias) for the next page; 可为 null
has_moreboolean默认 false

示例

curl "https://axiomlab.online/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_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
options.widthintegerWith height, the aspect ratio: 1920×1080 (16:9); profile_card 1080×1920 (9:16); 默认 1920; 范围 640–3840
options.heightinteger默认 1080; 范围 360–2160
options.fpsinteger默认 30; 范围 24–60
options.subtitlesbooleanSubtitle preference, applied by profile_card only; other films usually come with subtitles burned in; 默认 false
options.musicbooleanBackground music preference, applied by profile_card only; 默认 true
options.skill_idstring长度 ≤ 200; 可为 null
options.credit_budgetinteger范围 1–1000000; 可为 null
options.video_typestring可选值:project product personal corporate name_card; 可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio; 默认 cinematic_realism
options.brandobject
options.profileobject
options.motion_stylestring可选值:mono photo; 默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike; 默认 strict
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
options.languagestringThe film's language when the request has no text of its own; unset: Chinese; 可选值:zh en; 可为 null
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
options.founder.name必填string长度 2–12
options.founder.company必填string长度 2–40
options.founder.titles必填array<string>最多 3 项
options.founder.factsarray<object>最多 12 项
options.founder.photos必填array<object>最多 12 项
options.founder.templatestring可选值:ink grid renwu; 默认 ink
options.founder.educationarray<string>最多 3 项
options.founder.honorsarray<string>最多 6 项
options.founder.mottostringthe closing line; the customer's own words; 长度 ≤ 40
options.founder.contactstringshown on the end card only when given; 长度 ≤ 60
options.founder.industrystring行业 / 主营,如智慧农业;framing lines and illustrative scenes may rest on it; 长度 ≤ 20
options.founder.name_pinyinstringoptional pronunciation, e.g. shěn jì bái; written into the narration prompt; 长度 ≤ 48
options.founder.brand_colorstring#RRGGBB accent for the grid template
options.founder.consentbooleanthe customer holds the rights to these photos and the facts are true; 默认 false
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
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
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 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
result.native_projectany
requested_workflow必填string
video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
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://axiomlab.online/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

名称类型说明
messagestringNot accepted (422): use POST /v1/videos/{id}/revisions or a new plan for changed requirements or materials; 长度 ≤ 4000
questionnaire_idstringNot accepted (422): use POST /v1/videos/{id}/revisions or a new plan for changed requirements or materials; 长度 ≤ 200; 可为 null
answersarray<object>Not accepted (422): use POST /v1/videos/{id}/revisions or a new plan for changed requirements or materials; 最多 30 项
assetsarray<string>Not accepted (422): use POST /v1/videos/{id}/revisions or a new plan for changed requirements or materials; 最多 9 项
approve_budgetbooleanApprove a pending budget stop that has approvable: true; the server computes the new limit; 默认 false
credit_budgetintegerLegacy, no longer used: no job stops for a credit budget (sending it answers 422); 范围 1–1000000; 可为 null
budget_usdnumberLegacy: explicit new total USD limit for a budget stop; 范围 0–100000; 可为 null
duration_secintegerAnswer to a confirm_duration stop: the film length in seconds, within the stop's min_duration_sec–max_duration_sec (its suggested_duration_sec unless the customer changes it); 可为 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
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
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 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
result.native_projectany
requested_workflow必填string
video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null

示例

curl -X POST "https://axiomlab.online/v1/videos/<job_id>/resume" \
  -H "Authorization: Bearer $AZIMO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"duration_sec": 60}'

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_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
options.widthintegerWith height, the aspect ratio: 1920×1080 (16:9); profile_card 1080×1920 (9:16); 默认 1920; 范围 640–3840
options.heightinteger默认 1080; 范围 360–2160
options.fpsinteger默认 30; 范围 24–60
options.subtitlesbooleanSubtitle preference, applied by profile_card only; other films usually come with subtitles burned in; 默认 false
options.musicbooleanBackground music preference, applied by profile_card only; 默认 true
options.skill_idstring长度 ≤ 200; 可为 null
options.credit_budgetinteger范围 1–1000000; 可为 null
options.video_typestring可选值:project product personal corporate name_card; 可为 null
options.content_datamap<string, string>
options.style_presetstring可选值:cinematic_realism clean_3d product_studio; 默认 cinematic_realism
options.brandobject
options.profileobject
options.motion_stylestring可选值:mono photo; 默认 mono
options.photo_subjectstring长度 ≤ 120
options.photo_licensestring可选值:strict sharealike; 默认 strict
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
options.languagestringThe film's language when the request has no text of its own; unset: Chinese; 可选值:zh en; 可为 null
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
options.founder.name必填string长度 2–12
options.founder.company必填string长度 2–40
options.founder.titles必填array<string>最多 3 项
options.founder.factsarray<object>最多 12 项
options.founder.photos必填array<object>最多 12 项
options.founder.templatestring可选值:ink grid renwu; 默认 ink
options.founder.educationarray<string>最多 3 项
options.founder.honorsarray<string>最多 6 项
options.founder.mottostringthe closing line; the customer's own words; 长度 ≤ 40
options.founder.contactstringshown on the end card only when given; 长度 ≤ 60
options.founder.industrystring行业 / 主营,如智慧农业;framing lines and illustrative scenes may rest on it; 长度 ≤ 20
options.founder.name_pinyinstringoptional pronunciation, e.g. shěn jì bái; written into the narration prompt; 长度 ≤ 48
options.founder.brand_colorstring#RRGGBB accent for the grid template
options.founder.consentbooleanthe customer holds the rights to these photos and the facts are true; 默认 false

返回 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
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
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 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
result.native_projectany
requested_workflow必填string
video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null
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://axiomlab.online/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
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
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 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
result.native_projectany
requested_workflow必填string
video_typestringThe video type within the workflow, e.g. project, when the request set one; 可为 null
stylestringThe style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null
titlestringA short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null
profile_draftstringprofile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null

示例

curl "https://axiomlab.online/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://axiomlab.online/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://axiomlab.online/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://axiomlab.online/v1/videos/<job_id>/files/<name>?expires=<expires>&sig=<sig>"

← 全部接口