EggAPI/docs / uploads
sign in

Uploads

Host input images, videos, and audio on EggAPI storage for edit and video models

Models read input media from public http(s) URLs. If your files are local or private, upload them with POST /v1/uploads and pass the returned URLs in image_urls or parameters.

Upload Files

Send a multipart/form-data request with one or more files in the files[] field (files also works):

bash
curl -X POST https://api.eggapi.ai/v1/uploads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "files[]=@./first-frame.png" \
  -F "files[]=@./last-frame.png"

Response (201 Created):

json
{
  "data": {
    "files": [
      {
        "url": "https://file.eggapi.ai/uploads/image/your-user-id/6f1c2b0e-0f1a-4f7e-9a51-3c1d2e4b5a6f.png",
        "key": "uploads/image/your-user-id/6f1c2b0e-0f1a-4f7e-9a51-3c1d2e4b5a6f.png",
        "content_type": "image/png",
        "size": 482113
      },
      {
        "url": "https://file.eggapi.ai/uploads/image/your-user-id/1a7d9e44-5b2c-4c8e-8f0d-9e6b7a1c2d3e.png",
        "key": "uploads/image/your-user-id/1a7d9e44-5b2c-4c8e-8f0d-9e6b7a1c2d3e.png",
        "content_type": "image/png",
        "size": 455870
      }
    ]
  },
  "error": null
}

Then use the URLs in a generation request:

json
{
  "model": "bytedance/seedance-2.0/image-to-video",
  "prompt": "The petals unfold as the camera pulls back",
  "image_urls": ["https://file.eggapi.ai/uploads/image/your-user-id/6f1c2b0e-0f1a-4f7e-9a51-3c1d2e4b5a6f.png"],
  "duration": 5,
  "parameters": {
    "last_image": "https://file.eggapi.ai/uploads/image/your-user-id/1a7d9e44-5b2c-4c8e-8f0d-9e6b7a1c2d3e.png"
  }
}

Limits

File typeMaximum size
Images (image/*)20 MB per file
Videos (video/*)200 MB per file
Audio (audio/*)50 MB per file
  • One request can carry up to 512 MB in total.
  • Other content types are rejected with 400 VALIDATION_ERROR. When a file has no usable Content-Type, EggAPI detects it from the file contents.
  • Uploaded files are publicly readable by URL. Do not upload anything you would not share with the model provider.

Errors

StatusCodeCause
400VALIDATION_ERRORMissing files[], unsupported content type, or a file over its size limit.
401UNAUTHORIZEDMissing or invalid API key.
503SERVICE_UNAVAILABLEFile storage is temporarily unavailable.
connected
mcp https://api.eggapi.ai/mcp
models ...
Claude Code · Codex · MCP
█