Decode logoDecode

Material library

The material library keeps your images, videos and audio. Video requests reference a material as asset://<material ID>.

The old material API is being retired; do not use it for new work. The Volcengine OpenAPI-style endpoints such as POST /api/seedance/proxy/openapi (CreateAssetGroup, CreateAsset and so on) still answer but are no longer maintained: they may fail when the upstream changes its rules (for example with LegacyMaterialGroup), and they will be shut down soon. The BytePlus endpoints used by dreamina models (/api/v3/byteplus/materials, /api/seedance/byteplus/materials/openapi) were shut down on 2026-11-15. Use the /v1/materials endpoints below instead. Materials created through the old API have been moved into the new library (the migrated group), and existing asset://asset-... references keep working.

  • Materials belong to the API key that added them. Only that key can see and reference them; another key gets 404 when reading one and 400 when referencing it.
  • A material no generation used for 30 days is deleted automatically (each use restarts the count); you can also delete it at any time. Using the same file again adds and reviews it again. One material works with both doubao-seedance-* and dreamina-seedance-* models.
  • Every material passes the upstream material library review before it is used. The review starts as soon as the material is added and usually takes under a minute. status is pending (in review), active (ready) or rejected (refused; reject_reason says why). A material in review can be referenced right away: the submission waits for the review (90 seconds at most by default).
  • Images, videos and audio a video request gives as public URLs or base64 are saved to the auto-imported group and reviewed before generation. A key keeps one copy of each file.
  • A rejected material cannot be used: referencing it returns 400 and nothing is charged.
  • Each key has a storage limit for its materials and a limit on groups; at a limit, the call returns 403.
  • The console's Material Library page does everything below without code.

Add a material

POST /v1/materials. Upload a local file (multipart/form-data):

curl https://decode8.com/v1/materials \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -F file=@product.png \
  -F name="Product front"

Or have the gateway download a public URL (JSON):

curl https://decode8.com/v1/materials \
  -H "Authorization: Bearer $DECODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/clip.mp4", "name": "Reference motion"}'
Field Required Description
file / url One A local file, or a publicly reachable http(s) URL
name No The material's name; defaults to the file name
group_id No The group to add it to; defaults to the auto-imported group
library No volcengine (for doubao models) or byteplus (for dreamina models): the review starts in that upstream library; byteplus files are stored outside China only. When omitted, it follows the models the key can use: volcengine if it can use doubao models, byteplus if it can use only dreamina models

File requirements:

Type Formats Size Other
Image JPEG, PNG, WebP, GIF ≤ 30 MB 300–6000 pixels per side, width/height ratio 0.4–2.5
Video MP4, MOV ≤ 200 MB 2–30 seconds, 24–60 fps, 300–6000 pixels per side, ratio 0.4–2.5
Audio WAV, MP3 ≤ 15 MB 2–30 seconds

It returns the material. Adding a file the key already has returns the existing material:

{
  "id": "mat_3f9c0d2e7a6b41c58e1f2a9b",
  "object": "material",
  "type": "image",
  "name": "Product front",
  "status": "pending",
  "reject_reason": "",
  "group_id": "mgrp_8b1d4c0f2e7a49d3b6a5c1e0",
  "reference": "asset://mat_3f9c0d2e7a6b41c58e1f2a9b",
  "url": "https://...",
  "mime_type": "image/png",
  "size": 482133,
  "width": 1024,
  "height": 1024,
  "duration_ms": 0,
  "created_at": 1794459000,
  "last_used_at": 0
}

Read materials

  • GET /v1/materials/{id} reads one material, for example to wait until status is active.
  • GET /v1/materials?group_id=&type=&status=&page=1&page_size=20 lists materials, newest first: {"object": "list", "data": [...], "total": 12, "page": 1, "page_size": 20}. type is image, video or audio.

Change or delete a material

  • PATCH /v1/materials/{id} with {"name": "...", "group_id": "..."} renames a material or moves it to another group.
  • DELETE /v1/materials/{id} deletes a material; tasks already submitted are not affected.
  • POST /v1/materials/{id}/review submits a rejected material for review again.

Groups

  • POST /v1/material-groups with {"name": "..."} creates a group.
  • GET /v1/material-groups lists groups. kind is manual (created by you), auto (auto-imported) or migrated (materials carried over from the earlier library).
  • PATCH /v1/material-groups/{id} with {"name": "..."} renames a group you created.
  • DELETE /v1/material-groups/{id} deletes an empty group.

Reference a material in a video request

Use asset://<material ID> as the URL of an image, video or audio item in content:

{
  "type": "image_url",
  "role": "reference_image",
  "image_url": { "url": "asset://mat_3f9c0d2e7a6b41c58e1f2a9b" }
}

The material's type must match the item: an image material only fits image_url. References written as asset://asset-... with the earlier material endpoints still work.

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.