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.

Image input requirements
RequirementLimitNotes
FormatsJPEG, PNG, WEBPChecked from file content, not only filename or MIME type.
Resolution3000 x 3000 px maxBoth 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.

Video input requirements
RequirementLimitNotes
FormatsMP4, MOVChecked from uploaded task metadata when available during task creation.
Duration5 minutesDuration 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
  }
}