Dokumentation
Upload input files
POST /v1/files stores one reference file of up to 20 MB for 24 hours and returns a file_id you pass in input.references; 6 media types are accepted.
Upload
bash
curl https://useflowapi.com/v1/files \
-H "Authorization: Bearer $FLOWAPI_KEY" \
-F "file=@photo.png"
json
{
"id": "file_…",
"object": "file",
"filename": "photo.png",
"media_type": "image/png",
"bytes": 482113,
"expires_at": 1764547200
}
Accepted types
image/pngimage/jpegimage/webpvideo/mp4audio/mpegaudio/wav
Use the file
json
"references": [{ "role": "reference_image", "file_id": "file_…" }]
FlowAPI swaps the file_id for the stored file when the job is submitted. Only your own uploads resolve; an unknown or expired id answers 404 FLOW_FILE_NOT_FOUND. You can also pass a public https url instead of a file_id.
Uploading is free and does not touch your balance.
FAQ
- How long are uploaded files kept?
- Uploaded files are kept for 24 hours, then expire; use the file_id within that window.
- Can I pass a URL instead of uploading?
- Yes. A reference can carry a public https url instead of a file_id.
- Does uploading cost anything?
- No. Uploads are free; only generation jobs are charged.