FECINE / DEVELOPERS
Bảng điều khiển
FECINE OPEN API v1.1.0

Tài liệu API

Từ kịch bản đến phim hoàn chỉnh, kết nối quy trình sản xuất bằng FECINE.

01

Xác thực

Dùng khóa FECINE làm Bearer token. Không cần tài khoản để đọc tài liệu.

02

Tạo và chạy

Tạo tác phẩm, tải kịch bản và tư liệu lên, rồi thêm nhân vật, bối cảnh, đạo cụ và lưới ảnh. Tạo tập và cảnh, gắn tham chiếu rồi tạo video cho cảnh. Chọn một bản quay cho mỗi cảnh và xuất bản dựng cuối. Chờ tác vụ tạo hoàn tất và gửi revision mới nhất khi chỉnh sửa. Muốn dựng cấu trúc từ kịch bản đã tải lên, hãy chạy tác vụ dựng riêng.

03

Nhận kết quả

Kiểm tra trạng thái hoặc nhận Webhook. Dùng ID tài sản để lấy liên kết tải xuống có chữ ký.

Yêu cầu đầu tiên
curl -X GET 'https://YOUR_FECINE_HOST/api/v1/capabilities' \
  -H 'Authorization: Bearer YOUR_FECINE_API_KEY'
GET /api/v1/capabilities
REFERENCE

Tài liệu API

Lỗi FECINE. Cung cấp request_id khi liên hệ hỗ trợ.

Sao chép JSON rồi thay ID, URL và nội dung bằng giá trị thực tế.

Chức năng

GET/api/v1/capabilitiesXem những tính năng đang dùng được

Xem chức năng, mô hình, định dạng tải lên và giới hạn sản xuất của môi trường API hiện tại.

Quyền cần thiết: projects:read

Tham số

Không có tham số

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "studio_workflow": {
          "equivalent": false,
          "stages": [
            "script"
          ],
          "project_access": "read_only",
          "gaps": [
            "example"
          ]
        },
        "template_id": "example",
        "template_version": 1,
        "enabled": false,
        "stages": [
          "example"
        ],
        "output_profiles": [
          "example"
        ],
        "unsupported_reasons": [
          "example"
        ],
        "max_shots": 1,
        "max_episode_seconds": 1,
        "upload_mime_types": [
          "example"
        ],
        "max_upload_bytes": 1
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

Dự án và tài nguyên

GET/api/v1/worksXem danh sách dự án của bạn

Liệt kê tác phẩm có quyền truy cập. Lọc theo state và phân trang bằng cursor, limit.

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100
statequerystring—
  • Allowed values: active, archived

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "name": "example",
        "revision": 1,
        "state": "active",
        "created_at": "2026-09-20T00:00:00Z",
        "client_reference": "example"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/worksTạo dự án mới

Tạo tác phẩm với name đã nhập. Dùng ID trả về để thêm tư liệu và bắt đầu sản xuất.

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 80 characters
client_referencestring—
  • Maximum length: 128 characters
Yêu cầu đầu tiên · JSON
{
  "name": "example"
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "name": "example",
    "revision": 1,
    "state": "active",
    "created_at": "2026-09-20T00:00:00Z",
    "client_reference": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{project_id}Xem thông tin dự án

Lấy tên, trạng thái và revision hiện tại của tác phẩm trước khi sửa hoặc yêu cầu sản xuất.

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "name": "example",
    "revision": 1,
    "state": "active",
    "created_at": "2026-09-20T00:00:00Z",
    "client_reference": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{project_id}Sửa thông tin dự án

Đổi tên hoặc trạng thái active, archived của tác phẩm. Gửi ETag mới nhất trong If-Match.

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
If-Matchheaderstring*Dùng ETag mới nhất, bao gồm dấu ngoặc kép.

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
statestring—
  • Allowed values: active, archived
Yêu cầu đầu tiên · JSON
{}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "name": "example",
    "revision": 1,
    "state": "active",
    "created_at": "2026-09-20T00:00:00Z",
    "client_reference": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{project_id}/resourcesXem danh sách tư liệu đã tải lên

Liệt kê kịch bản, nhân vật, cảnh, đạo cụ, tập và shot trong tác phẩm. Chọn loại bằng kind.

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100
kindquerystring—
  • Allowed values: script, character, scene, prop, episode, shot

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "work_id": "11111111-1111-4111-8111-111111111111",
        "revision": 1,
        "content": {
          "kind": "script",
          "name": "example",
          "data": {
            "language": "example"
          }
        },
        "created_at": "2026-09-20T00:00:00Z"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/resourcesThêm tư liệu như kịch bản, hình ảnh

Thêm dữ liệu sản xuất như nội dung kịch bản hoặc shot bằng kind và data. Tải tệp qua /uploads.

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
kindstring*kind = script
  • Fixed value: script
namestring*kind = script
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = scriptChỉ cung cấp một trong text hoặc source_asset_id.
data.textstring—kind = script
  • Minimum length: 1 characters
  • Maximum length: 900000 characters
data.source_asset_idstring—kind = script
  • Format: UUID
data.languagestring*kind = script
  • Minimum length: 2 characters
  • Maximum length: 16 characters
kindstring*kind = character
  • Fixed value: character
namestring*kind = character
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = character
data.descriptionstring*kind = character
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = character
  • Default: []
  • Maximum items: 8 items
kindstring*kind = scene
  • Fixed value: scene
namestring*kind = scene
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = scene
data.descriptionstring*kind = scene
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = scene
  • Default: []
  • Maximum items: 8 items
kindstring*kind = prop
  • Fixed value: prop
namestring*kind = prop
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = prop
data.descriptionstring*kind = prop
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = prop
  • Default: []
  • Maximum items: 8 items
kindstring*kind = episode
  • Fixed value: episode
namestring*kind = episode
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = episode
data.script_resource_idstring*kind = episode
  • Format: UUID
data.sequenceinteger*kind = episode
  • Minimum: 1
  • Maximum: 100
data.raw_contentstring—kind = episode
  • Maximum length: 20000 characters
data.descriptionstring—kind = episode
  • Maximum length: 4000 characters
kindstring*kind = shot
  • Fixed value: shot
namestring*kind = shot
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = shot
data.episode_idstring*kind = shot
  • Format: UUID
data.scene_idstring—kind = shot
  • Format: UUID
data.character_idsarray—kind = shot
  • Default: []
  • Maximum items: 8 items
data.prop_idsarray—kind = shot
  • Default: []
  • Maximum items: 8 items
data.descriptionstring*kind = shot
  • Maximum length: 4000 characters
data.video_promptoneOf—kind = shot
data.sequenceinteger—kind = shot
  • Minimum: 1
  • Maximum: 100
data.duration_secondsinteger*kind = shot
  • Minimum: 1
  • Maximum: 60
data.selected_image_asset_idstring—kind = shot
  • Format: UUID
data.selected_video_asset_idstring—kind = shot
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "kind": "script",
  "name": "example",
  "data": {
    "language": "example"
  }
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "content": {
      "kind": "script",
      "name": "example",
      "data": {
        "language": "example"
      }
    },
    "created_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{project_id}/resources/{resource_id}Xem một tư liệu

Lấy loại, nội dung và revision của tư liệu được chỉ định bằng resource_id trong tác phẩm.

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
resource_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "content": {
      "kind": "script",
      "name": "example",
      "data": {
        "language": "example"
      }
    },
    "created_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{project_id}/resources/{resource_id}Sửa tư liệu

Cập nhật kind và data của tư liệu. Gửi ETag mới nhất trong If-Match để tránh xung đột chỉnh sửa.

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
resource_idpathstring*
  • Format: UUID
If-Matchheaderstring*Dùng ETag mới nhất, bao gồm dấu ngoặc kép.

Nội dung yêu cầu

TênTypeBắt buộcMô tả
kindstring*kind = script
  • Fixed value: script
namestring*kind = script
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = scriptChỉ cung cấp một trong text hoặc source_asset_id.
data.textstring—kind = script
  • Minimum length: 1 characters
  • Maximum length: 900000 characters
data.source_asset_idstring—kind = script
  • Format: UUID
data.languagestring*kind = script
  • Minimum length: 2 characters
  • Maximum length: 16 characters
kindstring*kind = character
  • Fixed value: character
namestring*kind = character
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = character
data.descriptionstring*kind = character
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = character
  • Default: []
  • Maximum items: 8 items
kindstring*kind = scene
  • Fixed value: scene
namestring*kind = scene
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = scene
data.descriptionstring*kind = scene
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = scene
  • Default: []
  • Maximum items: 8 items
kindstring*kind = prop
  • Fixed value: prop
namestring*kind = prop
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = prop
data.descriptionstring*kind = prop
  • Maximum length: 4000 characters
data.reference_asset_idsarray—kind = prop
  • Default: []
  • Maximum items: 8 items
kindstring*kind = episode
  • Fixed value: episode
namestring*kind = episode
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = episode
data.script_resource_idstring*kind = episode
  • Format: UUID
data.sequenceinteger*kind = episode
  • Minimum: 1
  • Maximum: 100
data.raw_contentstring—kind = episode
  • Maximum length: 20000 characters
data.descriptionstring—kind = episode
  • Maximum length: 4000 characters
kindstring*kind = shot
  • Fixed value: shot
namestring*kind = shot
  • Minimum length: 1 characters
  • Maximum length: 80 characters
dataobject*kind = shot
data.episode_idstring*kind = shot
  • Format: UUID
data.scene_idstring—kind = shot
  • Format: UUID
data.character_idsarray—kind = shot
  • Default: []
  • Maximum items: 8 items
data.prop_idsarray—kind = shot
  • Default: []
  • Maximum items: 8 items
data.descriptionstring*kind = shot
  • Maximum length: 4000 characters
data.video_promptoneOf—kind = shot
data.sequenceinteger—kind = shot
  • Minimum: 1
  • Maximum: 100
data.duration_secondsinteger*kind = shot
  • Minimum: 1
  • Maximum: 60
data.selected_image_asset_idstring—kind = shot
  • Format: UUID
data.selected_video_asset_idstring—kind = shot
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "kind": "script",
  "name": "example",
  "data": {
    "language": "example"
  }
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "content": {
      "kind": "script",
      "name": "example",
      "data": {
        "language": "example"
      }
    },
    "created_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{project_id}/workflowĐọc dữ liệu sản xuất Studio

Lấy kịch bản, tập, thiết kế, cảnh, tài sản, take, lựa chọn dựng phim và revision mới nhất trong một yêu cầu.

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "api_runs": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "state": "example",
        "created_at": "example",
        "completed_at": "example",
        "total_steps": 0,
        "completed_steps": 0,
        "error_code": "example"
      }
    ],
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example",
    "trash": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "entity_type": "asset",
        "name": "example",
        "deleted_at": "example"
      }
    ],
    "assets": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "name": "example",
        "kind": "example",
        "media_type": "example",
        "status": "example",
        "mime": "example",
        "lineage_id": "11111111-1111-4111-8111-111111111111",
        "version": 1,
        "is_current_version": false
      }
    ],
    "settings": {
      "title": "example",
      "tags": [
        "example"
      ],
      "cover": "example",
      "aspect": "example",
      "resolution": "example",
      "style": "example",
      "style_prompt": "example",
      "state": "example"
    },
    "script": {
      "text": "example",
      "logline": "example",
      "synopsis": "example"
    },
    "episodes": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "number": 1,
        "title": "example",
        "raw_content": "example",
        "description": "example"
      }
    ],
    "designs": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "kind": "character",
        "name": "example",
        "description": "example",
        "tags": [
          "example"
        ],
        "primary_asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "scenes": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "episode_id": "11111111-1111-4111-8111-111111111111",
        "number": 1,
        "heading": "example",
        "description": "example",
        "video_prompt": "example"
      }
    ],
    "scene_designs": [
      {
        "scene_id": "11111111-1111-4111-8111-111111111111",
        "design_id": "11111111-1111-4111-8111-111111111111",
        "kind": "example",
        "position": 1
      }
    ],
    "takes": [
      {
        "scene_id": "11111111-1111-4111-8111-111111111111",
        "asset_id": "11111111-1111-4111-8111-111111111111",
        "position": 1
      }
    ],
    "cut_selections": [
      {
        "scene_id": "11111111-1111-4111-8111-111111111111",
        "asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "design_assets": [
      {
        "design_id": "11111111-1111-4111-8111-111111111111",
        "asset_id": "11111111-1111-4111-8111-111111111111",
        "kind": "example",
        "name": "example",
        "position": 1
      }
    ]
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/script/analysesPhân tích kịch bản Studio

Phân tích kịch bản thành cấu trúc sản xuất. Gửi script_text để cập nhật trước khi phân tích, hoặc bỏ qua để dùng bản đã lưu. Theo dõi bằng getJob.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
modelstring—
  • Minimum length: 1 characters
  • Maximum length: 200 characters
script_textstring—
  • Minimum length: 1 characters
  • Maximum length: 5000000 characters
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/script/buildsXây dựng toàn bộ tác phẩm từ kịch bản

Gửi script_asset_ids đã xác minh và revision để dựng kịch bản, tham chiếu và storyboard. full_rebuild thay cấu trúc cũ. Tạo ảnh và video riêng. Tính phí token đầu vào và đầu ra thực tế được báo cáo theo cùng bảng giá Studio. Không cần đặt ngân sách tín dụng cho mỗi yêu cầu. GET /jobs/{job_id} → output_asset_ids.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
modelstring—
  • Minimum length: 1 characters
  • Maximum length: 200 characters
script_asset_idsarray—
  • Default: []
material_scopestring—
  • Allowed values: unclassified, all
  • Default: "unclassified"
preprocessobject—
preprocess.ignoreAttachmentsboolean—
  • Default: true
preprocess.discardKeywordsarray—
  • Default: ["提示词","prompt","Midjourney","Stable Diffusion","DALL-E","Image1","Image2","正向提示词","负向提示词","视觉描述","出图要求","技术规格","画面描述","镜头提示词","请生成","角色三视图","服装本体展示","局部材质与细节放大"]
  • Maximum items: 100 items
preprocess.keepLabelsarray—
  • Default: ["资产名称","资产ID","资产版本","关联角色资产名称","关联角色资产ID","关联场景资产名称","关联场景资产ID","关联道具资产名称","关联道具资产ID","服装变体ID","服装名称","道具资产ID","道具名称","场景资产ID","场景名称","宫格图ID","集数","主题","场景","角色名称","用途"]
  • Maximum items: 100 items
rebuild_policystring*
  • Fixed value: full_rebuild
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "rebuild_policy": "full_rebuild"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{project_id}/libraryLiệt kê tư liệu dùng chung

Liệt kê tài sản có thể nhập vào tác phẩm. scope=personal xem thư viện cá nhân; mặc định scope=studio xem thư viện chung.

Quyền cần thiết: assets:read

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
limitinteger—
  • Minimum: 1
  • Maximum: 100
cursorstring—
scopestring—
  • Allowed values: studio, personal

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "name": "example",
        "kind": "example",
        "media_type": "example",
        "mime": "example",
        "version": 1,
        "is_current_version": false
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/importsNhập tư liệu vào tác phẩm

Sao chép tài sản cá nhân hoặc dùng chung theo asset_id vào tác phẩm và trả về bản sao. Thay đổi nguồn sau đó không ảnh hưởng bản sao.

Quyền cần thiết: assets:write, assets:read, projects:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
asset_idstring*
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "asset_id": "11111111-1111-4111-8111-111111111111"
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "state": "pending",
    "mime_type": "example",
    "size_bytes": 0,
    "download_url": "example",
    "expires_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/script/draftsTạo bản thảo kịch bản

Gửi instructions, source_text tùy chọn, revision và max_output_tokens. Lưu kịch bản mới mà không ghi đè bản cũ. Tính phí token đầu vào và đầu ra thực tế được báo cáo theo cùng bảng giá Studio. Không cần đặt ngân sách tín dụng cho mỗi yêu cầu. GET /jobs/{job_id} → output_asset_ids.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
modelstring—
  • Minimum length: 1 characters
  • Maximum length: 200 characters
instructionsstring*
  • Minimum length: 1 characters
  • Maximum length: 8000 characters
source_textstring—
  • Maximum length: 50000 characters
max_output_tokensinteger—
  • Default: 2048
  • Minimum: 256
  • Maximum: 8192
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "instructions": "example"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/charactersNhân vật · Xem (list)

Nhân vật · Xem (list). GET /api/v1/works/{work_id}/characters. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "kind": "character",
        "name": "example",
        "description": "example",
        "tags": [
          "example"
        ],
        "primary_asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/charactersNhân vật · Tạo

Nhân vật · Tạo. POST /api/v1/works/{work_id}/characters. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/characters/{reference_id}Nhân vật · Xem

Nhân vật · Xem. GET /api/v1/works/{work_id}/characters/{reference_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "kind": "character",
    "name": "example",
    "description": "example",
    "tags": [
      "example"
    ],
    "primary_asset_id": "11111111-1111-4111-8111-111111111111"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/characters/{reference_id}Nhân vật · Sửa

Nhân vật · Sửa. PATCH /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/characters/{reference_id}Nhân vật · Xóa

Nhân vật · Xóa. DELETE /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/characters/{reference_id}/primary-imageNhân vật · Đặt ảnh tham chiếu

Nhân vật · Đặt ảnh tham chiếu. PUT /api/v1/works/{work_id}/characters/{reference_id}/primary-image. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
asset_idstring*
  • Format: UUID
current_asset_idoneOf*
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "asset_id": "11111111-1111-4111-8111-111111111111",
  "current_asset_id": "11111111-1111-4111-8111-111111111111",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/characters/{reference_id}/image-generationsNhân vật · Tạo ảnh tham chiếu

Nhân vật · Tạo ảnh tham chiếu. POST /api/v1/works/{work_id}/characters/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
variantsinteger—
  • Default: 1
  • Minimum: 1
  • Maximum: 4
modelstring—
  • Default: "image-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 20000 characters
aspect_ratiostring—
image_sizestring—
  • Maximum length: 40 characters
qualitystring—
  • Allowed values: low, medium, high
backgroundstring—
  • Allowed values: auto, opaque, transparent
output_formatstring—
  • Allowed values: png, jpeg
reference_asset_idsarray—
  • Default: []
  • Maximum items: 16 items
slotstring—
  • Allowed values: primary, variant
  • Default: "primary"
variant_namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
current_asset_idstring—
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}Nhân vật · Gắn vào cảnh

Nhân vật · Gắn vào cảnh. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}Nhân vật · Gỡ khỏi cảnh

Nhân vật · Gỡ khỏi cảnh. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/background-scenesBối cảnh · Xem (list)

Bối cảnh · Xem (list). GET /api/v1/works/{work_id}/background-scenes. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "kind": "character",
        "name": "example",
        "description": "example",
        "tags": [
          "example"
        ],
        "primary_asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/background-scenesBối cảnh · Tạo

Bối cảnh · Tạo. POST /api/v1/works/{work_id}/background-scenes. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/background-scenes/{reference_id}Bối cảnh · Xem

Bối cảnh · Xem. GET /api/v1/works/{work_id}/background-scenes/{reference_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "kind": "character",
    "name": "example",
    "description": "example",
    "tags": [
      "example"
    ],
    "primary_asset_id": "11111111-1111-4111-8111-111111111111"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/background-scenes/{reference_id}Bối cảnh · Sửa

Bối cảnh · Sửa. PATCH /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/background-scenes/{reference_id}Bối cảnh · Xóa

Bối cảnh · Xóa. DELETE /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/background-scenes/{reference_id}/primary-imageBối cảnh · Đặt ảnh tham chiếu

Bối cảnh · Đặt ảnh tham chiếu. PUT /api/v1/works/{work_id}/background-scenes/{reference_id}/primary-image. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
asset_idstring*
  • Format: UUID
current_asset_idoneOf*
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "asset_id": "11111111-1111-4111-8111-111111111111",
  "current_asset_id": "11111111-1111-4111-8111-111111111111",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/background-scenes/{reference_id}/image-generationsBối cảnh · Tạo ảnh tham chiếu

Bối cảnh · Tạo ảnh tham chiếu. POST /api/v1/works/{work_id}/background-scenes/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
variantsinteger—
  • Default: 1
  • Minimum: 1
  • Maximum: 4
modelstring—
  • Default: "image-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 20000 characters
aspect_ratiostring—
image_sizestring—
  • Maximum length: 40 characters
qualitystring—
  • Allowed values: low, medium, high
backgroundstring—
  • Allowed values: auto, opaque, transparent
output_formatstring—
  • Allowed values: png, jpeg
reference_asset_idsarray—
  • Default: []
  • Maximum items: 16 items
slotstring—
  • Allowed values: primary, variant
  • Default: "primary"
variant_namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
current_asset_idstring—
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}Bối cảnh · Gắn vào cảnh

Bối cảnh · Gắn vào cảnh. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}Bối cảnh · Gỡ khỏi cảnh

Bối cảnh · Gỡ khỏi cảnh. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/propsĐạo cụ · Xem (list)

Đạo cụ · Xem (list). GET /api/v1/works/{work_id}/props. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "kind": "character",
        "name": "example",
        "description": "example",
        "tags": [
          "example"
        ],
        "primary_asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/propsĐạo cụ · Tạo

Đạo cụ · Tạo. POST /api/v1/works/{work_id}/props. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/props/{reference_id}Đạo cụ · Xem

Đạo cụ · Xem. GET /api/v1/works/{work_id}/props/{reference_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "kind": "character",
    "name": "example",
    "description": "example",
    "tags": [
      "example"
    ],
    "primary_asset_id": "11111111-1111-4111-8111-111111111111"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/props/{reference_id}Đạo cụ · Sửa

Đạo cụ · Sửa. PATCH /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/props/{reference_id}Đạo cụ · Xóa

Đạo cụ · Xóa. DELETE /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/props/{reference_id}/primary-imageĐạo cụ · Đặt ảnh tham chiếu

Đạo cụ · Đặt ảnh tham chiếu. PUT /api/v1/works/{work_id}/props/{reference_id}/primary-image. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
asset_idstring*
  • Format: UUID
current_asset_idoneOf*
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "asset_id": "11111111-1111-4111-8111-111111111111",
  "current_asset_id": "11111111-1111-4111-8111-111111111111",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/props/{reference_id}/image-generationsĐạo cụ · Tạo ảnh tham chiếu

Đạo cụ · Tạo ảnh tham chiếu. POST /api/v1/works/{work_id}/props/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
variantsinteger—
  • Default: 1
  • Minimum: 1
  • Maximum: 4
modelstring—
  • Default: "image-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 20000 characters
aspect_ratiostring—
image_sizestring—
  • Maximum length: 40 characters
qualitystring—
  • Allowed values: low, medium, high
backgroundstring—
  • Allowed values: auto, opaque, transparent
output_formatstring—
  • Allowed values: png, jpeg
reference_asset_idsarray—
  • Default: []
  • Maximum items: 16 items
slotstring—
  • Allowed values: primary, variant
  • Default: "primary"
variant_namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
current_asset_idstring—
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}Đạo cụ · Gắn vào cảnh

Đạo cụ · Gắn vào cảnh. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}Đạo cụ · Gỡ khỏi cảnh

Đạo cụ · Gỡ khỏi cảnh. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/gridsLưới · Xem (list)

Lưới · Xem (list). GET /api/v1/works/{work_id}/grids. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "kind": "character",
        "name": "example",
        "description": "example",
        "tags": [
          "example"
        ],
        "primary_asset_id": "11111111-1111-4111-8111-111111111111"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/gridsLưới · Tạo

Lưới · Tạo. POST /api/v1/works/{work_id}/grids. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/grids/{reference_id}Lưới · Xem

Lưới · Xem. GET /api/v1/works/{work_id}/grids/{reference_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "kind": "character",
    "name": "example",
    "description": "example",
    "tags": [
      "example"
    ],
    "primary_asset_id": "11111111-1111-4111-8111-111111111111"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/grids/{reference_id}Lưới · Sửa

Lưới · Sửa. PATCH /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
namestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
descriptionstring—
  • Maximum length: 4000 characters
tagsarray—
  • Maximum items: 8 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "name": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/grids/{reference_id}Lưới · Xóa

Lưới · Xóa. DELETE /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/grids/{reference_id}/primary-imageLưới · Đặt ảnh tham chiếu

Lưới · Đặt ảnh tham chiếu. PUT /api/v1/works/{work_id}/grids/{reference_id}/primary-image. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
asset_idstring*
  • Format: UUID
current_asset_idoneOf*
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "asset_id": "11111111-1111-4111-8111-111111111111",
  "current_asset_id": "11111111-1111-4111-8111-111111111111",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/grids/{reference_id}/image-generationsLưới · Tạo ảnh tham chiếu

Lưới · Tạo ảnh tham chiếu. POST /api/v1/works/{work_id}/grids/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
variantsinteger—
  • Default: 1
  • Minimum: 1
  • Maximum: 4
modelstring—
  • Default: "image-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 20000 characters
aspect_ratiostring—
image_sizestring—
  • Maximum length: 40 characters
qualitystring—
  • Allowed values: low, medium, high
backgroundstring—
  • Allowed values: auto, opaque, transparent
output_formatstring—
  • Allowed values: png, jpeg
reference_asset_idsarray—
  • Default: []
  • Maximum items: 16 items
slotstring—
  • Allowed values: primary, variant
  • Default: "primary"
variant_namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
current_asset_idstring—
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}Lưới · Gắn vào cảnh

Lưới · Gắn vào cảnh. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}Lưới · Gỡ khỏi cảnh

Lưới · Gỡ khỏi cảnh. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
reference_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/episodesTập · Xem (list)

Tập · Xem (list). GET /api/v1/works/{work_id}/episodes. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "number": 1,
        "title": "example",
        "raw_content": "example",
        "description": "example"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/episodesTạo tập

Tạo tập. POST /api/v1/works/{work_id}/episodes. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
titlestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
numberinteger—
raw_contentstring—
  • Maximum length: 20000 characters
descriptionstring—
  • Maximum length: 4000 characters
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "title": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/episodes/{episode_id}Tập · Xem

Tập · Xem. GET /api/v1/works/{work_id}/episodes/{episode_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "number": 1,
    "title": "example",
    "raw_content": "example",
    "description": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/episodes/{episode_id}Tập · Sửa

Tập · Sửa. PATCH /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
titlestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
numberinteger—
raw_contentstring—
  • Maximum length: 20000 characters
descriptionstring—
  • Maximum length: 4000 characters
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "title": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/episodes/{episode_id}Tập · Xóa

Tập · Xóa. DELETE /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/episodes/{episode_id}/scenesCảnh · Xem (list)

Cảnh · Xem (list). GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "episode_id": "11111111-1111-4111-8111-111111111111",
        "number": 1,
        "heading": "example",
        "description": "example",
        "video_prompt": "example"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/episodes/{episode_id}/scenesTạo cảnh

Tạo cảnh. POST /api/v1/works/{work_id}/episodes/{episode_id}/scenes. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
headingstring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
numberinteger—
descriptionstring—
  • Maximum length: 4000 characters
video_promptoneOf—
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "heading": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}Cảnh · Xem

Cảnh · Xem. GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. GET

Quyền cần thiết: projects:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "episode_id": "11111111-1111-4111-8111-111111111111",
    "number": 1,
    "heading": "example",
    "description": "example",
    "video_prompt": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}Cảnh · Sửa

Cảnh · Sửa. PATCH /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
headingstring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
numberinteger—
descriptionstring—
  • Maximum length: 4000 characters
video_promptoneOf—
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "heading": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/archive-importsNhập tệp ZIP

Nhập tệp ZIP. POST /api/v1/works/{work_id}/archive-imports. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. Idempotency-Key; GET /api/v1/works/{work_id}/archive-imports/{import_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
asset_idstring*
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "asset_id": "11111111-1111-4111-8111-111111111111"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "progress": {
      "phase": "extracting",
      "current": 0,
      "total": 0
    },
    "imported": 0,
    "failed": 0,
    "asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/works/{work_id}/archive-imports/{import_id}Xem tiến độ nhập ZIP

Xem tiến độ nhập ZIP. GET /api/v1/works/{work_id}/archive-imports/{import_id}. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. jobs:read

Quyền cần thiết: jobs:read

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
import_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "progress": {
      "phase": "extracting",
      "current": 0,
      "total": 0
    },
    "imported": 0,
    "failed": 0,
    "asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/uploadsChuẩn bị tải nhiều tệp

Chuẩn bị tải nhiều tệp. POST /api/v1/works/{work_id}/uploads. Idempotency-Key + files (1–20) → PUT upload_url → POST /api/v1/uploads/{upload_id}/complete

Quyền cần thiết: assets:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
filesarray*
  • Maximum items: 20 items
files[].filenamestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
files[].mime_typestring*
  • Allowed values: text/plain, text/markdown, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/png, image/jpeg, image/webp, image/avif, audio/wav, application/zip
files[].size_bytesinteger*
  • Maximum: 1073741824
files[].sha256string*
Yêu cầu đầu tiên · JSON
{
  "files": [
    {
      "filename": "example",
      "mime_type": "text/plain",
      "size_bytes": 1,
      "sha256": "example"
    }
  ]
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "items": [
      {
        "filename": "example",
        "ticket": {
          "id": "11111111-1111-4111-8111-111111111111",
          "asset_id": "11111111-1111-4111-8111-111111111111",
          "upload_url": "example",
          "method": "PUT",
          "content_type": "example",
          "expires_at": "2026-09-20T00:00:00Z"
        }
      }
    ]
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

DELETE/api/v1/works/{work_id}/scenes/{scene_id}Cảnh · Xóa

Cảnh · Xóa. DELETE /api/v1/works/{work_id}/scenes/{scene_id}. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/episodes/{episode_id}/scene-orderSắp xếp cảnh

Sắp xếp cảnh. PUT /api/v1/works/{work_id}/episodes/{episode_id}/scene-order. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
episode_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
scene_idsarray*
  • Maximum items: 500 items
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "scene_ids": [
    "11111111-1111-4111-8111-111111111111"
  ],
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scriptLưu kịch bản

Lưu kịch bản. PUT /api/v1/works/{work_id}/script. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
textstring*
  • Maximum length: 5000000 characters
revisioninteger*
Yêu cầu đầu tiên · JSON
{
  "text": "example",
  "revision": 1
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/scenes/{scene_id}/video-generationsTạo video cảnh

Tạo video cảnh. POST /api/v1/works/{work_id}/scenes/{scene_id}/video-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
anchor_asset_idstring—
  • Format: UUID
reference_asset_idsarray—
  • Maximum items: 12 items
modelstring—
  • Default: "video-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 10000 characters
duration_secondsinteger*
  • Minimum: 1
  • Maximum: 60
resolutionstring*
  • Minimum length: 1 characters
  • Maximum length: 20 characters
aspect_ratiostring*
  • Minimum length: 1 characters
  • Maximum length: 20 characters
generate_audioboolean—
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "duration_seconds": 1,
  "resolution": "example",
  "aspect_ratio": "example"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/works/{work_id}/scenes/{scene_id}/selected-takeChọn bản quay cuối

Chọn bản quay cuối. PUT /api/v1/works/{work_id}/scenes/{scene_id}/selected-take. revision + Idempotency-Key

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
scene_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
take_idoneOf*
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "take_id": "11111111-1111-4111-8111-111111111111"
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{work_id}/exportsXuất video cuối

Xuất video cuối. POST /api/v1/works/{work_id}/exports. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
work_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
allow_partialboolean—
  • Default: true
selectionsarray—
  • Maximum items: 200 items
selections[].scene_idstring*
  • Format: UUID
selections[].asset_idstring*
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

API t?ch h?p c?
POST/api/v1/works/{project_id}/plansXem kế hoạch và số tín dụng dự kiến

Xem trước sẽ sản xuất những gì và tốn bao nhiêu tín dụng mà chưa bắt đầu sản xuất thật.

Quyền cần thiết: runs:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
template_idstring*
  • Fixed value: episode-production
template_versionnumber*
  • Fixed value: 1
project_revisioninteger*
episode_idsarray*ID tập không được trùng lặp.
  • Maximum items: 10 items
modestring*
  • Allowed values: reviewed, automatic
output_profilestring*
  • Allowed values: sandbox-episode-v1, episode-standard-v1
Yêu cầu đầu tiên · JSON
{
  "template_id": "episode-production",
  "template_version": 1,
  "project_revision": 1,
  "episode_ids": [
    "11111111-1111-4111-8111-111111111111"
  ],
  "mode": "reviewed",
  "output_profile": "sandbox-episode-v1"
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "project_revision": 1,
    "template_id": "example",
    "template_version": 1,
    "executable": false,
    "expires_at": "2026-09-20T00:00:00Z",
    "budget_ceiling": {
      "currency": "example",
      "micro_units": "example"
    },
    "steps": [
      {
        "stage_key": "example",
        "target_ids": [
          "11111111-1111-4111-8111-111111111111"
        ],
        "depends_on": [
          "example"
        ],
        "requires_review": false,
        "max_cost": {
          "currency": "example",
          "micro_units": "example"
        }
      }
    ],
    "unsupported_reasons": [
      "example"
    ]
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/runsBắt đầu sản xuất

Bắt đầu sản xuất theo plan_id đã tạo và trả về ID lượt chạy. Theo dõi trạng thái, kết quả bằng getRun.

Quyền cần thiết: runs:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
plan_idstring*
  • Format: UUID
client_referencestring—
  • Maximum length: 128 characters
Yêu cầu đầu tiên · JSON
{
  "plan_id": "11111111-1111-4111-8111-111111111111"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "plan_id": "11111111-1111-4111-8111-111111111111",
    "version": 1,
    "state": "queued",
    "client_reference": "example",
    "created_at": "2026-09-20T00:00:00Z",
    "completed_at": "2026-09-20T00:00:00Z",
    "budget_remaining": {
      "currency": "example",
      "micro_units": "example"
    },
    "committed_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "unresolved_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ]
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/workflow/commandsChỉnh sửa sản xuất Studio

Sửa dữ liệu sản xuất như kịch bản, cảnh, thiết kế hoặc take đã chọn. Chọn operation và gửi input cùng revision mới nhất.

Quyền cần thiết: projects:write

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*operation = design.asset.set
operationstring*operation = design.asset.set
  • Fixed value: design.asset.set
inputobject*operation = design.asset.set
input.idstring*operation = design.asset.set
  • Format: UUID
input.asset_idstring*operation = design.asset.set
  • Format: UUID
input.kindstring*operation = design.asset.set
  • Allowed values: primary, variant
input.current_asset_idoneOf*operation = design.asset.set
input.namestring—operation = design.asset.set
  • Minimum length: 1 characters
  • Maximum length: 80 characters
revisioninteger*operation = asset.delete
operationstring*operation = asset.delete
  • Fixed value: asset.delete
inputobject*operation = asset.delete
input.idstring*operation = asset.delete
  • Format: UUID
revisioninteger*operation = trash.restore
operationstring*operation = trash.restore
  • Fixed value: trash.restore
inputobject*operation = trash.restore
input.idstring*operation = trash.restore
  • Format: UUID
input.entity_typestring*operation = trash.restore
  • Allowed values: asset, design
revisioninteger*operation = scene.duplicate
operationstring*operation = scene.duplicate
  • Fixed value: scene.duplicate
inputobject*operation = scene.duplicate
input.idstring*operation = scene.duplicate
  • Format: UUID
revisioninteger*operation = project.settings.update
operationstring*operation = project.settings.update
  • Fixed value: project.settings.update
inputobject*operation = project.settings.update
input.titlestring*operation = project.settings.update
  • Minimum length: 1 characters
  • Maximum length: 120 characters
input.tagsarray*operation = project.settings.update
  • Maximum items: 8 items
input.coverstring*operation = project.settings.update
  • Allowed values: amber, indigo, teal, rust, moss, ink, sage, bone, wine, wash, blush, void
input.aspectstring*operation = project.settings.update
  • Allowed values: 16:9, 9:16, 1:1, 4:3, 21:9
input.resolutionstring*operation = project.settings.update
  • Allowed values: 480p, 720p, 1080p, 2k
input.stylestring*operation = project.settings.update
  • Allowed values: realistic_general, realistic_urban, realistic_cinematic, 2d_japanese_manga, 2d_korean_urban, 2d_korean, 2d_otome, 2d_chinese_manga, 2d_classical, 3d_chinese, 3d_xianxia, 3d_cartoon, cg_general, cg_cyberpunk, ink_gongbi, custom
input.style_promptstring*operation = project.settings.update
  • Maximum length: 1000 characters
revisioninteger*operation = project.rename
operationstring*operation = project.rename
  • Fixed value: project.rename
inputobject*operation = project.rename
input.titlestring*operation = project.rename
  • Minimum length: 1 characters
  • Maximum length: 120 characters
revisioninteger*operation = project.state.set
operationstring*operation = project.state.set
  • Fixed value: project.state.set
inputobject*operation = project.state.set
input.statestring*operation = project.state.set
  • Allowed values: active, archived
revisioninteger*operation = script.update
operationstring*operation = script.update
  • Fixed value: script.update
inputobject*operation = script.update
input.textstring*operation = script.update
  • Maximum length: 5000000 characters
revisioninteger*operation = script.bible.update
operationstring*operation = script.bible.update
  • Fixed value: script.bible.update
inputobject*operation = script.bible.update
input.loglinestring*operation = script.bible.update
  • Maximum length: 500 characters
input.synopsisstring*operation = script.bible.update
  • Maximum length: 4000 characters
revisioninteger*operation = episode.save
operationstring*operation = episode.save
  • Fixed value: episode.save
inputobject*operation = episode.save
input.idstring—operation = episode.save
  • Format: UUID
input.titlestring*operation = episode.save
  • Minimum length: 1 characters
  • Maximum length: 200 characters
input.numberinteger—operation = episode.save
input.raw_contentstring—operation = episode.save
  • Maximum length: 20000 characters
input.descriptionstring—operation = episode.save
  • Maximum length: 4000 characters
revisioninteger*operation = episode.delete
operationstring*operation = episode.delete
  • Fixed value: episode.delete
inputobject*operation = episode.delete
input.idstring*operation = episode.delete
  • Format: UUID
revisioninteger*operation = scene.save
operationstring*operation = scene.save
  • Fixed value: scene.save
inputobject*operation = scene.save
input.idstring—operation = scene.save
  • Format: UUID
input.episode_idstring*operation = scene.save
  • Format: UUID
input.headingstring*operation = scene.save
  • Minimum length: 1 characters
  • Maximum length: 200 characters
input.numberinteger—operation = scene.save
input.descriptionstring—operation = scene.save
  • Maximum length: 4000 characters
input.video_promptoneOf—operation = scene.save
revisioninteger*operation = scene.delete
operationstring*operation = scene.delete
  • Fixed value: scene.delete
inputobject*operation = scene.delete
input.idstring*operation = scene.delete
  • Format: UUID
revisioninteger*operation = scene.reorder
operationstring*operation = scene.reorder
  • Fixed value: scene.reorder
inputobject*operation = scene.reorder
input.episode_idstring*operation = scene.reorder
  • Format: UUID
input.scene_idsarray*operation = scene.reorder
  • Maximum items: 500 items
revisioninteger*operation = design.save
operationstring*operation = design.save
  • Fixed value: design.save
inputobject*operation = design.save
input.idstring—operation = design.save
  • Format: UUID
input.kindstring*operation = design.save
  • Allowed values: character, scene, prop, grid
input.namestring*operation = design.save
  • Minimum length: 1 characters
  • Maximum length: 200 characters
input.descriptionstring—operation = design.save
  • Maximum length: 4000 characters
input.tagsarray—operation = design.save
  • Maximum items: 8 items
revisioninteger*operation = design.delete
operationstring*operation = design.delete
  • Fixed value: design.delete
inputobject*operation = design.delete
input.idstring*operation = design.delete
  • Format: UUID
revisioninteger*operation = design.voice.set
operationstring*operation = design.voice.set
  • Fixed value: design.voice.set
inputobject*operation = design.voice.set
input.idstring*operation = design.voice.set
  • Format: UUID
input.asset_idoneOf*operation = design.voice.set
revisioninteger*operation = design.asset.detach
operationstring*operation = design.asset.detach
  • Fixed value: design.asset.detach
inputobject*operation = design.asset.detach
input.idstring*operation = design.asset.detach
  • Format: UUID
input.asset_idstring*operation = design.asset.detach
  • Format: UUID
input.kindstring*operation = design.asset.detach
  • Allowed values: primary, variant, voice
revisioninteger*operation = design.asset.restore
operationstring*operation = design.asset.restore
  • Fixed value: design.asset.restore
inputobject*operation = design.asset.restore
input.idstring*operation = design.asset.restore
  • Format: UUID
input.current_asset_idstring*operation = design.asset.restore
  • Format: UUID
input.restore_asset_idstring*operation = design.asset.restore
  • Format: UUID
input.kindstring*operation = design.asset.restore
  • Allowed values: primary, variant
revisioninteger*operation = design.variant.rename
operationstring*operation = design.variant.rename
  • Fixed value: design.variant.rename
inputobject*operation = design.variant.rename
input.idstring*operation = design.variant.rename
  • Format: UUID
input.asset_idstring*operation = design.variant.rename
  • Format: UUID
input.namestring*operation = design.variant.rename
  • Minimum length: 1 characters
  • Maximum length: 80 characters
revisioninteger*operation = scene.design.attach
operationstring*operation = scene.design.attach
  • Fixed value: scene.design.attach
inputobject*operation = scene.design.attach
input.scene_idstring*operation = scene.design.attach
  • Format: UUID
input.design_idstring*operation = scene.design.attach
  • Format: UUID
revisioninteger*operation = scene.design.detach
operationstring*operation = scene.design.detach
  • Fixed value: scene.design.detach
inputobject*operation = scene.design.detach
input.scene_idstring*operation = scene.design.detach
  • Format: UUID
input.design_idstring*operation = scene.design.detach
  • Format: UUID
revisioninteger*operation = cut.take.select
operationstring*operation = cut.take.select
  • Fixed value: cut.take.select
inputobject*operation = cut.take.select
input.scene_idstring*operation = cut.take.select
  • Format: UUID
input.asset_idoneOf*operation = cut.take.select
revisioninteger*operation = take.delete
operationstring*operation = take.delete
  • Fixed value: take.delete
inputobject*operation = take.delete
input.scene_idstring*operation = take.delete
  • Format: UUID
input.asset_idstring*operation = take.delete
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "operation": "design.asset.set",
  "input": {
    "id": "11111111-1111-4111-8111-111111111111",
    "asset_id": "11111111-1111-4111-8111-111111111111",
    "kind": "primary",
    "current_asset_id": "11111111-1111-4111-8111-111111111111"
  }
}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "work_id": "11111111-1111-4111-8111-111111111111",
    "changed_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "studio_url": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/cut/exportsXuất bản dựng Studio

Ghép video theo thứ tự tập và cảnh. Chọn take bằng selections và cho phép thiếu cảnh bằng allow_partial. Theo dõi xuất bằng getJob.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
allow_partialboolean—
  • Default: true
selectionsarray—
  • Maximum items: 200 items
selections[].scene_idstring*
  • Format: UUID
selections[].asset_idstring*
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/storyboard/videosTạo video cảnh storyboard

Tạo video cho scene_id theo mô hình, thời lượng và độ phân giải đã chọn. Có thể dùng anchor_asset_id để chọn ảnh đầu. Theo dõi bằng getJob.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
scene_idstring*
  • Format: UUID
anchor_asset_idstring—
  • Format: UUID
reference_asset_idsarray—
  • Maximum items: 12 items
modelstring—
  • Default: "video-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 10000 characters
duration_secondsinteger*
  • Minimum: 1
  • Maximum: 60
resolutionstring*
  • Minimum length: 1 characters
  • Maximum length: 20 characters
aspect_ratiostring*
  • Minimum length: 1 characters
  • Maximum length: 20 characters
generate_audioboolean—
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "scene_id": "11111111-1111-4111-8111-111111111111",
  "duration_seconds": 1,
  "resolution": "example",
  "aspect_ratio": "example"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/works/{project_id}/designs/imagesTạo ảnh nhân vật, bối cảnh, đạo cụ hoặc lưới

Tạo 1–4 ảnh cho design_id bằng prompt và ảnh tham chiếu tùy chọn. Chọn vị trí ảnh chính hoặc biến thể, theo dõi bằng getJob.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
project_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
revisioninteger*
design_idstring*
  • Format: UUID
variantsinteger—
  • Default: 1
  • Minimum: 1
  • Maximum: 4
modelstring—
  • Default: "image-standard"
  • Minimum length: 1 characters
  • Maximum length: 200 characters
promptstring—
  • Minimum length: 1 characters
  • Maximum length: 20000 characters
aspect_ratiostring—
image_sizestring—
  • Maximum length: 40 characters
qualitystring—
  • Allowed values: low, medium, high
backgroundstring—
  • Allowed values: auto, opaque, transparent
output_formatstring—
  • Allowed values: png, jpeg
reference_asset_idsarray—
  • Default: []
  • Maximum items: 16 items
slotstring—
  • Allowed values: primary, variant
  • Default: "primary"
variant_namestring—
  • Minimum length: 1 characters
  • Maximum length: 80 characters
current_asset_idstring—
  • Format: UUID
Yêu cầu đầu tiên · JSON
{
  "revision": 1,
  "design_id": "11111111-1111-4111-8111-111111111111"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

Tải lên

POST/api/v1/uploadsNhận địa chỉ để tải tệp lên

Đăng ký thông tin tệp và nhận upload_url. PUT nội dung vào URL đó rồi gọi API hoàn tất tải lên. Hỗ trợ TXT, Markdown, DOCX, PNG, JPEG, WebP, AVIF, WAV và ZIP. Giới hạn dùng chung với Studio: xem upload_limits từ GET /capabilities. Kịch bản tối đa 5.000.000 ký tự. Tên tệp không chứa dấu phân cách đường dẫn. WAV dùng PCM hoặc IEEE float.

Quyền cần thiết: assets:write

Tham số

TênTypeBắt buộcMô tả
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
project_idstring*
  • Format: UUID
filenamestring*
  • Minimum length: 1 characters
  • Maximum length: 200 characters
mime_typestring*
  • Allowed values: text/plain, text/markdown, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/png, image/jpeg, image/webp, image/avif, audio/wav, application/zip
size_bytesinteger*
  • Maximum: 1073741824
sha256string*
Yêu cầu đầu tiên · JSON
{
  "project_id": "11111111-1111-4111-8111-111111111111",
  "filename": "example",
  "mime_type": "text/plain",
  "size_bytes": 1,
  "sha256": "example"
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "asset_id": "11111111-1111-4111-8111-111111111111",
    "upload_url": "example",
    "method": "PUT",
    "content_type": "example",
    "expires_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/uploads/{upload_id}/completeBáo là đã tải tệp xong

Kiểm tra tệp đã tải lên theo thông tin đăng ký và trả về tài sản có thể dùng trong sản xuất.

Quyền cần thiết: assets:write

Tham số

TênTypeBắt buộcMô tả
upload_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

Yêu cầu đầu tiên · JSON
{}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "state": "pending",
    "mime_type": "example",
    "size_bytes": 0,
    "download_url": "example",
    "expires_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PUT/api/v1/uploads/{upload_id}/contentTải nội dung tệp lên

Gửi dữ liệu tệp dạng application/octet-stream theo phiếu tải lên đã cấp. Gọi completeUpload sau khi gửi thành công.

Quyền cần thiết: assets:write

Tham số

TênTypeBắt buộcMô tả
upload_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "uploaded": true
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

Tài sản và kết quả

GET/api/v1/assets/{asset_id}Xem thông tin thành phẩm và liên kết tải về

Lấy thông tin tài sản và download_url có chữ ký khi khả dụng. Tải tệp trước khi liên kết hết hạn.

Quyền cần thiết: assets:read

Tham số

TênTypeBắt buộcMô tả
asset_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "state": "pending",
    "mime_type": "example",
    "size_bytes": 0,
    "download_url": "example",
    "expires_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/downloads/{asset_id}Tải tệp đã hoàn thành

Tải tệp bằng toàn bộ download_url có chữ ký từ getAsset. Liên kết hết hạn sau năm phút.

Tham số

TênTypeBắt buộcMô tả
asset_idpathstring*
  • Format: UUID
expiresquerystring*
signaturequerystring*

Phản hồi

HTTP 200 Byte của tệp

application/octet-stream · Byte của tệp

Phản hồi lỗi · error.code ↗

Thử gọi

Lượt chạy

GET/api/v1/runsXem danh sách lần sản xuất

Liệt kê lượt sản xuất, lọc theo tác phẩm, trạng thái, client_reference và khoảng thời gian.

Quyền cần thiết: runs:read

Tham số

TênTypeBắt buộcMô tả
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100
project_idquerystring—
  • Format: UUID
statequerystring—
  • Allowed values: queued, running, awaiting_review, stopping, paused, needs_attention, partially_succeeded, succeeded, failed, cancelled
client_referencequerystring—
  • Minimum length: 1 characters
  • Maximum length: 128 characters
fromquerystring—
  • Format: Date and time with timezone
toquerystring—
  • Format: Date and time with timezone

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "work_id": "11111111-1111-4111-8111-111111111111",
        "plan_id": "11111111-1111-4111-8111-111111111111",
        "version": 1,
        "state": "queued",
        "client_reference": "example",
        "created_at": "2026-09-20T00:00:00Z",
        "completed_at": "2026-09-20T00:00:00Z",
        "budget_remaining": {
          "currency": "example",
          "micro_units": "example"
        },
        "committed_cost": {
          "currency": "example",
          "micro_units": "example"
        },
        "unresolved_cost": {
          "currency": "example",
          "micro_units": "example"
        },
        "output_asset_ids": [
          "11111111-1111-4111-8111-111111111111"
        ]
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/runs/{run_id}Xem tiến độ sản xuất

Lấy trạng thái, phiên bản và kết quả hiện có của lượt sản xuất. Dùng phiên bản này khi gửi quyết định.

Quyền cần thiết: runs:read

Tham số

TênTypeBắt buộcMô tả
run_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "plan_id": "11111111-1111-4111-8111-111111111111",
    "version": 1,
    "state": "queued",
    "client_reference": "example",
    "created_at": "2026-09-20T00:00:00Z",
    "completed_at": "2026-09-20T00:00:00Z",
    "budget_remaining": {
      "currency": "example",
      "micro_units": "example"
    },
    "committed_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "unresolved_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ]
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/runs/{run_id}/stepsXem tiến độ theo từng bước

Liệt kê các bước và trạng thái để biết giai đoạn nào đang chờ, đang chạy hoặc đã hoàn tất.

Quyền cần thiết: runs:read

Tham số

TênTypeBắt buộcMô tả
run_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "run_id": "11111111-1111-4111-8111-111111111111",
        "stage_key": "example",
        "target_id": "11111111-1111-4111-8111-111111111111",
        "job_id": "11111111-1111-4111-8111-111111111111",
        "state": "blocked",
        "output_asset_ids": [
          "11111111-1111-4111-8111-111111111111"
        ],
        "error_code": "example",
        "ordinal": 1
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/runs/{run_id}/eventsXem nhật ký trong quá trình sản xuất

Xem sự kiện như thay đổi trạng thái và yêu cầu duyệt để theo dõi quá trình sản xuất.

Quyền cần thiết: runs:read

Tham số

TênTypeBắt buộcMô tả
run_idpathstring*
  • Format: UUID
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "event_id": "11111111-1111-4111-8111-111111111111",
        "run_id": "11111111-1111-4111-8111-111111111111",
        "sequence": 1,
        "type": "run.state_changed",
        "state": "queued",
        "step_id": "11111111-1111-4111-8111-111111111111",
        "created_at": "2026-09-20T00:00:00Z"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/runs/{run_id}/decisionsDuyệt tiếp hoặc dừng lại

Gửi quyết định approve, stop, resume, cancel_remaining hoặc retry_result cho lượt chạy. Gửi phiên bản mới nhất trong expected_version. retry_result chỉ tiếp tục kiểm tra kết quả tác vụ video đã lưu. Gửi expected_version mới nhất và step_id. Giữ tác vụ và tín dụng đã giữ, không tạo lại. Chỉ hỗ trợ video có thể khôi phục trong 24 giờ từ khi tiếp nhận. Kết quả hoặc mức sử dụng chưa rõ khác cần người vận hành kiểm tra.

Quyền cần thiết: runs:write

Tham số

TênTypeBắt buộcMô tả
run_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
actionstring*retry_result resumes result polling for an accepted Studio video on the original reservation; requires step_id and expected_version. It never resubmits generation. Unconfirmed usage without a saved video task requires operator review.
  • Allowed values: approve, stop, resume, cancel_remaining, retry_result
expected_versioninteger*
step_idstring—
  • Format: UUID
selected_asset_idsarray—
  • Maximum items: 10 items
Yêu cầu đầu tiên · JSON
{
  "action": "approve",
  "expected_version": 1
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "plan_id": "11111111-1111-4111-8111-111111111111",
    "version": 1,
    "state": "queued",
    "client_reference": "example",
    "created_at": "2026-09-20T00:00:00Z",
    "completed_at": "2026-09-20T00:00:00Z",
    "budget_remaining": {
      "currency": "example",
      "micro_units": "example"
    },
    "committed_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "unresolved_cost": {
      "currency": "example",
      "micro_units": "example"
    },
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ]
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

Chức năng quy trình

GET/api/v1/jobs/{job_id}Xem trạng thái và kết quả của tác vụ

Lấy trạng thái công việc và ID tài sản đầu ra. Khi hoàn tất, dùng getAsset để lấy tệp kết quả.

Quyền cần thiết: jobs:read

Tham số

TênTypeBắt buộcMô tả
job_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/jobs/{job_id}/buildXem tiến độ và tư liệu

Xem giai đoạn, thông báo tiến độ, tài liệu nguồn và văn bản đã chuẩn bị của công việc dựng cấu trúc kịch bản.

Quyền cần thiết: jobs:read, assets:read

Tham số

TênTypeBắt buộcMô tả
job_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "state": "example",
    "stage": "example",
    "messages": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "role": "assistant",
        "stage": "example",
        "content": "example",
        "status": "streaming",
        "seq": 1,
        "created_at": "example",
        "updated_at": "example"
      }
    ],
    "sources": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "name": "example",
        "filterMode": "prompt_index",
        "sourceText": "example",
        "llmText": "example",
        "originalChars": 1,
        "preparedChars": 1
      }
    ]
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

API t?ch h?p c?
POST/api/v1/jobsChạy ngay một tính năng

Chạy đúng một tính năng thay vì cả quy trình. analyze_script đọc kịch bản và tạo các cảnh quay, generate_image tạo ảnh nhân vật, bối cảnh, đạo cụ và cảnh quay, generate_video tạo video cho cảnh đã chọn ảnh, còn assemble_video ghép tập phim khi mọi cảnh đều đã có video. Luôn gửi kèm revision mới nhất của dự án. Yêu cầu Live sẽ giữ trước tín dụng.

Quyền cần thiết: jobs:create

Tham số

TênTypeBắt buộcMô tả
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
project_idstring*
  • Format: UUID
project_revisioninteger*
target_idstring*
  • Format: UUID
typestring*
  • Allowed values: analyze_script, generate_image, generate_video, assemble_video
profile_idstring*
  • Maximum length: 100 characters
client_referencestring—
  • Maximum length: 128 characters
Yêu cầu đầu tiên · JSON
{
  "project_id": "11111111-1111-4111-8111-111111111111",
  "project_revision": 1,
  "target_id": "11111111-1111-4111-8111-111111111111",
  "type": "analyze_script",
  "profile_id": "example"
}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "state": "queued",
    "output_asset_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

Nhật ký yêu cầu

GET/api/v1/requestsXem danh sách yêu cầu đã gửi

Xem nhật ký API gồm mã HTTP và thời gian xử lý. Lọc theo tác phẩm và khoảng thời gian.

Quyền cần thiết: requests:read

Tham số

TênTypeBắt buộcMô tả
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100
fromquerystring—
  • Format: Date and time with timezone
toquerystring—
  • Format: Date and time with timezone
project_idquerystring—
  • Format: UUID
run_idquerystring—
  • Format: UUID
job_idquerystring—
  • Format: UUID
key_idquerystring—
  • Format: UUID
status_codequeryinteger—
  • Minimum: 100
  • Maximum: 599
methodquerystring—
  • Allowed values: GET, POST, PATCH, PUT
route_templatequerystring—
  • Minimum length: 1 characters
  • Maximum length: 300 characters

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "request_id": "11111111-1111-4111-8111-111111111111",
        "created_at": "2026-09-20T00:00:00Z",
        "method": "GET",
        "route_template": "example",
        "status_code": 100,
        "duration_ms": 0,
        "actor_kind": "api_key",
        "work_id": "11111111-1111-4111-8111-111111111111",
        "run_id": "11111111-1111-4111-8111-111111111111",
        "job_id": "11111111-1111-4111-8111-111111111111",
        "replayed": false,
        "error_code": "example"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

GET/api/v1/requests/{request_id}Xem một yêu cầu đã gửi

Tra cứu một lệnh gọi API bằng request_id, gồm mã HTTP, thời gian xử lý và lượt chạy hoặc công việc liên quan.

Quyền cần thiết: requests:read

Tham số

TênTypeBắt buộcMô tả
request_idpathstring*
  • Format: UUID

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "request_id": "11111111-1111-4111-8111-111111111111",
    "created_at": "2026-09-20T00:00:00Z",
    "method": "GET",
    "route_template": "example",
    "status_code": 100,
    "duration_ms": 0,
    "actor_kind": "api_key",
    "work_id": "11111111-1111-4111-8111-111111111111",
    "run_id": "11111111-1111-4111-8111-111111111111",
    "job_id": "11111111-1111-4111-8111-111111111111",
    "replayed": false,
    "error_code": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

Mức sử dụng

GET/api/v1/usageXem mức dùng tín dụng

Lấy tổng mức sử dụng trong kỳ, gồm số tiền đã giữ trước và đã quyết toán.

Quyền cần thiết: usage:read

Tham số

Không có tham số

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "period_start": "2026-09-20T00:00:00Z",
    "period_end": "2026-09-20T00:00:00Z",
    "as_of": "2026-09-20T00:00:00Z",
    "http_requests": 0,
    "runs": 0,
    "jobs": 0,
    "reserved": {
      "currency": "example",
      "micro_units": "example"
    },
    "committed": {
      "currency": "example",
      "micro_units": "example"
    },
    "unresolved": {
      "currency": "example",
      "micro_units": "example"
    },
    "remaining": {
      "currency": "example",
      "micro_units": "example"
    },
    "amount_basis": "partner_limit",
    "billing_mode": "pilot"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

Webhook

GET/api/v1/webhook-endpointsXem danh sách địa chỉ nhận Webhook

Liệt kê URL Webhook đã đăng ký, sự kiện đăng ký và trạng thái bật.

Quyền cần thiết: webhooks:read

Tham số

TênTypeBắt buộcMô tả
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "url": "example",
        "work_ids": [
          "11111111-1111-4111-8111-111111111111"
        ],
        "events": [
          "run.state_changed"
        ],
        "enabled": false,
        "verified": false,
        "secret_version": 1,
        "created_at": "2026-09-20T00:00:00Z"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/webhook-endpointsThêm địa chỉ nhận Webhook

Đăng ký URL Webhook để nhận các sự kiện sản xuất đã chọn của những tác phẩm được chỉ định.

Quyền cần thiết: webhooks:write

Tham số

TênTypeBắt buộcMô tả
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

TênTypeBắt buộcMô tả
urlstring*
  • Format: uri
  • Maximum length: 2000 characters
project_idsarray*
  • Maximum items: 100 items
eventsarray*
  • Maximum items: 4 items
Yêu cầu đầu tiên · JSON
{
  "url": "example",
  "project_ids": [
    "11111111-1111-4111-8111-111111111111"
  ],
  "events": [
    "run.state_changed"
  ]
}

Phản hồi

HTTP 201 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "endpoint": {
      "id": "11111111-1111-4111-8111-111111111111",
      "url": "example",
      "work_ids": [
        "11111111-1111-4111-8111-111111111111"
      ],
      "events": [
        "run.state_changed"
      ],
      "enabled": false,
      "verified": false,
      "secret_version": 1,
      "created_at": "2026-09-20T00:00:00Z"
    }
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

PATCH/api/v1/webhook-endpoints/{endpoint_id}Sửa địa chỉ nhận Webhook

Bật, tắt Webhook hoặc thay đổi các loại sự kiện nhận được.

Quyền cần thiết: webhooks:write

Tham số

TênTypeBắt buộcMô tả
endpoint_idpathstring*
  • Format: UUID
If-Matchheaderstring*Dùng ETag mới nhất, bao gồm dấu ngoặc kép.

Nội dung yêu cầu

TênTypeBắt buộcMô tả
enabledboolean—
eventsarray—
  • Maximum items: 4 items
Yêu cầu đầu tiên · JSON
{}

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "url": "example",
    "work_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "events": [
      "run.state_changed"
    ],
    "enabled": false,
    "verified": false,
    "secret_version": 1,
    "created_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

Gửi Webhook

GET/api/v1/webhook-deliveriesXem lịch sử gửi Webhook

Liệt kê các lần gửi Webhook và trạng thái để kiểm tra thông báo đã được gửi thành công hay chưa.

Quyền cần thiết: webhooks:read

Tham số

TênTypeBắt buộcMô tả
cursorquerystring—
  • Minimum length: 1 characters
  • Maximum length: 500 characters
limitqueryinteger—
  • Default: 20
  • Minimum: 1
  • Maximum: 100

Phản hồi

HTTP 200 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "items": [
      {
        "id": "11111111-1111-4111-8111-111111111111",
        "endpoint_id": "11111111-1111-4111-8111-111111111111",
        "event_id": "11111111-1111-4111-8111-111111111111",
        "state": "pending",
        "attempt": 0,
        "http_status": 1,
        "next_attempt_at": "2026-09-20T00:00:00Z",
        "created_at": "2026-09-20T00:00:00Z"
      }
    ],
    "next_cursor": "example"
  }
}

Header phản hồi: X-Request-Id · ETag

Phản hồi lỗi · error.code ↗

Thử gọi

POST/api/v1/webhook-deliveries/{delivery_id}/redeliverGửi lại Webhook

Yêu cầu gửi lại thông báo Webhook hiện có theo delivery_id.

Quyền cần thiết: webhooks:write

Tham số

TênTypeBắt buộcMô tả
delivery_idpathstring*
  • Format: UUID
Idempotency-Keyheaderstring*Thử lại với cùng Idempotency-Key và nội dung yêu cầu.
  • Minimum length: 16 characters
  • Maximum length: 128 characters

Nội dung yêu cầu

Yêu cầu đầu tiên · JSON
{}

Phản hồi

HTTP 202 Thành công

Yêu cầu đầu tiên · JSON
{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "data": {
    "id": "11111111-1111-4111-8111-111111111111",
    "endpoint_id": "11111111-1111-4111-8111-111111111111",
    "event_id": "11111111-1111-4111-8111-111111111111",
    "state": "pending",
    "attempt": 0,
    "http_status": 1,
    "next_attempt_at": "2026-09-20T00:00:00Z",
    "created_at": "2026-09-20T00:00:00Z"
  }
}

Header phản hồi: X-Request-Id · ETag · Retry-After

Phản hồi lỗi · error.code ↗

Thử gọi

Đặc tả

GET/api/v1/openapi.jsonTải tài liệu đặc tả API

Tải đặc tả OpenAPI gồm đường dẫn API, trường yêu cầu và lược đồ phản hồi.

Tham số

Không có tham số

Phản hồi

HTTP 200 Đặc tả OpenAPI

Yêu cầu đầu tiên · JSON
{}

Thử gọi

Phản hồi lỗi · error.code 71

Mã 2xx nghĩa là yêu cầu đã được tiếp nhận. 201 là đã tạo mới, còn 202 là đã nhận và đang xử lý nên chưa có kết quả — hãy kiểm tra trạng thái công việc để biết khi nào xong. Phản hồi thành công luôn có request_id và data, chỉ trừ khi tải tệp và khi lấy tài liệu đặc tả API. Khi lỗi, mọi endpoint đều trả về error cùng một cấu trúc. Hãy rẽ nhánh trong mã bằng error.code; message là phần giải thích nguyên nhân và cách xử lý cho người đọc. Dùng retryable để biết có nên gửi lại hay không. Chỉ tự động gửi lại khi nó là true, và chờ đúng số giây trong retry_after_seconds hoặc Retry-After. Khi gửi lại một POST, hãy dùng đúng Idempotency-Key và nội dung như lần đầu để không bị tính phí hay tạo trùng. Gặp error.code lạ thì cứ xử lý theo mã HTTP và retryable. Khi liên hệ hỗ trợ, vui lòng gửi kèm request_id. Lỗi xảy ra sau khi công việc đã được tiếp nhận sẽ hiện ở trạng thái và kết quả của công việc, không phải ở phản hồi này.

{
  "request_id": "11111111-1111-4111-8111-111111111111",
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid input. Check the required fields, types and values.",
    "retryable": false
  }
}
error.codeHTTPMô tả
INVALID_REFERENCE422A selected reference is unavailable or does not belong to this project. Select a ready image from this project.
MODEL_UNAVAILABLE422The selected model is unavailable. Refresh the model list and select another model.
MODEL_POLICY_REQUIRED503No default model policy is configured. Specify a model or ask the administrator to configure the task policy.
BUILD_REPLAY_CONFLICT409The build inputs changed. Review the saved build before continuing.
INVALID_REQUEST400,422Invalid input. Check the required fields, types and values.
INVALID_API_KEY401Invalid credentials or download signature. Check the API key or obtain a new download URL.
INSUFFICIENT_SCOPE403Permission denied. Check the key scopes and project access.
PARTNER_BLOCKED403Account blocked. Contact support.
PARTNER_PAUSED403Account paused. Ask the administrator to resume access.
RESOURCE_NOT_FOUND404Resource unavailable. Check its ID and access permissions.
METHOD_NOT_ALLOWED405Unsupported HTTP method. Use the documented method.
REQUEST_TIMEOUT408Request body timed out. Check the connection and upload size.
IDEMPOTENCY_KEY_REQUIRED400Provide a valid Idempotency-Key header.
IDEMPOTENCY_CONFLICT409This Idempotency-Key belongs to a different request. Reuse it only with the original request.
IDEMPOTENCY_KEY_EXPIRED409Idempotency record expired. Check the original result before starting a new operation.
PRECONDITION_FAILED412Provide the latest quoted ETag in If-Match.
REVISION_CONFLICT409Resource changed. Read the latest revision before updating.
RESOURCE_CONFLICT409Resource conflicts with existing data. Review the current resource.
INVALID_TRANSITION409Action is unavailable in the current state. Read the latest state.
RUN_IN_PROGRESS409A run is in progress. Check its status before starting another.
JOB_RUNNING409A job is running. Wait for completion before editing.
PLAN_EXPIRED409Plan expired. Create a new plan and review its quote.
INSUFFICIENT_CREDITS402Insufficient credits. Check the balance and required credits.
BUDGET_EXCEEDED409,429Budget limit exceeded. Review usage and the configured budget.
RATE_LIMITED429Request rate exceeded. Follow retryable and Retry-After before retrying.
CAPACITY_EXCEEDED429Capacity limit exceeded. Reduce the workload or wait for active work to finish.
PAYLOAD_TOO_LARGE413Request body too large. Reduce it to the documented limit.
UNSUPPORTED_MEDIA_TYPE415Unsupported content type or encoding. Use the documented Content-Type without Content-Encoding.
UPLOAD_TOO_LARGE422Uploaded content exceeds its processing limit. Reduce the file size.
UPLOAD_NOT_VERIFIED422Upload is incomplete, expired or invalid. Check the upload and verification steps.
ASSET_KIND_MISMATCH422Asset type does not match the operation. Select a compatible asset.
SELECTED_IMAGE_REQUIRED422Select a valid image before generating video.
SELECTED_VIDEO_REQUIRED422Select valid videos for the requested shots before assembly.
REFERENCE_LIMIT_EXCEEDED422Too many reference assets. Reduce them to the model limit.
REFERENCE_IMAGE_REQUIRED422This model requires a reference image. Add an image or select a text-to-image model.
INVALID_GENERATION_OPTIONS422Generation options are invalid. Check the model capabilities.
PROMPT_REQUIRED422Provide a generation prompt.
SCRIPT_TEXT_REQUIRED422Provide script text before starting this operation.
SCENES_REQUIRED422Create scenes before starting this operation.
VARIANT_NAME_REQUIRED422Provide a variant name.
EPISODE_ALREADY_STRUCTURED409Episode already has shots. Review its existing structure.
ONE_SCRIPT_PER_PROJECT409This project supports one script. Use the existing script.
MULTIPLE_SCRIPTS_REQUIRE_REVIEW409Multiple scripts need review before continuing.
NATIVE_CONTENT_ALREADY_EXISTS409Studio content already exists. Review it before continuing.
LIVE_PROJECT_REQUIRED409This operation requires a live project.
STUDIO_MIGRATION_REQUIRED409Project needs Studio migration. Contact support.
UNSUPPORTED_CAPABILITY422Unsupported operation or profile. Check GET /capabilities.
CAPABILITY_UNAVAILABLE503Capability currently unavailable. Check GET /capabilities.
API_NOT_ACCEPTING503New requests are paused. Check service availability.
DEPENDENCY_UNAVAILABLE503A required service is unavailable. Follow the retry guidance or contact support.
PRICING_UNAVAILABLE503Pricing unavailable. A valid quote is required to proceed.
MEDIA_TOOLS_UNAVAILABLE503Media processing unavailable. Contact support.
STORAGE_READ_FAILED503Could not read the stored asset. Contact support with request_id.
STORAGE_WRITE_FAILED503Could not save the asset. Check the result before retrying.
INTERNAL_ERROR500Internal error. Follow retry guidance; include request_id when contacting support.
RESPONSE_CONTRACT_VIOLATION500Server response validation failed. Contact support with request_id.
INVALID_EXECUTION_CONTEXT500Execution context is invalid. Contact support.
RETRY_TRANSACTION503Transaction could not complete. Follow the response retry guidance.
CLAIM_LOST409Execution ownership changed. Check the current job state.
PROVIDER_TIMEOUT504Generation service timed out. Check the existing job before submitting again.
PROVIDER_TERMINAL_FAILURE422Generation failed. Review the job result and inputs.
PROVIDER_RESULT_UNAVAILABLE502Generation result unavailable. Check the existing job and recovery options.
INVALID_RESULT422,503Result failed validation. Review the job or contact support.
RESULT_TOO_LARGE422Result exceeds the processing limit. Reduce the requested output.
EXPORT_TOO_LARGE422Export exceeds the size limit. Reduce the export selection.
RECOVERY_BACKOFF409Existing result recovery is delayed. Check again later; do not resubmit generation.
VIDEO_RECOVERY_REVIEW_REQUIRED503The original video task needs scheduled recovery or operator review. Do not resubmit generation.
RESULT_RECOVERY_REQUIRED409,503Existing result needs recovery. Check the run recovery options before resubmitting.
RESULT_NOT_RECOVERABLE409Result cannot be recovered through this action. Review the run or contact support.
RECOVERY_CAPACITY_EXCEEDED409Recovery limit reached. Contact support before further recovery attempts.
USAGE_RECOVERY_REQUIRED503Usage needs reconciliation. Contact support; do not resubmit generation blindly.