Agent integration guide
Seedance API(v3)
Use https://api.tokenlio.ai with your platform Bearer Key and an exact model ID from the current catalog. Official references provide more field details; use the addresses, authentication and examples on this page for your calls.
This page guides orchestration. Complete parameters and examples live in their corresponding API pages. Read only the pages needed for the goal, then construct one explicit call plan.
Choose a workflow
| Goal | Reading order |
|---|---|
| Generate a first video | Create video tasks → Query and manage tasks |
| Reuse image, video or audio materials | Material groups and assets → Create video tasks |
| Verify a person for materials | Person verification → Material groups and assets → Create video tasks |
| Receive generation notifications | Generation callbacks → Query and manage tasks |
| Let an Agent orchestrate calls | Request conventions → Models and inputs → relevant API |
Shared request rules
- Read conventions and obtain the required Key and available model ID. Do not guess model aliases or resource IDs.
- Fix a stable mutation key and retain the original body, returned IDs and next step. Mock success, failure and timeout branches first.
- After admission, query the original task. Read video on succeeded; stop waiting for success on failed/cancelled/expired.
- Give H5Link to the user for browser completion, then query with the original BytedToken.
- Query target/status before cancel/delete; send unknown outcomes to recovery.
- Never attach platform Authorization to media/H5 links or log Keys/BytedToken. Live paid generation and destructive operations require explicit authorization.
Minimum mocks: create200/id, query running→succeeded, failed task, query429/5xx, POST timeout, material200 with Error, H5 not completed and duplicate event handling. Mock success is not live H5 or generation acceptance.
Wait and stop conditions
Wait for the user when H5 needs human completion. Stop new mutations and recover the original intent when submission is uncertain. Report definitive failures. Do not change the Key, body, target or idempotency key during retries.
Identifiers and their next use
| ID | Next steps |
|---|---|
model | Public model ID from the current catalog |
id | Task UUID from creation; used by queries, cancel/delete and draft references |
Result.Id | Opaque material/group ID for the corresponding Action body |
BytedToken | Opaque session token used only to query this verification |
Result.GroupId | Verified group ID used as CreateAsset GroupId |
X-Tokenlio-Operation-Id | Platform operation UUID for material-mutation recovery |
ResponseMetadata.RequestId | Diagnostic request ID, not a task, asset or operation ID |
