Register an asset
Requires service.use.
- Put your API key after
Authorization: Bearer; the key needsservice.usepermission. - Send an
Idempotency-Key; the same request replays the original response and a different one is refused. - After acceptance the file is fetched and checked in the background; read its status at
Location. - Only
activeassets can be referenced withasset://in generation requests.
Headers
Bearer, a space and your API key. A missing or invalid key returns 401 authentication_failed.
The body is JSON: application/json.
Your own request identifier. An invalid or repeated value is replaced; the value used comes back in the X-Request-ID response header.
Generate a new value for every new request and save it; it starts with a letter or digit. When the outcome is unknown, retry with the same key and the original body to get the original response; the same key with a different body returns 409 idempotency_conflict. Keys belong to your team, not to one API key.
Request body
The body accepts only the fields below; any other field is rejected.
Public HTTPS address of the source file, up to 2048 UTF-8 bytes. User information in the URL is rejected, as are destinations outside the fetch policy.
The kind of media in this file.
ID of the model used for this request.
dreamina-seedance-2-0-260128Seedance 2.0dreamina-seedance-2-0-fast-260128Seedance 2.0 Fastdreamina-seedance-2-0-mini-260615Seedance 2.0 MiniOptional display name. Control characters, line or paragraph separators and bidirectional text controls are not accepted.
Returns
Asset intake was accepted. Follow Location to check its progress.
Response headers
Status codes
Each error.code and what to do about it is on Error codes.
| Status | Meaning and error.code |
|---|---|
| 202 | Asset intake was accepted. Response headers Cache-ControlLocation |
| 400 | The request is invalid or the source address fails the HTTPS fetch policy. |
| 401 | The API key is missing or invalid. Response headers WWW-Authenticate |
| 403 | This API key does not have service.use permission. |
| 409 | Your team already used this idempotency value for a different canonical asset registration request. |
| 410 | The saved acceptance response is too old to replay exactly. |
| 429 | The asset cannot be accepted within your team's stored-byte allowance or intake capacity. |
| 503 | The service is temporarily unavailable. |