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

参考

API 参考 · 品牌与模板

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

查看 Markdown

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://axiomlab.online/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://axiomlab.online/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://axiomlab.online/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://axiomlab.online/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://axiomlab.online/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://axiomlab.online/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_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
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://axiomlab.online/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://axiomlab.online/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_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
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://axiomlab.online/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://axiomlab.online/v1/templates/<resource_id>" \
  -H "Authorization: Bearer $AZIMO_API_KEY"

← 全部接口