Decode logoDecode

International direct API (V4)

The international dreamina-seedance-* models also have a direct API, under paths starting with /api/v4/, which works the way the official BytePlus ModelArk API does: reference media in a request go upstream unchanged instead of through the Decode material library, materials are created straight in the upstream material library, and generated videos are returned as official links. The China doubao-seedance-* models cannot use the direct API; such a request returns 400.

Default API (/api/v3 + /v1/materials) Direct API (/api/v4)
Reference URLs / base64 in a request Saved to the material library and reviewed first Sent upstream unchanged
Material ID mat_... (a Decode ID) asset-... (the official asset ID)
Generated video Kept by Decode, returned as a Decode download URL Official link, valid for 24 hours, not kept by Decode
Deleting materials Single materials Whole groups only
Material count Limited by storage, removed after 30 days unused At most 200 per key, never removed automatically

Materials of the two APIs are not interchangeable: the direct API references only materials uploaded through the direct API, plus the platform's preset digital characters, and the default API cannot reference direct materials.

Generate a video (V4)

  • POST /api/v4/contents/generations/tasks: submit a task. The body is the same as in Submit a task; model must be a dreamina-seedance-* model.
  • GET /api/v4/contents/generations/tasks/{id}: query a task. The response is the same as in Query a task.
  • GET /api/v4/contents/generations/tasks: list tasks, with the parameters in List tasks; video addresses are the official links.
curl https://decode8.com/api/v4/contents/generations/tasks \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-261111",
    "content": [
      { "type": "text", "text": "The person in image 1 walks along the beach, slow dolly-in" },
      { "type": "image_url", "role": "reference_image", "image_url": { "url": "asset://asset-20261116180558-7kmn2" } }
    ],
    "resolution": "720p",
    "ratio": "16:9",
    "duration": 5
  }'
  • Reference media: images may be public URLs, data:image/...;base64,... or asset://ID; videos may be public URLs or asset://ID, not base64; audio may be public URLs, data:audio/...;base64,... or asset://ID.
  • Images and videos with real human faces must first be uploaded through the material endpoints below and referenced as asset://ID once approved. Passed as a URL, they are blocked upstream. Media without faces, such as product shots, may be passed as URLs.
  • Referenced materials must have passed the review (status is active): a refused material returns 400 and is not charged, and a material still under review is refused upstream, so wait for active before submitting.
  • When a task succeeds, content.video_url is the official video link, valid for 24 hours. Decode keeps no copy and cannot recover an expired link, so download promptly.
  • The upstream platform trusts original outputs of the same account for 30 days: a face-containing video generated through the direct API can be reused as a reference video by passing the returned content.video_url, subject to the upstream review. A downloaded and re-uploaded file loses this trust.
  • Billing is the same as in Billing.

Materials (V4)

Requests and responses follow /v1/materials in Material library, with the differences below.

POST /api/v4/materials: upload a material.

curl https://decode8.com/api/v4/materials \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/actor.png", "name": "Lead, front", "group_id": "group-20261116100548-0cind"}'
Field Required Description
file / url One A local file (multipart/form-data), or a publicly reachable http(s) URL
name No Material name, the file name by default
group_id No Target group; without it the material goes to an automatically created default group
type No For url only: image, video or audio; by default taken from the URL's extension, otherwise an image
  • A url is handed to the upstream as is, so make sure the upstream can reach it. A file is checked against the file requirements in Add a material, then staged for the upstream to fetch and deleted once the review ends.
  • The response is a material object whose id is the official asset ID and whose reference is asset://ID. The file lives only upstream, so url is empty.
{
  "id": "asset-20261116180558-7kmn2",
  "object": "material",
  "type": "image",
  "name": "Lead, front",
  "status": "pending",
  "reject_reason": "",
  "group_id": "group-20261116100548-0cind",
  "reference": "asset://asset-20261116180558-7kmn2",
  "url": "",
  "copies": [{ "library": "byteplus", "status": "processing" }],
  "created_at": 1794823559
}
  • GET /api/v4/materials/{id}: one material. A new upload is pending, usually active within tens of seconds; a refused one is rejected, with the reason in reject_reason.
  • GET /api/v4/materials?group_id=&type=&status=&page=1&page_size=20: list materials, in the same shape as /v1/materials.
  • PATCH /api/v4/materials/{id} with {"name": "..."}: rename. A material cannot move to another group; another group_id returns 400 material_move_unsupported, so upload it again in that group.
  • DELETE /api/v4/materials/{id}: not supported, returns 400 material_delete_unsupported. The upstream deletes materials only by whole group, so delete the material's group.

Groups:

  • POST /api/v4/material-groups with {"name": "..."}: create a group; its id is the official group ID. Each key may create up to 20 groups.
  • GET /api/v4/material-groups: list groups, with material_count (materials held) and material_limit (the limit).
  • PATCH /api/v4/material-groups/{id} with {"name": "..."}: rename a group you created.
  • DELETE /api/v4/material-groups/{id}: delete a group and every material in it, permanently. Tasks still using those materials may fail.

Notes:

  • Materials belong to one API key: only the key that uploaded a material can see and reference it. Other keys get 404 when reading it and 400 when referencing it.
  • Each key keeps at most 200 materials (refused ones included). At the limit, uploads return 403 material_quota_exceeded; delete groups you no longer need first.
  • When the upstream material library is full, uploads return 409 material_library_full; try again later or upload into a new group.
  • Materials are never removed for being unused. When an API key is deleted, its material groups are deleted within an hour.

Contact us: pricing, volume and support

Need volume pricing, a dedicated discount group, higher concurrency or integration help? Reach out and mention "API partnership" with your expected volume.