List Batches
GET/v1/batches
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
limitquery | integer | 默认 50; 范围 1–200 |
cursorquery | string | 长度 ≤ 256; 可为 null |
afterquery | string | 长度 ≤ 256; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
data必填 | array<object> | |
data[].id必填 | string | |
data[].name必填 | string | |
data[].created_at必填 | number | |
next_cursor | string | Opaque; pass as cursor (or the after alias) for the next page; 可为 null |
has_more | boolean | 默认 false |
示例
curl "https://axiomlab.online/v1/batches" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Create Batch
POST/v1/batches
需要 API Key成功 202
参数
| 名称 | 类型 | 说明 |
|---|---|---|
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
请求体 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
name | string | 默认 Batch; 长度 1–160 |
items必填 | array<object> | 最多 50 项 |
items[].prompt | string | 长度 ≤ 4000 |
items[].assets | array<string> | 最多 30 项 |
items[].options | object | |
items[].options.workflow | string | 可选值:auto explainer short_drama creative_video motion_explainer profile_card product_pitch; 默认 explainer |
items[].options.goal | string | 长度 ≤ 2000 |
items[].options.audience | string | 长度 ≤ 1000 |
items[].options.duration_max | integer | Planned 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.width | integer | With height, the aspect ratio: 1920×1080 (16:9); profile_card 1080×1920 (9:16); 默认 1920; 范围 640–3840 |
items[].options.height | integer | 默认 1080; 范围 360–2160 |
items[].options.fps | integer | 默认 30; 范围 24–60 |
items[].options.subtitles | boolean | Subtitle preference, applied by profile_card only; other films usually come with subtitles burned in; 默认 false |
items[].options.music | boolean | Background music preference, applied by profile_card only; 默认 true |
items[].options.skill_id | string | 长度 ≤ 200; 可为 null |
items[].options.credit_budget | integer | 范围 1–1000000; 可为 null |
items[].options.video_type | string | 可选值:project product personal corporate name_card; 可为 null |
items[].options.content_data | map<string, string> | |
items[].options.style_preset | string | 可选值:cinematic_realism clean_3d product_studio; 默认 cinematic_realism |
items[].options.brand | object | |
items[].options.profile | object | |
items[].options.motion_style | string | 可选值:mono photo; 默认 mono |
items[].options.photo_subject | string | 长度 ≤ 120 |
items[].options.photo_license | string | 可选值:strict sharealike; 默认 strict |
items[].options.style | string | A 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.language | string | The film's language when the request has no text of its own; unset: Chinese; 可选值:zh en; 可为 null |
items[].options.founder | object | 企业家名片: 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_url | string | 长度 ≤ 2000; 可为 null |
items[].plan_id | string | 可为 null |
items[].template_id | string | 可为 null |
items[].brand_id | string | 可为 null |
items[].variables | map<string, string> |
返回 202 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
name必填 | string | |
jobs必填 | array<object> | |
jobs[].id必填 | string | |
jobs[].project_id必填 | string | 可为 null |
jobs[].batch_id | string | 可为 null |
jobs[].parent_id | string | 可为 null |
jobs[].status必填 | string | 可选值:queued running needs_input complete rejected failed cancelled |
jobs[].stage必填 | string | 可为 null |
jobs[].progress必填 | integer | 可为 null |
jobs[].error | string | 可为 null |
jobs[].created_at必填 | number | 可为 null |
jobs[].updated_at | number | 可为 null |
jobs[].started_at | number | 可为 null |
jobs[].finished_at | number | 可为 null |
jobs[].deleted_at | number | 可为 null |
jobs[].waited_s | number | GET /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_at | number | 可为 null |
jobs[].result | object | 可为 null |
jobs[].result.files | map<string, string> | Signed download links; present on GET once complete/rejected; 可为 null |
jobs[].result.duration | number | 可为 null |
jobs[].result.shot_count | integer | 可为 null |
jobs[].result.visual_mix | any | |
jobs[].result.qa | any | |
jobs[].result.brief | any | |
jobs[].result.workflow | string | 可为 null |
jobs[].result.routing | any | |
jobs[].result.input_required | object | Why 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_project | any | |
jobs[].requested_workflow必填 | string | |
jobs[].video_type | string | The video type within the workflow, e.g. project, when the request set one; 可为 null |
jobs[].style | string | The style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null |
jobs[].title | string | A short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null |
jobs[].profile_draft | string | profile_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_id | string | 可为 null |
data[].parent_id | string | 可为 null |
data[].status必填 | string | 可选值:queued running needs_input complete rejected failed cancelled |
data[].stage必填 | string | 可为 null |
data[].progress必填 | integer | 可为 null |
data[].error | string | 可为 null |
data[].created_at必填 | number | 可为 null |
data[].updated_at | number | 可为 null |
data[].started_at | number | 可为 null |
data[].finished_at | number | 可为 null |
data[].deleted_at | number | 可为 null |
data[].waited_s | number | GET /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_at | number | 可为 null |
data[].result | object | 可为 null |
data[].result.files | map<string, string> | Signed download links; present on GET once complete/rejected; 可为 null |
data[].result.duration | number | 可为 null |
data[].result.shot_count | integer | 可为 null |
data[].result.visual_mix | any | |
data[].result.qa | any | |
data[].result.brief | any | |
data[].result.workflow | string | 可为 null |
data[].result.routing | any | |
data[].result.input_required | object | Why 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_project | any | |
data[].requested_workflow必填 | string | |
data[].video_type | string | The video type within the workflow, e.g. project, when the request set one; 可为 null |
data[].style | string | The style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null |
data[].title | string | A short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null |
data[].profile_draft | string | profile_card: the confirmed 行家访谈 draft this film was made from (the web app offers a retry); 可为 null |
counts必填 | map<string, integer> | |
webhook_signing_secret | string | Set 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必填path | string | |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
name必填 | string | |
jobs必填 | array<object> | |
jobs[].id必填 | string | |
jobs[].project_id必填 | string | 可为 null |
jobs[].batch_id | string | 可为 null |
jobs[].parent_id | string | 可为 null |
jobs[].status必填 | string | 可选值:queued running needs_input complete rejected failed cancelled |
jobs[].stage必填 | string | 可为 null |
jobs[].progress必填 | integer | 可为 null |
jobs[].error | string | 可为 null |
jobs[].created_at必填 | number | 可为 null |
jobs[].updated_at | number | 可为 null |
jobs[].started_at | number | 可为 null |
jobs[].finished_at | number | 可为 null |
jobs[].deleted_at | number | 可为 null |
jobs[].waited_s | number | GET /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_at | number | 可为 null |
jobs[].result | object | 可为 null |
jobs[].result.files | map<string, string> | Signed download links; present on GET once complete/rejected; 可为 null |
jobs[].result.duration | number | 可为 null |
jobs[].result.shot_count | integer | 可为 null |
jobs[].result.visual_mix | any | |
jobs[].result.qa | any | |
jobs[].result.brief | any | |
jobs[].result.workflow | string | 可为 null |
jobs[].result.routing | any | |
jobs[].result.input_required | object | Why 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_project | any | |
jobs[].requested_workflow必填 | string | |
jobs[].video_type | string | The video type within the workflow, e.g. project, when the request set one; 可为 null |
jobs[].style | string | The style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null |
jobs[].title | string | A short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null |
jobs[].profile_draft | string | profile_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_id | string | 可为 null |
data[].parent_id | string | 可为 null |
data[].status必填 | string | 可选值:queued running needs_input complete rejected failed cancelled |
data[].stage必填 | string | 可为 null |
data[].progress必填 | integer | 可为 null |
data[].error | string | 可为 null |
data[].created_at必填 | number | 可为 null |
data[].updated_at | number | 可为 null |
data[].started_at | number | 可为 null |
data[].finished_at | number | 可为 null |
data[].deleted_at | number | 可为 null |
data[].waited_s | number | GET /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_at | number | 可为 null |
data[].result | object | 可为 null |
data[].result.files | map<string, string> | Signed download links; present on GET once complete/rejected; 可为 null |
data[].result.duration | number | 可为 null |
data[].result.shot_count | integer | 可为 null |
data[].result.visual_mix | any | |
data[].result.qa | any | |
data[].result.brief | any | |
data[].result.workflow | string | 可为 null |
data[].result.routing | any | |
data[].result.input_required | object | Why 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_project | any | |
data[].requested_workflow必填 | string | |
data[].video_type | string | The video type within the workflow, e.g. project, when the request set one; 可为 null |
data[].style | string | The style the request chose (options.style, see GET /v1/styles); null: the default style; 可为 null |
data[].title | string | A short name for lists: the subject named in the brief (e.g. the project name) or the start of the prompt; 可为 null |
data[].profile_draft | string | profile_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"