API Reference
Input requirements
Media files are checked in the API worker before processing starts, so invalid files fail early with a structured API error.
Validated before upstream processing
When validation fails, Snapedit returns a 400 invalid_request_error before creating the upstream job or charging credits.
Image inputs
Image fields accept uploaded files or image URLs. The worker checks the actual file signature and image dimensions after request fields are normalized.
| Requirement | Limit | Notes |
|---|---|---|
| Formats | JPEG, PNG, WEBP | Checked from file content, not only filename or MIME type. |
| Resolution | 3000 x 3000 px max | Both width and height must be 3000 px or less. |
Video inputs
Video workflows use signed upload URLs. Because the binary upload goes directly to storage, the worker validates video requirements on create-task requests.
| Requirement | Limit | Notes |
|---|---|---|
| Formats | MP4, MOV | Checked from uploaded task metadata when available during task creation. |
| Duration | 5 minutes | Duration is checked before credits are reserved for the async task. |
Validation errors
Invalid media returns the same structured error format used by the rest of the API.
{
"error": {
"message": "Invalid image for 'input_image'. Supported image formats are JPEG, PNG, and WEBP.",
"type": "invalid_request_error",
"code": 400
}
}