Files API

Upload Files

Upload images, videos, and audio files to Luno storage. Get permanent public URLs to use as references in your generation requests.


Upload

POST/api/v1/upload

Send a multipart/form-data request with a file field. The file is uploaded to your account's storage and a permanent public URL is returned.

Limits

Max file size100 MB
Rate limit125 uploads/min per key

Supported file types

ImagesJPEG, PNG, WebP
VideosMP4, MOV, WebM
AudioMP3, WAV, OGG

Response

url
string
Permanent public URL of the uploaded file.
type
string
File category: image, video, or audio.
size
number
File size in bytes.
name
string
Original file name.

Examples

Upload an image
curl -X POST https://www.lunostudio.ai/api/v1/upload \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -F "file=@/path/to/character.jpg"
Upload a video reference
curl -X POST https://www.lunostudio.ai/api/v1/upload \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -F "file=@/path/to/dance-clip.mp4"
Upload dialogue audio
curl -X POST https://www.lunostudio.ai/api/v1/upload \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -F "file=@/path/to/voiceover.mp3"
Response
{
  "url": "https://storage.lunostudio.ai/generations/user123/api-1716234567-x8k2m.jpg",
  "type": "image",
  "size": 245832,
  "name": "character.jpg"
}

Using uploaded files

Use the returned url as a value in reference_images, reference_videos, reference_audio, or last_frame when calling /api/v1/generate.

Upload then generate
# 1. Upload your character image
URL=$(curl -s -X POST https://www.lunostudio.ai/api/v1/upload \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -F "file=@character.jpg" | jq -r '.url')

# 2. Use it in a generation
curl -X POST https://www.lunostudio.ai/api/v1/generate \
  -H "Authorization: Bearer luno_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"seedance-2\",
    \"prompt\": \"@image1 walks through a park at golden hour\",
    \"reference_images\": [\"$URL\"]
  }"
Files are stored securely under your account. Each upload is namespaced to your user ID. URLs are permanent and publicly accessible so the generation service can fetch them.

Need help?

Engineering team responds within 5 minutes.