Documentation Index
Fetch the complete documentation index at: https://docs.eachlabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Many models accept media (images, video, audio) as input. To use your own files, upload them with this endpoint and pass the returnedpublic_url to Create Prediction.
Uploads happen in two steps:
Request a presigned URL
POST /v1/upload/presign with file metadata. The response contains a short-lived URL to upload to and a permanent public_url.Step 1 — Request a presigned URL
Endpoint
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
content_type | string | Yes | MIME type of the file (e.g., image/png, video/mp4, audio/mpeg). |
file_type | string | No | High-level category. One of image, video, audio, other. |
Code Examples
Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Internal upload identifier. |
presigned_url | string | Short-lived URL to PUT the file to. |
public_url | string | Permanent URL to pass as a model input once the upload succeeds. |
expires_at | string | ISO-8601 timestamp when presigned_url stops accepting uploads. |
required_headers | object | Headers that must be sent verbatim on the PUT request. The presigned URL is signed for these exact values — missing or modified headers will fail with a signature mismatch. May be empty. |
Step 2 — Upload the file
PUT the raw file bytes to presigned_url. Include every header from required_headers exactly as returned, plus a Content-Type matching the value sent in step 1.
200 OK from the PUT means the file is live. Use public_url as the input value when you create a prediction.
Limits
| Limit | Value | Notes |
|---|---|---|
| Max file size | 100 MB per upload | |
| Presigned URL lifetime | 15 minutes | Use the URL before expires_at; request a new one if it lapses. |
Error Responses
| Status | Body | Description |
|---|---|---|
400 | {"error": "content_type is required"} | Missing required field. |
401 | {"error": "Invalid or missing API key"} | Authentication failure. |
500 | {"error": "Failed to generate presigned URL"} | Server error. |
The presigned URL expires 15 minutes after it’s issued. Upload soon after requesting — if you wait past
expires_at, just request a new one.