SnapAPI - AI Image Processing API
v1.0.0SnapAPI provides a comprehensive suite of AI-powered image processing endpoints including object removal, image enhancement, background removal, virtual try-on, image editing, and more.
https://api.snapapi.aiGet your API key
Sign up at snapapi.ai/dashboard and create an API key. Takes 10 seconds.
Make your first API call
All endpoints use input_image for image input and return output_image_url — one consistent pattern.
# 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"Get your result
Every image endpoint returns OpenAI-compatible format. Your result URL is at data[0].url. No base64 decoding needed.
{
"created": 1745827200,
"data": [
{ "url": "https://outputs.snapapi.ai/outputs/abc123.png" }
]
}More examples
AI Image Editing
# 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
# 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.
Need help? SnapAPI Support
Detection
Detect objects, text, and wires in images for use with removal endpoints.
/v1/images/detect-objectsDetect objects in image
Model:
object-detection | Credit: 1Legacy:
/api/object_removal/v5/ai_detectionParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to detect objects in. |
lang | string | Language for object class names in response messages (e.g., en, vi). |
Responses
- 200
- Objects detected successfully
DetectionResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-objects" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 categoryobject_descriptionstringDetection class name/v1/images/detect-textDetect text in image
Model:
remove-text | Credit: 4Legacy:
/api/object_removal/v5/text_detectionParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to detect text in. |
Responses
- 200
- Text detected successfully
SimpleDetectionResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-text" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"detected": true,
"mask": "base64_encoded_data..."
}Schema
detectedbooleanWhether the target was detectedmaskstringBase64-encoded RGBG mask. Null if nothing detected. Pass as input_mask to erase endpoint./v1/images/detect-wiresDetect wires/lines in image
Model:
remove-wireline | Credit: 4Legacy:
/api/object_removal/v5/wire_detectionParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to detect wires in. |
Responses
- 200
- Wires detected successfully
SimpleDetectionResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/detect-wires" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"detected": true,
"mask": "base64_encoded_data..."
}Schema
detectedbooleanWhether the target was detectedmaskstringBase64-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.
/v1/images/remove-objectsErase objects from image
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/eraseParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to erase objects from. |
original_session_id | string | Original image session ID for erasing selected objects. This ID comes from the object detection API response. |
input_mask | file | RGBG mask image file (or URL) for manual erase selection. |
mask_objects | string | JSON string of selected objects array (subset of detected_objects data from object detection API response). |
erase_mode | string | Erase mode. normal for normal erase, super for super erase, ultra for ultra erase.normalsuperultra (default: normal) |
Responses
- 200
- Objects erased successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/remove-textErase text from image
Model:
remove-text | Credit: 4Legacy:
/api/object_removal/v5/erase_textParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to erase text from. |
input_mask | file | RGBG mask image (or URL) highlighting text regions to remove. Use the mask from text detection API response. |
erase_mode | string | Erase mode. normal for normal erase, super for super erase, ultra for ultra erase.normalsuperultra (default: normal) |
Responses
- 200
- Text erased successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/remove-watermarkErase watermark and logo from image
Model:
remove-logo | Credit: 5Legacy:
/api/object_removal/v5/erase_watermarkParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to remove watermark from. |
input_mask | file | RGBG mask image (or URL) for manual watermark selection. If not provided, the API will automatically detect and remove the watermark. |
predict_mode | string | Predict 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 successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/remove-wiresErase wires/lines from image
Model:
remove-wireline | Credit: 4Legacy:
/api/object_removal/v5/erase_wireParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to erase wires from. |
input_mask | file | RGBG mask image (or URL) highlighting wire regions to remove. Use the mask from wire detection API response. |
Responses
- 200
- Wires erased successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/remove-backgroundRemove background from image
Model:
remove-background | Credit: 1Legacy:
/api/rmbg/v1/Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to remove background from. |
Responses
- 200
- Background removed successfully
RemoveBackgroundResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/remove-background" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 objectEnhance & Restore
Upscale, enhance, restore, and colorize images.
/v1/images/enhanceEnhance and upscale image (Pro)
Model:
enhance-upscale-image | Credit: 6 (2x), 11 (4x)Legacy:
/api/enhance/v1/proParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to enhance. |
zoom_factor | string | Upscale factor. 2 for 2x, 4 for 4x resolution.24 |
enhance_faces | string | Enable face enhancement (true/false).(default: true) |
face_model_ids | string | Comma-separated face model IDs for face-specific enhancement (0, 1 and 2). Example: 0,1.(default: 0,1,2) |
Responses
- 200
- Image enhanced successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/enhance-artEnhance art/cartoon image (Pro)
Model:
enhance-art-image | Credit: 2Legacy:
/api/enhance/v1/cartoon/proParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The art/cartoon image file (or URL) to enhance. |
zoom_factor | string | Upscale factor. 2 for 2x, 4 for 4x resolution.24 |
Responses
- 200
- Image enhanced successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/restoreRestore old images (Normal)
Model:
restore-image | Credit: 1Legacy:
/api/restore/v1/Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The old image file (or URL) to restore. |
Responses
- 200
- Image restored successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/restore" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/colorizeColorize old images (Normal)
Model:
colorize-image | Credit: 1Legacy:
/api/colorize/v1/Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The old image file (or URL) to colorize. |
Responses
- 200
- Image colorized successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/colorize" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 createddataobject[]urlstringURL to download the result imagesession_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.
/v1/images/generate-artGenerate AI art from photo
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: 6Legacy:
/api/fairyai/v1/gen_imageParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The source photo (or URL) for AI art generation. Provide this or image_id. |
image_id | string | Image ID of a previous AI Art generation request. This is useful for accelerating multiple style transformation requests using the same input image. |
style | string | Style ID for the art generation.(default: special_effect_fire) |
Responses
- 200
- Art image generated successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/generationsAI image generation using Z-Image model.
Models:
generate-of-z-image| Credit: 9Legacy:
/api/text-to-image/v1Parameters
| Name | Type | Description |
|---|---|---|
prompt | string | Natural language description of the desired edit(default: ) |
aspect_ratio | string | Aspect ratio (height-width) of the generated image 1:13:22:34:33:416:99:16 (default: 1:1) |
Responses
- 200
- Image generated successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/generations" \
-H "api-key: YOUR_API_KEY" \
-F "prompt=" \
-F "aspect_ratio=1:1"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/generations-qwenAI image generation using Qwen-Image model.
Models:
generate-of-qwen-image| Credit: 9Legacy:
/api/text-to-image/v2Parameters
| Name | Type | Description |
|---|---|---|
prompt | string | Natural language description of the desired edit(default: ) |
aspect_ratio | string | Aspect ratio (height-width) of the generated image 1:13:22:34:33:416:99:16 (default: 1:1) |
Responses
- 200
- Image generated successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/generations-qwen" \
-H "api-key: YOUR_API_KEY" \
-F "prompt=" \
-F "aspect_ratio=1:1"{
"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 createddataobject[]urlstringURL to download the result imagesession_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.
/v1/images/editsEdit image with AI prompt
| Mode | Description | Example |
|---|---|---|
| editing | General editing prompt | Transform the image to anime style |
| headshot | Professional 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 |
| cartoon | Create a cartoon/sticker-style image | Turn the characters in the image into Apple iOS-style 3D avatars |
| light_restore | Fix the lighting of an overexposed image. Can be run with an empty prompt | (empty prompt) |
| restore | Restore old or degraded images (e.g., scratches, noise). Can be run with an empty prompt | (empty prompt) |
| colorize | Add color to old black-and-white images. Can be run with an empty prompt | (empty prompt) |
| inpaint | Edit a specific region in the input image. Need to provide input_mask in the request data | Add 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/v2Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to edit. |
prompt | string | Natural language description of the desired edit |
mode | string | Editing mode to apply. editingheadshotcartoonlight_restoreinpaint (default: editing) |
strength | number | Strength of the editing effect (0.0 to 1.0).(default: 1) |
guidance_scale | number | Guidance scale for the model. Higher values produce results closer to the prompt.(default: 1) |
inference_steps | integer | Number of inference steps. More steps = higher quality but slower.(default: 4) |
Responses
- 200
- Image edited successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/edits/multiEdit based on multiple input images with AI prompt
| Mode | Description | Example |
|---|---|---|
| editing | General editing prompt | Put the man and the dog in a stadium |
Models:
general-edit-multi-of-qwen-image-edit | Credit: 26Legacy:
/api/image-edit/v2/multiParameters
| Name | Type | Description |
|---|---|---|
input_image_0 | file | The first image file to edit. |
input_image_1 | file | The second image file to edit (optional). |
input_image_2 | file | The third image file to edit (optional). |
prompt | string | Natural language description of the desired edit |
mode | string | Editing mode to apply. Only editing is supported at this time.editing (default: editing) |
strength | number | Strength of the editing effect (0.0 to 1.0).(default: 1) |
guidance_scale | number | Guidance scale for the model. Higher values produce results closer to the prompt.(default: 1) |
inference_steps | integer | Number of inference steps. More steps = higher quality but slower.(default: 4) |
Responses
- 200
- Image edited successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/edit-fluxCreate image editing task (FLUX Kontext)
Models:
general-image-editing-of-flux-kontext | Credit: 18Legacy:
/api/image-editing/v1/tasksParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) to edit. Provide this or image_id. |
image_id | string | Session ID of a previously uploaded image. |
prompt* | string | Text prompt describing the desired edit. |
mode | string | LoRA mode for the editing task. Only editing is supported at this time.(default: editing) |
strength | number | LoRA strength (0.0 to 1.0).(default: 1) |
guidance_scale | number | Guidance scale for the model.(default: 3.5) |
inference_steps | integer | Number of inference steps.(default: 8) |
run_fast | string | Enable fast mode for quicker but potentially lower quality results. truefalse (default: false) |
Responses
- 200
- Image editing task created
TaskCreatedResponse - 400
- Missing required fields or invalid mode
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"task_id": "task_abc123",
"status": "CREATED",
"created_at": 1745827200
}Schema
task_idstringUnique task identifier. Poll GET /v1/tasks/{task_id} for results.statusstringcreated_atintegerUnix timestamp of task creationBeauty & Style
AI-powered skin retouching, makeup transfer, and hairstyle transformation.
/v1/images/retouch-skinSkin retouching
Model:
skin-natural-retouch | Credit: 2Legacy:
/api/skin_beauty/v1Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) for beauty enhancement. |
Responses
- 200
- Skin beauty applied successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/retouch-skin" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/transfer-makeupMakeup transfer
Model:
makeup-transfer | Credit: 1Legacy:
/api/makeup/v1/transferParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The image file (or URL) for makeup transfer. |
style | string | Style ID to apply the makeup.(default: camdao) |
Responses
- 200
- Makeup applied successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/hairstyleGenerate hairstyle transformation
Model:
hairstyle-generation-lora-of-sd-1-5 | Credit: 6Legacy:
/api/hairstyler/v1Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The face image file for hairstyle transformation. Provide this or image_id. |
image_id | string | Session ID of a previously uploaded image. This is useful for accelerating multiple hairstyle transformation requests using the same face image. |
style | string | Hairstyle ID to apply. |
Responses
- 200
- Hairstyle generated successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
curl -X POST "https://api.snapapi.ai/v1/images/hairstyle" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg"{
"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 createddataobject[]urlstringURL to download the result imagesession_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.
/v1/images/try-onCreate virtual try-on task
This API supports either:
- One clothing item of type
upper,lower, orfull - Two clothing items simultaneously (
upperandlower)
Poll the GET endpoint with the returned
task_id to retrieve results.Model:
virtual-tryon-clothes | Credit: 17Legacy:
/api/tryon/v2/tasksParameters
| Name | Type | Description |
|---|---|---|
model_image | file | Person/model image file (or URL). Provide this or model_image_id. |
model_image_id | string | Session ID of a previously uploaded model image. This is useful for accelerating multiple try-on requests using the same model image. |
cloth_image | file | Clothing image file (or URL). Provide this or cloth_image_id. |
cloth_image_id | string | Session ID of a previously uploaded clothing image. This is useful for accelerating multiple try-on requests using the same clothing image. |
lower_cloth_image | file | Lower body clothing image file (or URL, if needed). Provide this or lower_cloth_image_id. |
lower_cloth_image_id | string | Session 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 | string | Type 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 successfully
TaskCreatedResponse - 400
- Missing required fields
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"task_id": "task_abc123",
"status": "CREATED",
"created_at": 1745827200
}Schema
task_idstringUnique task identifier. Poll GET /v1/tasks/{task_id} for results.statusstringcreated_atintegerUnix timestamp of task creationUtility
Utility endpoints including outpaint, pose suggestion, and health check.
/v1/images/outpaintExpand image (outpaint)
Model:
expand-image-outpaint | Credit: 15Legacy:
/api/outpaint/v1/Parameters
| Name | Type | Description |
|---|---|---|
input_image | file | The source image file (or URL) containing the original content placed on a white canvas, where white pixels indicate the expansion area. |
input_mask | file | A grayscale mask image where white pixels indicate the expansion area and black pixels indicate the original content. |
Responses
- 200
- Image outpainted successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/images/pose-suggestGet pose suggestions
Model:
pose-suggestion-lora-of-qwen-image-edit-2509 | Credit: 28Legacy:
/api/recommendation/v1/poseParameters
| Name | Type | Description |
|---|---|---|
input_image | file | The reference image file. |
num_models | integer | Number of models (persons) for pose recommendations.(default: 1) |
gender | string | Gender for pose recommendations. femalemale (default: female) |
Responses
- 200
- Pose suggestions generated successfully
SingleImageResponse - 400
- Missing required image input
ErrorResponse - 429
- Rate limit exceeded or insufficient credits
ErrorResponse - 500
- Internal server error
ErrorResponse
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"{
"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 createddataobject[]urlstringURL to download the result imagesession_idstringSession ID. Pass as `image_id` in subsequent requests to skip re-uploading.image_idstringImage ID. Pass in subsequent requests to skip re-uploading./v1/healthHealth check
Responses
- 200
- All services healthy
curl -X GET "https://api.snapapi.ai/v1/health" \
-H "api-key: YOUR_API_KEY"{
"status": "healthy",
"checks": {
"worker": "ok",
"upstream": "ok",
"backend": "ok",
"kv": "ok"
},
"timestamp": "2026-04-28T10:00:00Z"
}Schema
statusstringchecksobjectworkerstringupstreamstringbackendstringkvstringtimestampstringTasks
Poll and manage async tasks created by Virtual Try-On and FLUX Kontext editing endpoints.
/v1/tasks/{task_id}Get task status
CREATED status older than 120 seconds.Parameters
| Name | Type | Description |
|---|---|---|
task_id* | string | The task ID returned from the create task endpoint. |
Responses
- 200
- Task status retrieved
TaskStatusResponse - 404
- Task not found
ErrorResponse
curl -X GET "https://api.snapapi.ai/v1/tasks/YOUR_TASK_ID" \
-H "api-key: YOUR_API_KEY"{
"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_idstringstatusstringprogressintegerProgress 0-100 (when PROCESSING)output_image_urlstringResult image URL (when COMPLETED)error_msgstringError message (when FAILED)created_atintegerstarted_atintegercompleted_atinteger/v1/tasks/{task_id}Cancel task
Parameters
| Name | Type | Description |
|---|---|---|
task_id* | string | The 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"{
"message": "task abc123 cancelled"
}Schema
messagestring