Reference uploads
Give a model your own image, video or audio: an https URL, or a temporary upload. Uploads are deleted 24 hours after upload.
On this page
Models that read a file (Seedance reference images, videos and audio; image-to-video first frames; video-to-video sources; image editing; speech-to-text) take it in their own parameter (e.g. image, reference_images, reference_videos, audio_url). Supply a public HTTPS URL or an upload id.
We check remote URLs with a HEAD request and refuse plain HTTP. To use a file from your application, upload it through POST /v1/uploads and pass the returned upl_... id. The model receives a signed, time-limited link, or the bytes when it requires inline input.
Upload a file
curl https://xavainf.com/v1/uploads \
-H "Authorization: Bearer $XINF_API_KEY" \
-H "Content-Type: image/png" \
--data-binary @first-frame.png
# {"id":"upl_...","object":"upload","url":"https://xavainf.com/refs/upl_....png?sig=...",
# "mime":"image/png","kind":"image","bytes":482113,"created_at":1790000000,
# "expires_at":1790086400,"status":"active","cost_usd":"0.001"}curl https://xavainf.com/v1/media/generations \
-H "Authorization: Bearer $XINF_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"bytedance/seedance-2.5","input":{"prompt":"the camera pushes in slowly","image":"upl_..."}}'Upload methods and lifecycle
| Operation | Request | Details |
|---|---|---|
| Raw upload | POST /v1/uploads | File bytes with Content-Type and Content-Length; up to 95 MB. |
| Form upload | POST /v1/uploads | multipart/form-data with a file field; up to 32 MB. |
| Multipart upload | POST /v1/uploads | JSON with bytes and mime, up to 200 MB. PUT the returned part_urls, then POST complete_url within one hour. Each part must match part_bytes except the final part. |
| List / inspect | GET /v1/uploads / GET /v1/uploads/{id} | Recent uploads or one upload's metadata. |
| Delete | DELETE /v1/uploads/{id} | Remove the file immediately. |
Uploads require an account key or connected app.
Limits
| kind | types (read from the file's bytes) | per file |
|---|---|---|
| image | JPEG, PNG, WebP, GIF, BMP, TIFF, HEIC/HEIF, AVIF | 30 MB |
| video | MP4, MOV, WebM | 200 MB |
| audio | MP3, WAV, FLAC, OGG/Opus, M4A, AAC | 100 MB |
Some models take less (e.g. 15 MB audio references on Seedance 2.5, 20 MB images on several video models); a request naming a larger upload is refused before anything is charged. Each account can keep up to 100 live uploads (2 GB) at once.
Price: Reference storage
An upload is charged once, when it arrives, as Reference storage: $0.02 per GB for its 24 hours, minimum $0.001 per file (a 5 MB image costs $0.001; a 200 MB video $0.004). It is paid from credits first, then cash, and shows in your Usage ledger with a link to the file while it exists, then "deleted". Reference storage earns no rewards (no buyback). Deleting early does not refund it. It counts toward the uploading API key's spend limit: an upload over the limit gets 402 key_limit_reached and is not stored.
We never store your prompts. Zero data retention end to end on models marked ZDR supported; uploaded references and generated files auto-delete after 24 hours. An upload's link answers 410 Gone once it expires or is deleted.