Upload media
Store an image, video or audio file to use as a generation input, and list the files you have.
POST/api/v1/uploads
To use your own image, video or audio file in a generation, upload it here and pass the returned url in the model’s input field. You can also use the output of a previous task. List your files to find both.
Uploads are private by default and are stored for a limited time. Check expires_at in your file list for a file’s current expiry. Keep a copy of any file you need long term.
Request
Send the raw file bytes as the body (not multipart form data).
| Part | Description |
|---|---|
Content-Type header · required | The file's MIME type, e.g. image/png, video/mp4, audio/mpeg. Only image, video and audio types are accepted, and not SVG. |
Content-Length header · required | The file size in bytes (most HTTP clients set it for you). |
filename query | Optional name, for your own bookkeeping. |
digest query | Optional compatibility parameter. If supplied, use the file’s SHA-256 digest as 64 lowercase hex characters. |
curl "https://vidocraft.com/api/v1/uploads?filename=product.png" \
-X POST \
-H "Authorization: Bearer sk_test_xxxxxxxx" \
-H "Content-Type: image/png" \
--data-binary @product.pngResponse
201 Created
The test path is an example of the configured storage prefix. Use the returned URL as-is; do not construct it yourself.
{
"url": "https://vidocraft.com/test/m/550e8400-e29b-41d4-a716-446655440000.png?grant=SHORT_LIVED_TOKEN",
"asset_id": "550e8400-e29b-41d4-a716-446655440000",
"url_expires_at": "2026-10-21T10:51:31.248Z",
"mime_type": "image/png",
"size": 204813,
"duration": null,
"expires_at": "2026-10-22T10:36:31.248Z",
"deduplicated": false
}durationis the length in seconds for audio and video (nullfor images). If it isnullfor an audio or video file, the format could not be read; a model that prices by input length will refuse that file withmedia_unreadable— convert it to MP4, MOV, M4A, MP3, WAV, FLAC or OGG and upload again.- Check each model's limits before uploading:
GET /api/v1/modelslists, for every media parameter, the accepted MIME types, maximum file size, maximum count and duration bounds undermedia. - Test keys store files for real (a sandbox generation still validates its inputs), so uploads count against your storage quota in both modes.
url is a temporary read link. Keep it private. url_expires_at tells you when the link expires. If the link expires while the file is still available, list your files for a fresh link or use asset:<asset_id> in your own generation requests.
Using the URL
Pass the URL in the model's media parameter. A parameter with media.multiple: true takes a list of URLs. For media.frames: true, use the frame mode, parameter names and type described below.
Frame inputs expose media.frameMode: start-only and end-only select one slot; both-required needs both; start-required allows an optional end; end-required allows an optional start; either allows either or both. The parameter’s required rules determine whether the whole group may be omitted. Both slots share the listed media limits.
The model descriptor’s key determines the input format:
- A name mapping such as
{ "startFrame": "image", "endFrame": "last_frame" }means two URL parameters:{ "image": "<start URL>", "last_frame": "<end URL>" }. To send only the end, omitimagewhen the frame mode permits it. - A string key with
type: "array"takes an ordered URL list:["<start URL>", "<end URL>"]. Empty positions are rejected. A single-slot mode takes a one-item list. - A string key with
type: "string"takes the single slot’s URL.
Use the parameter names returned by the model descriptor. Do not send an editor frame object as the API input.
{
"model": "image-to-video:wzkmnjbjb3av",
"input": {
"image_urls": ["asset:first-asset-id", "asset:last-asset-id"],
"multi_prompt": [{ "prompt": "the camera slowly pulls back", "duration": 5 }]
}
}To link directly to an external file, use an HTTPS URL from an approved domain. Other external links return media_not_uploaded. If a linked image or video is rejected by content moderation, the request returns moderation_blocked.
List your files
GET/api/v1/uploads
Lists the files you can pass as generation inputs — your uploads and your previous tasks' outputs — newest first. Deleted and expired files are left out, and only the API key owner's own files are ever returned.
| Query | Description |
|---|---|
type | image, video or audio. Omit for all three. |
source | upload (files you uploaded) or generation (task outputs). Omit for both. |
limit | Page size, 1–100. Default 20. |
cursor | The next_cursor of the previous page. Pages are stable: files added while you page through show up at the start, not in the middle. |
curl "https://vidocraft.com/api/v1/uploads?type=image&limit=2" \
-H "Authorization: Bearer sk_test_xxxxxxxx"{
"files": [
{
"url": "https://vidocraft.com/test/m/550e8400-e29b-41d4-a716-446655440000.png?grant=SHORT_LIVED_TOKEN",
"type": "image",
"source": "upload",
"mime_type": "image/png",
"size": 204813,
"duration": null,
"filename": "product.png",
"task_id": null,
"created_at": "2026-09-22T10:36:31.248Z",
"expires_at": "2026-10-22T10:36:31.248Z"
},
{
"url": "https://cdn.example.com/…/image/1b4f0e9….png",
"type": "image",
"source": "generation",
"mime_type": "image/png",
"size": 1830042,
"duration": null,
"filename": null,
"task_id": "01J8Z…",
"created_at": "2026-09-21T08:12:05.004Z",
"expires_at": "2026-10-21T08:12:05.004Z"
}
],
"next_cursor": "MTc1ODQ0MjMyNTAwNDowMUo4Wi4uLg"
}next_cursor is null on the last page. task_id links an output to the task that produced it.