API Documentation
Integrate Sirv AI Studio with Zapier, Make, n8n, or your own applications.
Authentication
All endpoints require an API key passed in the Authorization header:
Authorization: Bearer sk_live_YOUR_API_KEYGenerate your API key in Account Settings.
Base URL
https://www.sirv.studio/api/zapierAccount
/meVerify API key and get account information. Use this to test authentication.
Response
{
"id": "user_abc123",
"email": "user@example.com",
"credits": 500,
"tier": "pro"
}Credits: FREE
Image Processing
/remove-bgRemove the background from an image, leaving only the subject with transparency.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to process |
| model | string | No | birefnet (default, 1 credit) or bria (2 credits) |
Credits: 1-2
/upscaleEnhance image resolution using AI upscaling.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to upscale |
| scale | number | No | Upscale factor: 2, 3, or 4 (default: 2) |
| model | string | No | esrgan (1 credit), clarity (8 credits), or topaz (8 credits) |
Credits: 1-8
/replace-bgReplace the background of an image with an AI-generated scene.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image with subject to keep |
| prompt | string | Yes | Text description of the new background |
| model | string | No | bria (4 credits), flux-kontext (15 credits), or nano-banana (3 credits) |
Credits: 3-15
/object-removalRemove unwanted objects from an image using a mask.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to edit |
| mask_url | string | Yes | URL of mask image (white = areas to remove) |
Credits: 3
/image-to-imageTransform an existing image based on a text prompt while preserving composition.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the source image |
| prompt | string | Yes | Description of the transformation |
| model | string | No | reve-fast-edit (1 credit), zimage-i2i (2 credits), or flux2-edit (3 credits) |
| strength | number | No | Transformation strength 0-1 (default: 0.75) |
Credits: 1-8
/depth-mapGenerate a depth map from an image showing relative distances from the camera.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to analyze |
Useful for 3D effects, parallax scrolling, or understanding scene geometry.
Credits: FREE
/image-translationTranslate text within an image to another language while preserving the design.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image with text to translate |
| target_language | string | Yes | Target language (e.g., 'Spanish', 'Japanese', 'French') |
| source_language | string | No | Source language (auto-detected if not specified) |
| model | string | No | gemini (3 credits), gpt-image-1.5-edit, or seedream-edit (4 credits) |
Credits: 3-4
Image Generation
/generateCreate an image from a text description using AI.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text description of the image to generate |
| model | string | No | zimage (1 credit), flux2 (2 credits), gemini (8 credits), or seedream (4 credits) |
| aspect_ratio | string | No | square_hd, portrait_4_3, landscape_4_3 (default), landscape_16_9, portrait_16_9 |
Credits: 1-10
Video Generation
/video-generationGenerate a video from text and/or an image using AI.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Description of the video to generate |
| image_url | string | No | Starting image (required for veo31, ltx, kling) |
| model | string | No | veo31 (56 credits), ltx (18 credits), kling (12 credits), or sora (80 credits, text-only) |
| duration | string | No | Video duration in seconds (default: 5) |
| aspect_ratio | string | No | auto, 16:9, 9:16, or 1:1 |
| generate_audio | boolean | No | Generate audio (default: true) |
Response
{
"id": "zap_abc123",
"video_url": "https://...",
"credits_used": 56
}Credit costs vary by model and duration. veo31, ltx, and kling require an input image. Only sora supports text-to-video.
Credits: 10-80 (varies by duration)
3D Model Generation
/image-to-3dGenerate a 3D model from an image using AI.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to convert |
| model | string | No | trellis (2 credits), meshy-multi (25 credits), meshy (50 credits), or seed3d (50 credits) |
| topology | string | No | triangle (default) or quad |
| enable_pbr | boolean | No | Enable PBR textures (default: true) |
Response
{
"id": "zap_abc123",
"model_url": "https://...",
"glb_url": "https://...",
"obj_url": "https://...",
"fbx_url": "https://...",
"usdz_url": "https://...",
"thumbnail_url": "https://...",
"credits_used": 50
}Credits: 2-50
E-commerce Tools
/product-lifestylePlace a product in a realistic lifestyle scene for marketing.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the product image (ideally with transparent background) |
| scene_description | string | Yes | Description of the lifestyle scene |
| position | string | No | bottom_center (default), bottom_left, bottom_right, or center_horizontal |
Credits: 4
/virtual-try-onVirtually try clothing on a person using AI.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| person_image_url | string | Yes | URL of the person/model image |
| garment_image_url | string | Yes | URL of the clothing item |
Best results with clear, front-facing photos and flat-lay or mannequin shots of the garment.
Credits: 4
/product-descriptionGenerate AI-powered product descriptions from product info and/or images.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Product name |
| image_url | string | No | URL of product image for visual analysis |
| specs | string | No | Product specifications |
| features | string | No | Key features to highlight |
| style | string | No | professional (default), casual, luxury, technical, or playful |
| length | string | No | short, medium (default), or long |
| language | string | No | Language code (default: en) |
Response
{
"id": "zap_abc123",
"description": "Introducing the...",
"style": "professional",
"length": "medium",
"language": "en",
"credits_used": 1
}Credits: 1
/image-reviewAI-powered image quality review and validation for e-commerce.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to review |
| check_background | boolean | No | Check for white/clean background (default: true) |
| check_watermark | boolean | No | Check for watermarks (default: true) |
| check_centered | boolean | No | Check if subject is centered (default: false) |
| check_shadows | boolean | No | Check for unwanted shadows (default: false) |
| min_width | number | No | Minimum required width in pixels |
| min_height | number | No | Minimum required height in pixels |
Response
{
"id": "zap_abc123",
"passed": true,
"results": [
{ "check": "white_background", "passed": true, "message": "Background is white/clean", "confidence": 95 }
],
"summary": { "total_checks": 2, "passed_checks": 2, "failed_checks": 0 },
"credits_used": 2
}Dimension checks (min_width, min_height) are free. Each AI check costs 1 credit.
Credits: 1 per AI check
Utilities
/uploadUpload an image file directly for processing. Useful for localhost or password-protected sources.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Image file (multipart/form-data). Max 10MB. Formats: JPEG, PNG, GIF, WebP, AVIF, HEIC |
Response
{
"id": "zap_abc123",
"url": "https://fal.media/files/...",
"filename": "product.jpg",
"size": 245832,
"content_type": "image/jpeg"
}Returns a temporary URL valid for 24 hours. Use this URL with other processing endpoints.
Credits: FREE
/alt-textGenerate descriptive alt text for an image using AI vision.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string | Yes | URL of the image to describe |
| detail_level | string | No | caption (brief), detailed-caption (default), or more-detailed-caption |
Response
{
"id": "zap_abc123",
"alt_text": "A red leather handbag with gold hardware...",
"credits_used": 1
}Credits: 1
Batch Processing
Process multiple images in a single request. Jobs run asynchronously - submit a batch and poll for results.
Workflow
- Submit batch request → receive
job_id - Poll
/batch/status/{job_id}until status iscompleted - Retrieve results from the status response
Batch Limits by Tier
| Tier | Max Images per Batch |
|---|---|
| Free | Not available |
| Basic | 100 |
| Business | 250 |
| Pro | 500 |
| Enterprise | 1,000 |
/batch/remove-bgRemove backgrounds from multiple images asynchronously.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| images | array | Yes | Array of image objects |
| images[].id | string | Yes | Unique identifier for tracking (returned in results) |
| images[].image_url | string | Yes | URL of the image to process |
| model | string | No | birefnet (default), birefnet-v2, or bria |
Response
{
"id": "zap_abc123",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"total": 3,
"estimated_credits": 3,
"poll_url": "/api/zapier/batch/status/550e8400-...",
"message": "Batch job queued for processing."
}Credits: 1-2 per image
/batch/upscaleUpscale multiple images asynchronously.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| images | array | Yes | Array of image objects |
| images[].id | string | Yes | Unique identifier for tracking |
| images[].image_url | string | Yes | URL of the image to upscale |
| scale | number | No | Upscale factor: 2-4 (default: 2) |
| model | string | No | esrgan (default), clarity, or topaz |
Response
{
"id": "zap_abc123",
"job_id": "550e8400-e29b-41d4-a716-446655440001",
"status": "queued",
"total": 2,
"estimated_credits": 4,
"poll_url": "/api/zapier/batch/status/550e8400-...",
"message": "Batch job queued for processing."
}Credits: 2-3 per image
/batch/alt-textGenerate alt text for multiple images asynchronously using Gemini 2.0 Flash via OpenRouter.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| images | array | Yes | Array of image objects |
| images[].id | string | Yes | Unique identifier for tracking |
| images[].image_url | string | Yes | URL of the image to describe |
| detail_level | string | No | caption, detailed-caption (default), or more-detailed-caption |
Response
{
"id": "zap_abc123",
"job_id": "550e8400-e29b-41d4-a716-446655440002",
"status": "queued",
"total": 2,
"estimated_credits": 2,
"poll_url": "/api/zapier/batch/status/550e8400-...",
"message": "Batch job queued for processing."
}Credits: 1 per image
/batch/status/{jobId}Check the status of a batch job and retrieve results when complete.
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| jobId | path | Yes | The batch job ID returned from a batch endpoint |
Response
// In progress:
{
"job_id": "550e8400-...",
"status": "processing",
"total": 10,
"completed": 4,
"failed": 0,
"pending": 6,
"progress": 40,
"credits_used": 4
}
// Completed (image results):
{
"job_id": "550e8400-...",
"status": "completed",
"total": 3,
"completed": 3,
"failed": 0,
"results": [
{ "id": "product-001", "status": "success", "image_url": "https://..." },
{ "id": "product-002", "status": "success", "image_url": "https://..." }
]
}
// Completed (alt text results):
{
"job_id": "550e8400-...",
"status": "completed",
"results": [
{ "id": "img-001", "status": "success", "alt_text": "A red handbag..." }
]
}Status values: pending, queued, processing, completed, failed. Results include image_url for image operations or alt_text for alt text operations.
Credits: FREE
WordPress Integration
Two authentication methods for WordPress plugins: OAuth flow (browser-based) or direct Sirv credentials exchange.
OAuth Flow (Recommended)
Browser-based authentication where users log in to Sirv AI Studio and get redirected back with an API key.
- Redirect user to
/api/auth/wordpress/oauthwith redirect_uri - User logs in or signs up on Sirv AI Studio
- User is redirected back to WordPress with
api_keyin URL params - Store the API key and use it for subsequent API calls
/api/auth/wordpress/oauthInitiate OAuth flow. Redirects user to login, then back to WordPress with API key.
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| redirect_uri | string | Yes | WordPress admin callback URL (must contain wp-admin or admin.php, HTTPS in production) |
| site_url | string | No | WordPress site URL for tracking |
| state | string | No | CSRF protection token (returned unchanged) |
Response
// User is redirected to redirect_uri with these query params:
?api_key=sk_live_xxx
&credits=100
&tier=PRO
&sirv_plan=Business
&state=your_state_token
// On error:
?error=oauth_failed&state=your_state_tokenredirect_uri must be HTTPS in production and contain 'wp-admin' or 'admin.php' in the path.
Credits: FREE
Direct Sirv Credentials (Alternative)
For plugins that already have access to Sirv API credentials, exchange them directly for an API key without browser redirect.
/api/auth/wordpressExchange Sirv API credentials for a Sirv AI Studio API key. Creates account if user doesn't exist.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | User's email address | |
| clientId | string | Yes | Sirv API client ID |
| clientSecret | string | Yes | Sirv API client secret |
| accountAlias | string | Yes | Sirv account alias |
| cdnUrl | string | No | Custom CDN URL (defaults to {alias}.sirv.com) |
Response
{
"success": true,
"api_key": "sk_live_abc123...",
"credits": 70,
"tier": "FREE",
"sirv_plan": "Business 50",
"is_new_user": false
}Validates credentials against Sirv API. New users receive 20 welcome credits + Sirv plan bonus (Business: 50, Enterprise: 150).
Credits: FREE
PHP Example (OAuth)
// 1. Redirect to OAuth
$oauth_url = 'https://www.sirv.studio/api/auth/wordpress/oauth?' . http_build_query([
'redirect_uri' => admin_url('admin.php?page=sirv-ai-callback'),
'site_url' => home_url(),
'state' => wp_create_nonce('sirv_oauth'),
]);
wp_redirect($oauth_url);
// 2. Handle callback
if (isset($_GET['api_key']) && wp_verify_nonce($_GET['state'], 'sirv_oauth')) {
update_option('sirv_studio_api_key', sanitize_text_field($_GET['api_key']));
update_option('sirv_studio_credits', intval($_GET['credits']));
}Response Format
All successful responses include:
{
"id": "zap_1234567890_abc123",
"image_url": "https://...", // or video_url, model_url, alt_text, etc.
"credits_used": 1
}Error Codes
| Code | HTTP | Description |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid Authorization header |
| INVALID_API_KEY | 401 | API key is invalid or revoked |
| INSUFFICIENT_CREDITS | 402 | Not enough credits for this operation |
| BATCH_LIMIT_EXCEEDED | 403 | Batch size exceeds your plan's limit |
| VALIDATION_ERROR | 400 | Invalid request parameters |
| RATE_LIMITED | 429 | Too many requests, please slow down |
| PAYLOAD_TOO_LARGE | 413 | File exceeds maximum size (10MB) |
| INTERNAL_ERROR | 500 | Server error, please try again |
Rate Limits
| Tier | Requests/Hour |
|---|---|
| Free | 20 |
| Starter | 100 |
| Pro | 500 |
| Business | 2,000 |
Code Examples
cURL
curl -X POST https://www.sirv.studio/api/zapier/remove-bg \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"image_url": "https://example.com/photo.jpg"}'JavaScript/TypeScript
const response = await fetch('https://www.sirv.studio/api/zapier/remove-bg', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
image_url: 'https://example.com/photo.jpg'
}),
});
const result = await response.json();
console.log(result.image_url); // Processed image URLPython
import requests
response = requests.post(
'https://www.sirv.studio/api/zapier/remove-bg',
headers={
'Authorization': 'Bearer sk_live_YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'image_url': 'https://example.com/photo.jpg'}
)
result = response.json()
print(result['image_url']) # Processed image URLIntegrations
Use Sirv AI Studio with your favorite automation tools: