Media Upload API
Upload images, videos, and audio files to WaveSpeedAI for use in generation tasks. Returns a URL that can be passed to models accepting media inputs.
Endpoint
POST https://api.wavespeed.ai/api/v3/media/upload/binarySupported Formats
| Type | Formats |
|---|---|
| Images | JPG, JPEG, PNG, WebP, GIF, BMP, TIFF |
| Videos | MP4, AVI, MOV, WMV, FLV, WebM, MKV, 3GP, OGV |
| Audio | MP3, WAV, OGG, AAC, FLAC, WebM, M4A, Opus |
Note: For files larger than 300MB, we recommend using a URL input instead of uploading directly.
Request
curl -X POST "https://api.wavespeed.ai/api/v3/media/upload/binary" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/your/image.png"
Response
{
"code": 200,
"message": "success",
"data": {
"type": "image",
"download_url": "https://...",
"filename": "image.png",
"size": 1024000
}
}Parameters
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Binary file to upload (image, video, or audio) |
Response
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (200 for success) |
| message | string | Status message |
| data.type | string | File type (image, video, or audio) |
| data.download_url | string | URL to use in generation requests |
| data.filename | string | Original filename |
| data.size | number | File size in bytes |