API Reference

SnapAPI - AI Image Processing API

v1.0.0

SnapAPI provides a comprehensive suite of AI-powered image processing endpoints including object removal, image enhancement, background removal, virtual try-on, image editing, and more.

Authentication
Include api-key: YOUR_API_KEY header
Get API Key
Base URL
https://api.snapapi.ai
Credits
Based on your plan
1

Get your API key

Sign up at snapapi.ai/dashboard and create an API key. Takes 10 seconds.

2

Make your first API call

All endpoints use input_image for image input and return output_image_url — one consistent pattern.

bash
# Option A: api-key header
curl -X POST "https://api.snapapi.ai/v1/images/remove-background" \
  -H "api-key: sk-snap-xxxxx" \
  -F "input_image=@photo.jpg"

# Option B: Bearer token (OpenAI-compatible)
curl -X POST "https://api.snapapi.ai/v1/images/remove-background" \
  -H "Authorization: Bearer sk-snap-xxxxx" \
  -F "input_image=@photo.jpg"
3

Get your result

Every image endpoint returns OpenAI-compatible format. Your result URL is at data[0].url. No base64 decoding needed.

json
{
  "created": 1745827200,
  "data": [
    { "url": "https://outputs.snapapi.ai/outputs/abc123.png" }
  ]
}

More examples

AI Image Editing

bash
# Edit an image with AI prompt
curl -X POST "https://api.snapapi.ai/v1/images/edits" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@photo.jpg" \
  -F "prompt=Transform to anime style" \
  -F "mode=editing"

Text to Image

bash
# Generate image from text
curl -X POST "https://api.snapapi.ai/v1/images/generations" \
  -H "api-key: YOUR_API_KEY" \
  -F "prompt=A professional headshot of a woman in a studio" \
  -F "aspect_ratio=3:4"

Rate Limits

60 requests/minute per API key. Check x-ratelimit-remaining-requests header to track usage. On 429, wait for retry-after seconds.

Detection

Detect objects, text, and wires in images for use with removal endpoints.

detectObjectsdetectTextdetectWires
post/v1/images/detect-objects

Detect objects in image

Automatically detect removable objects in an image using AI. Returns bounding boxes and masks for detected objects (sorted by confidence score in descending order) and these information can be used in object removal API.

Model: object-detection | Credit: 1

Legacy: /api/object_removal/v5/ai_detection

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to detect objects in.
lang
stringLanguage for object class names in response messages (e.g., en, vi).

Responses

200
Objects detected successfullyDetectionResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-objects" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "session_id": "sess_abc123",
  "detected_objects": [
    {
      "bbox": [
        120,
        50,
        300,
        400
      ],
      "mask": "base64_encoded_data...",
      "accuracy": 0.95,
      "object_type": "person",
      "object_description": "person"
    }
  ]
}

Schema

session_idstringSession ID for the processed image. Pass as original_session_id to erase endpoint.
detected_objectsobject[]Detected regions sorted by confidence (descending)
bboxnumber[]Bounding box [x1, y1, x2, y2]
maskstringBase64-encoded RGBG mask (same resolution as bbox)
accuracynumberConfidence score (0.0 to 1.0)
object_typestringDetection category
object_descriptionstringDetection class name
post/v1/images/detect-text

Detect text in image

Detect text regions in an image. Returns masks for detected text areas that can be used with the text removal API.

Model: remove-text | Credit: 4

Legacy: /api/object_removal/v5/text_detection

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to detect text in.

Responses

200
Text detected successfullySimpleDetectionResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-text" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "detected": true,
  "mask": "base64_encoded_data..."
}

Schema

detectedbooleanWhether the target was detected
maskstringBase64-encoded RGBG mask. Null if nothing detected. Pass as input_mask to erase endpoint.
post/v1/images/detect-wires

Detect wires/lines in image

Detect power lines, cables, and wires in an image. Returns masks for detected wire regions and these information can be used in wire removal API.

Model: remove-wireline | Credit: 4

Legacy: /api/object_removal/v5/wire_detection

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to detect wires in.

Responses

200
Wires detected successfullySimpleDetectionResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-wires" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "detected": true,
  "mask": "base64_encoded_data..."
}

Schema

detectedbooleanWhether the target was detected
maskstringBase64-encoded RGBG mask. Null if nothing detected. Pass as input_mask to erase endpoint.

Removal & Erase

Remove objects, text, wires, watermarks, and backgrounds from images.

removeObjectsremoveTextremoveWatermarkremoveWiresremoveBackground
post/v1/images/remove-objects

Erase objects from image

Remove objects from an image using mask-based or selected-object erasing. Supports normal erase (GAN), super erase (SD), ultra erase (Qwen).

To get the best results, you should combine this API with the object detection API (i.e., select the detected object to erase).

Models: remove-object-gan, remove-object-sd, remove-object-qwen | Credit: 3 (normal), 4 (super), 13 (ultra).

Legacy: /api/object_removal/v5/erase

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to erase objects from.
original_session_id
stringOriginal image session ID for erasing selected objects. This ID comes from the object detection API response.
input_mask
fileRGBG mask image file (or URL) for manual erase selection.
mask_objects
stringJSON string of selected objects array (subset of detected_objects data from object detection API response).
erase_mode
stringErase mode. normal for normal erase, super for super erase, ultra for ultra erase.
normalsuperultra
(default: normal)

Responses

200
Objects erased successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-objects" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png" \
  -F "erase_mode=normal"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/remove-text

Erase text from image

Remove detected text from an image using a text mask.

Model: remove-text | Credit: 4

Legacy: /api/object_removal/v5/erase_text

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to erase text from.
input_mask
fileRGBG mask image (or URL) highlighting text regions to remove. Use the mask from text detection API response.
erase_mode
stringErase mode. normal for normal erase, super for super erase, ultra for ultra erase.
normalsuperultra
(default: normal)

Responses

200
Text erased successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-text" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png" \
  -F "erase_mode=normal"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/remove-watermark

Erase watermark and logo from image

Remove watermarks and logos from an image. This API supports automatic detection and removal, or manual removal within a selected region.

Model: remove-logo | Credit: 5

Legacy: /api/object_removal/v5/erase_watermark

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to remove watermark from.
input_mask
fileRGBG mask image (or URL) for manual watermark selection. If not provided, the API will automatically detect and remove the watermark.
predict_mode
stringPredict mode for the watermark removal. 3.0 is better for general cases while 2.0 is suitable for emoji cases.
2.03.0
(default: 2.0)

Responses

200
Watermark erased successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-watermark" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png" \
  -F "predict_mode=2.0"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/remove-wires

Erase wires/lines from image

Remove detected wires, power lines, and cables from an image.

Model: remove-wireline | Credit: 4

Legacy: /api/object_removal/v5/erase_wire

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to erase wires from.
input_mask
fileRGBG mask image (or URL) highlighting wire regions to remove. Use the mask from wire detection API response.

Responses

200
Wires erased successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-wires" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/remove-background

Remove background from image

Remove the background from an image. Returns a mask of the foreground object.

Model: remove-background | Credit: 1

Legacy: /api/rmbg/v1/

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to remove background from.

Responses

200
Background removed successfullyRemoveBackgroundResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-background" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "output_image_url": "https://outputs.snapapi.ai/outputs/abc123.png",
  "box": [
    10,
    20,
    300,
    400
  ]
}

Schema

output_image_urlstringURL to download the result image (RGBA with transparent background)
boxnumber[]Bounding box [x1, y1, x2, y2] of foreground object

Enhance & Restore

Upscale, enhance, restore, and colorize images.

enhanceProenhanceArtProrestoreImagecolorizeImage
post/v1/images/enhance

Enhance and upscale image (Pro)

Upscale and enhance image resolution using AI. Supports 2x and 4x upscaling with optional face enhancement.

Model: enhance-upscale-image | Credit: 6 (2x), 11 (4x)

Legacy: /api/enhance/v1/pro

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to enhance.
zoom_factor
stringUpscale factor. 2 for 2x, 4 for 4x resolution.
24
enhance_faces
stringEnable face enhancement (true/false).(default: true)
face_model_ids
stringComma-separated face model IDs for face-specific enhancement (0, 1 and 2). Example: 0,1.(default: 0,1,2)

Responses

200
Image enhanced successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/enhance" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "zoom_factor=2" \
  -F "enhance_faces=true" \
  -F "face_model_ids=0,1,2"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/enhance-art

Enhance art/cartoon image (Pro)

Upscale and enhance cartoon, anime, or art-style images with a model optimized for non-photographic content.

Model: enhance-art-image | Credit: 2

Legacy: /api/enhance/v1/cartoon/pro

Parameters

NameTypeDescription
input_image
fileThe art/cartoon image file (or URL) to enhance.
zoom_factor
stringUpscale factor. 2 for 2x, 4 for 4x resolution.
24

Responses

200
Image enhanced successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/enhance-art" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "zoom_factor=2"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/restore

Restore old images (Normal)

Restore and enhance old images, remove the scratches.

Model: restore-image | Credit: 1

Legacy: /api/restore/v1/

Parameters

NameTypeDescription
input_image
fileThe old image file (or URL) to restore.

Responses

200
Image restored successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/restore" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/colorize

Colorize old images (Normal)

Colorize old images.

Model: colorize-image | Credit: 1

Legacy: /api/colorize/v1/

Parameters

NameTypeDescription
input_image
fileThe old image file (or URL) to colorize.

Responses

200
Image colorized successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/colorize" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.

Generation

Generate images from text prompts or transform photos into AI art.

generateArtgenerateImagegenerateImageQwen
post/v1/images/generate-art

Generate AI art from photo

Transform a photo into AI-generated art using various styles. The style list and preview images are in this link.

The styles can be divided into two categories: v1 (global image transformation) and v2 (avatar-oriented transformation). v1 is preferred for images with multiple subjects, while v2 is designed for a single person.

Model: fairy-ai-art-gen | Credit: 6

Legacy: /api/fairyai/v1/gen_image

Parameters

NameTypeDescription
input_image
fileThe source photo (or URL) for AI art generation. Provide this or image_id.
image_id
stringImage ID of a previous AI Art generation request. This is useful for accelerating multiple style transformation requests using the same input image.
style
stringStyle ID for the art generation.(default: special_effect_fire)

Responses

200
Art image generated successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/generate-art" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "style=special_effect_fire"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/generations

AI image generation using Z-Image model.

Generate images using natural language prompts powered by the Z-Image model. This API is particularly strong at generating realistic human images.

Models: generate-of-z-image| Credit: 9

Legacy: /api/text-to-image/v1

Parameters

NameTypeDescription
prompt
stringNatural language description of the desired edit(default: )
aspect_ratio
stringAspect ratio (height-width) of the generated image
1:13:22:34:33:416:99:16
(default: 1:1)

Responses

200
Image generated successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/generations" \
  -H "api-key: YOUR_API_KEY" \
  -F "prompt=" \
  -F "aspect_ratio=1:1"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/generations-qwen

AI image generation using Qwen-Image model.

Generate an image using natural language prompts powered by the Qwen-Image model. This API is suitable for general cases, including poster, illustration, anime images.

Models: generate-of-qwen-image| Credit: 9

Legacy: /api/text-to-image/v2

Parameters

NameTypeDescription
prompt
stringNatural language description of the desired edit(default: )
aspect_ratio
stringAspect ratio (height-width) of the generated image
1:13:22:34:33:416:99:16
(default: 1:1)

Responses

200
Image generated successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/generations-qwen" \
  -H "api-key: YOUR_API_KEY" \
  -F "prompt=" \
  -F "aspect_ratio=1:1"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.

Editing

Edit images using AI prompts with various models and modes.

editImageeditImageMultieditFlux
post/v1/images/edits

Edit image with AI prompt

Edit an image using natural language prompts powered by the Qwen-Image-Edit model. Supports multiple editing modes:
ModeDescriptionExample
editingGeneral editing promptTransform the image to anime style
headshotProfessional portrait image generation for the given person image. You need to add [FACE CROP] to the prompt[FACE CROP] Professional headshot image of the reference subject in a studio
cartoonCreate a cartoon/sticker-style imageTurn the characters in the image into Apple iOS-style 3D avatars
light_restoreFix the lighting of an overexposed image. Can be run with an empty prompt(empty prompt)
restoreRestore old or degraded images (e.g., scratches, noise). Can be run with an empty prompt(empty prompt)
colorizeAdd color to old black-and-white images. Can be run with an empty prompt(empty prompt)
inpaintEdit a specific region in the input image. Need to provide input_mask in the request dataAdd a ball


Models: general-edit-of-qwen-image-edit, headshot-generation-of-qwen-image-edit, cartoon-sticker-generation-of-qwen-image-edit, light-restoration-of-qwen-image-edit, restore-of-qwen-image-edit, colorize-of-qwen-image-edit, inpaint-of-qwen-image-edit | Credit: 13 (editing/restore/colorize/inpaint), 21 (headshot/cartoon/light_restore)

Legacy: /api/image-edit/v2

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to edit.
prompt
stringNatural language description of the desired edit
mode
stringEditing mode to apply.
editingheadshotcartoonlight_restoreinpaint
(default: editing)
strength
numberStrength of the editing effect (0.0 to 1.0).(default: 1)
guidance_scale
numberGuidance scale for the model. Higher values produce results closer to the prompt.(default: 1)
inference_steps
integerNumber of inference steps. More steps = higher quality but slower.(default: 4)

Responses

200
Image edited successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/edits" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "mode=editing" \
  -F "strength=1" \
  -F "guidance_scale=1" \
  -F "inference_steps=4"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/edits/multi

Edit based on multiple input images with AI prompt

Edit based on multiple images (up to 3) using natural language prompts powered by the Qwen-Image-Edit model. Supports multiple editing modes:
ModeDescriptionExample
editingGeneral editing promptPut the man and the dog in a stadium


Models: general-edit-multi-of-qwen-image-edit | Credit: 26

Legacy: /api/image-edit/v2/multi

Parameters

NameTypeDescription
input_image_0
fileThe first image file to edit.
input_image_1
fileThe second image file to edit (optional).
input_image_2
fileThe third image file to edit (optional).
prompt
stringNatural language description of the desired edit
mode
stringEditing mode to apply. Only editing is supported at this time.
editing
(default: editing)
strength
numberStrength of the editing effect (0.0 to 1.0).(default: 1)
guidance_scale
numberGuidance scale for the model. Higher values produce results closer to the prompt.(default: 1)
inference_steps
integerNumber of inference steps. More steps = higher quality but slower.(default: 4)

Responses

200
Image edited successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/edits/multi" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image_0=@./image.jpg" \
  -F "input_image_1=@./image.jpg" \
  -F "input_image_2=@./image.jpg" \
  -F "mode=editing" \
  -F "strength=1" \
  -F "guidance_scale=1" \
  -F "inference_steps=4"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/edit-flux

Create image editing task (FLUX Kontext)

Create an async image editing task using the FLUX Kontext model. Currently, only the editing mode is supported for general image editing use cases.

Models: general-image-editing-of-flux-kontext | Credit: 18

Legacy: /api/image-editing/v1/tasks

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) to edit. Provide this or image_id.
image_id
stringSession ID of a previously uploaded image.
prompt*
stringText prompt describing the desired edit.
mode
stringLoRA mode for the editing task. Only editing is supported at this time.(default: editing)
strength
numberLoRA strength (0.0 to 1.0).(default: 1)
guidance_scale
numberGuidance scale for the model.(default: 3.5)
inference_steps
integerNumber of inference steps.(default: 8)
run_fast
stringEnable fast mode for quicker but potentially lower quality results.
truefalse
(default: false)

Responses

200
Image editing task createdTaskCreatedResponse
400
Missing required fields or invalid modeErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/edit-flux" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "prompt=value" \
  -F "mode=editing" \
  -F "strength=1" \
  -F "guidance_scale=3.5" \
  -F "inference_steps=8" \
  -F "run_fast=true"
Response
{
  "task_id": "task_abc123",
  "status": "CREATED",
  "created_at": 1745827200
}

Schema

task_idstringUnique task identifier. Poll GET /v1/tasks/{task_id} for results.
statusstring
created_atintegerUnix timestamp of task creation

Beauty & Style

AI-powered skin retouching, makeup transfer, and hairstyle transformation.

retouchSkintransferMakeuphairstyle
post/v1/images/retouch-skin

Skin retouching

Apply natural skin retouching and enhancement to all faces in the image.

Model: skin-natural-retouch | Credit: 2

Legacy: /api/skin_beauty/v1

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) for beauty enhancement.

Responses

200
Skin beauty applied successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/retouch-skin" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/transfer-makeup

Makeup transfer

Apply makeup styles to all faces in the image. The style list and preview images are in this link.

Model: makeup-transfer | Credit: 1

Legacy: /api/makeup/v1/transfer

Parameters

NameTypeDescription
input_image
fileThe image file (or URL) for makeup transfer.
style
stringStyle ID to apply the makeup.(default: camdao)

Responses

200
Makeup applied successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/transfer-makeup" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "style=camdao"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/hairstyle

Generate hairstyle transformation

Transform the hairstyle in a face photo with multiple reference hairstyles in this link.

Model: hairstyle-generation-lora-of-sd-1-5 | Credit: 6

Legacy: /api/hairstyler/v1

Parameters

NameTypeDescription
input_image
fileThe face image file for hairstyle transformation. Provide this or image_id.
image_id
stringSession ID of a previously uploaded image. This is useful for accelerating multiple hairstyle transformation requests using the same face image.
style
stringHairstyle ID to apply.

Responses

200
Hairstyle generated successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/hairstyle" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.

Virtual Try-On

Virtual clothing try-on using AI.

createTryOnTask
post/v1/images/try-on

Create virtual try-on task

Create an asynchronous virtual try-on task. Upload a model (person) image and one or two clothing images to generate the try-on result.

This API supports either:
  1. One clothing item of type upper, lower, or full
  2. Two clothing items simultaneously (upper and lower)


Poll the GET endpoint with the returned task_id to retrieve results.

Model: virtual-tryon-clothes | Credit: 17

Legacy: /api/tryon/v2/tasks

Parameters

NameTypeDescription
model_image
filePerson/model image file (or URL). Provide this or model_image_id.
model_image_id
stringSession ID of a previously uploaded model image. This is useful for accelerating multiple try-on requests using the same model image.
cloth_image
fileClothing image file (or URL). Provide this or cloth_image_id.
cloth_image_id
stringSession ID of a previously uploaded clothing image. This is useful for accelerating multiple try-on requests using the same clothing image.
lower_cloth_image
fileLower body clothing image file (or URL, if needed). Provide this or lower_cloth_image_id.
lower_cloth_image_id
stringSession ID of a previously uploaded lower clothing image (if needed). This is useful for accelerating multiple try-on requests using the same clothing image.
cloth_type
stringType of clothing (e.g., upper, lower, full). If using both cloth_image and lower_cloth_image, this value must be set to full.

Responses

200
Try-on task created successfullyTaskCreatedResponse
400
Missing required fieldsErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/try-on" \
  -H "api-key: YOUR_API_KEY" \
  -F "model_image=@./image.jpg" \
  -F "cloth_image=@./image.jpg" \
  -F "lower_cloth_image=@./image.jpg"
Response
{
  "task_id": "task_abc123",
  "status": "CREATED",
  "created_at": 1745827200
}

Schema

task_idstringUnique task identifier. Poll GET /v1/tasks/{task_id} for results.
statusstring
created_atintegerUnix timestamp of task creation

Utility

Utility endpoints including outpaint, pose suggestion, and health check.

outpaintposeSuggesthealthCheck
post/v1/images/outpaint

Expand image (outpaint)

Expand an image beyond its original boundaries. Requires both the source image and a mask indicating the expansion area.

Model: expand-image-outpaint | Credit: 15

Legacy: /api/outpaint/v1/

Parameters

NameTypeDescription
input_image
fileThe source image file (or URL) containing the original content placed on a white canvas, where white pixels indicate the expansion area.
input_mask
fileA grayscale mask image where white pixels indicate the expansion area and black pixels indicate the original content.

Responses

200
Image outpainted successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/outpaint" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
post/v1/images/pose-suggest

Get pose suggestions

Generate AI pose suggestions for a reference scene image.

Model: pose-suggestion-lora-of-qwen-image-edit-2509 | Credit: 28

Legacy: /api/recommendation/v1/pose

Parameters

NameTypeDescription
input_image
fileThe reference image file.
num_models
integerNumber of models (persons) for pose recommendations.(default: 1)
gender
stringGender for pose recommendations.
femalemale
(default: female)

Responses

200
Pose suggestions generated successfullySingleImageResponse
400
Missing required image inputErrorResponse
429
Rate limit exceeded or insufficient creditsErrorResponse
500
Internal server errorErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/pose-suggest" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "num_models=1" \
  -F "gender=female"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ],
  "session_id": "sess_abc123",
  "image_id": "img_abc123"
}

Schema

createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
session_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.
image_idstringImage ID. Pass in subsequent requests to skip re-uploading.
get/v1/health

Health check

Returns the health status of all SnapAPI services. No authentication required.

Responses

200
All services healthy
curl -X GET "https://api.snapapi.ai/v1/health" \
  -H "api-key: YOUR_API_KEY"
Response
{
  "status": "healthy",
  "checks": {
    "worker": "ok",
    "upstream": "ok",
    "backend": "ok",
    "kv": "ok"
  },
  "timestamp": "2026-04-28T10:00:00Z"
}

Schema

statusstring
checksobject
workerstring
upstreamstring
backendstring
kvstring
timestampstring

Tasks

Poll and manage async tasks created by Virtual Try-On and FLUX Kontext editing endpoints.

getTaskStatuscancelTask
get/v1/tasks/{task_id}

Get task status

Retrieve the status and result of an async task (Virtual Try-On or FLUX Kontext editing). Poll this endpoint after creating a task. Auto-fails tasks with CREATED status older than 120 seconds.

Parameters

NameTypeDescription
task_id*
stringThe task ID returned from the create task endpoint.

Responses

200
Task status retrievedTaskStatusResponse
404
Task not foundErrorResponse
curl -X GET "https://api.snapapi.ai/v1/tasks/YOUR_TASK_ID" \
  -H "api-key: YOUR_API_KEY"
Response
{
  "task_id": "task_abc123",
  "status": "COMPLETED",
  "progress": 75,
  "output_image_url": "https://outputs.snapapi.ai/outputs/result.png",
  "error_msg": "string",
  "created_at": 0,
  "started_at": 0,
  "completed_at": 0
}

Schema

task_idstring
statusstring
progressintegerProgress 0-100 (when PROCESSING)
output_image_urlstringResult image URL (when COMPLETED)
error_msgstringError message (when FAILED)
created_atinteger
started_atinteger
completed_atinteger
delete/v1/tasks/{task_id}

Cancel task

Cancel a pending async task (Virtual Try-On or FLUX Kontext editing).

Parameters

NameTypeDescription
task_id*
stringThe task ID to cancel.

Responses

200
Task cancelled
curl -X DELETE "https://api.snapapi.ai/v1/tasks/YOUR_TASK_ID" \
  -H "api-key: YOUR_API_KEY"
Response
{
  "message": "task abc123 cancelled"
}

Schema

messagestring