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 × 3000 px maxBoth width and height must fit within these limits.

Image resolution by API

Some APIs have stricter input limits than the general image limit. Both image width and height must fit within the endpoint's limit.

API-specific image resolutions
RequirementLimitNotes
Enhance and upscale image1500 × 1500 px/v1/images/enhance
Enhance and upscale image (Pro)1500 × 1500 px/v1/images/enhance/pro
Enhance art/cartoon image1500 × 1500 px/v1/images/enhance-art
Get pose suggestions512 × 512 px/v1/images/pose-suggest

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.

Video resolution by API

Limits apply to the longest edge of the source video, including portrait footage. Input limits are separate from the output resolution selected for enhancement.

Video input resolution by API
RequirementLimitNotes
Remove background from video3840 px (4K)/v1/videos/remove-background
Enhance video3840 px (4K)/v1/videos/enhance
Enhance video (Pro)3840 px (4K)/v1/videos/enhance-pro
Remove objects from video1280 px/v1/videos/remove-object
Remove objects from video (Pro)1280 px/v1/videos/remove-object-pro

Audio inputs

Talking Head creates a video whose duration follows the supplied audio track.

Audio input duration by API
RequirementLimitNotes
Talking head180 seconds (3 minutes)/v1/videos/talking-head

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
  }
}