Skip to main content
POST
https://api.muvi.video
/
v1
/
uploads
/
presign
Upload File
curl --request POST \
  --url https://api.muvi.video/v1/uploads/presign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "contentType": "<string>"
}
'
{
  "uploadUrl": "<string>",
  "fileUrl": "<string>",
  "fileId": "<string>",
  "expiresAt": "<string>",
  "maxSize": 123
}

Authentication

This endpoint requires an API key.
Authorization: Bearer YOUR_API_KEY

Request Body

filename
string
required
Name of the file to upload. Example: "my-image.png"
contentType
string
required
MIME type of the file. Allowed types: image/jpeg, image/png, image/webp, image/gif, video/mp4, video/webm, audio/mpeg, audio/wav.

Response

uploadUrl
string
Presigned PUT URL. Upload your file here with a PUT request within 15 minutes.
fileUrl
string
CDN URL where the file will be accessible after upload. Use this URL in job inputs.
fileId
string
Unique identifier for the upload. Use to check status.
expiresAt
string
ISO 8601 timestamp when the file will be automatically deleted (60 minutes from creation).
maxSize
number
Maximum allowed file size in bytes. Images: 10MB, Videos: 100MB, Audio: 50MB.

How It Works

  1. Call this endpoint to get a presigned upload URL
  2. Upload your file via PUT to the uploadUrl (include Content-Type header)
  3. Use the fileUrl in your job submission input
  4. File is automatically deleted after 60 minutes

Error Codes

CodeDescription
VALIDATION_ERRORMissing or invalid filename/contentType.
INVALID_CONTENT_TYPEContent type not in the allowed list.

Examples

# Step 1: Get presigned URL
curl -X POST https://api.muvi.video/v1/uploads/presign \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "my-image.png",
    "contentType": "image/png"
  }'

# Step 2: Upload file to the presigned URL
curl -X PUT "UPLOAD_URL_FROM_RESPONSE" \
  -H "Content-Type: image/png" \
  --data-binary "@my-image.png"

# Step 3: Use fileUrl in job submission
curl -X POST https://api.muvi.video/v1/jobs/submit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/nano-banana-pro/edit-image",
    "input": {
      "image": "FILE_URL_FROM_RESPONSE",
      "prompt": "Add a sunset background"
    }
  }'

Example Response

{
  "success": true,
  "data": {
    "uploadUrl": "https://storage.muvi.video/temp/...",
    "fileUrl": "https://assetsv1.cdn.muvi.video/temp/user_abc123/uuid_my-image.png",
    "fileId": "3f44e3c6-acd9-4cc3-a91b-e63ec517b383",
    "expiresAt": "2026-02-25T11:42:21.949Z",
    "maxSize": 10485760
  },
  "requestId": "req_abc123"
}