File Uploads
Upload Image
Upload images to get URLs for use in image/video generation APIs
POST
The docs Playground does not support file uploads: Please use the cURL, Python, or JavaScript code examples below for testing.
Why Upload First?
- Performance - Base64 encoding inflates data by 33%, uploading first significantly reduces request payload size
- Reusability - Upload once, use the URL multiple times without re-transmitting
Workflow
Authorizations
Body
Image fileSupported formats:
- JPEG (.jpg, .jpeg)
- PNG (.png)
- WebP (.webp)
- GIF (.gif)
- Maximum file size: 10MB
Upload purpose (optional)Default:
generationResponse
Whether the request succeeded
Complete Example: Image-to-Image Workflow
Here’s a complete image-to-image workflow example:Python Complete Example