docs
docs

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.

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). Each such parameter accepts either:

  • an https URL the model can fetch (we check it with a quick HEAD request; plain http links are refused), or
  • an upload id (upl_...) from POST /v1/uploads: we hand the model a signed, time-limited link to the file (or the bytes themselves, for models that take files inline).

Upload a file

curl
curl https://zinf.ai/v1/uploads \
  -H "Authorization: Bearer $XINF_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @first-frame.png

# {"id":"upl_...","object":"upload","url":"https://zinf.ai/refs/upl_....png?sig=...",
#  "mime":"image/png","kind":"image","bytes":482113,"created_at":1790000000,
#  "expires_at":1790086400,"status":"active","cost_usd":"0.001"}
use it
curl https://zinf.ai/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_..."}}'
  • Send the file as the raw request body with its Content-Length (up to 95 MB), or as multipart/form-data with a file field (up to 32 MB).
  • Larger files (up to 200 MB) go up in parts: POST /v1/uploads with {"bytes": N, "mime": "video/mp4"} returns part_urls and complete_url; PUT each part (exactly part_bytes, the last one the rest), then POST the complete URL within an hour.
  • GET /v1/uploads lists the last day's uploads, GET /v1/uploads/{id} shows one, DELETE /v1/uploads/{id} deletes it at once.
  • Uploads need an account (an API key, a connected app, or the signed-in Playground). x402 pay-per-request calls pass https URLs instead.

Limits

kindtypes (read from the file's bytes)per file
imageJPEG, PNG, WebP, GIF, BMP, TIFF, HEIC/HEIF, AVIF30 MB
videoMP4, MOV, WebM200 MB
audioMP3, WAV, FLAC, OGG/Opus, M4A, AAC100 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 Elite discount, no buyback). Deleting early does not refund it.

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.