Fashion API
AI-powered fashion image generation — virtual try-on, model creation, background editing, and more
The Fashion API gives you access to 10 AI-powered fashion image generation endpoints through a single Concurred API key. Powered by FASHN, it supports virtual try-on, model creation, background manipulation, image editing, and video generation.
Async Pattern
Unlike the Chat API (which streams text), the Fashion API uses an async submit-and-poll pattern. You submit a job, get a prediction ID, then poll for results. We also provide a convenience subscribe endpoint that handles polling for you via SSE.
Available Models
| Model Name | Description | Required Inputs | Credits | Speed |
|---|---|---|---|---|
tryon-v1.6 | Virtual try-on at 864×1296 resolution | model_image, garment_image | 3 | 5-17s |
product-to-model | Flat-lay/product image → on-model visual | product_image | 3 | ~12s |
face-to-model | Face → try-on ready upper-body avatar | face_image | 3 | ~12s |
model-create | Generate fashion models from text prompt | prompt | 3 | ~12s |
model-variation | Create variations of existing model images | model_image | 3 | 8-10s |
model-swap | Replace model identity, keep clothing/pose | model_image | 3 | 10-12s |
reframe | Smart aspect ratio adjustment with generative fill | image | 2 | ~12s |
background-change | Replace background with AI-generated scene | image, prompt | 2 | ~12s |
background-remove | Remove background → transparent PNG cutout | image | 2 | 1-3s |
image-to-video | Single image → fashion video clip | image | 5 | 1-3min |
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/fashion/run | Submit a generation job (returns prediction ID) |
GET | /api/v1/fashion/status/:id | Poll job status and retrieve results |
POST | /api/v1/fashion/subscribe | Submit and stream status updates via SSE |
Quick Start
Submit Job
POST /api/v1/fashion/run
Submits a fashion generation job. Returns immediately with a prediction ID.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | One of the 10 model names listed above |
inputs | object | Yes | Model-specific input parameters (see each model's section below) |
Response
Poll Status
GET /api/v1/fashion/status/:id
Check the current status of a prediction and retrieve results when complete.
Status Values
| Status | Description |
|---|---|
starting | Job is being initialized |
in_queue | Waiting to be processed |
processing | Model is actively generating |
completed | Done — output URLs available |
failed | Failed — check error field |
Response (Completed)
Response (Failed)
Output Availability
CDN URLs are available for 72 hours after completion. If you use return_base64: true, base64 outputs are available for 60 minutes. Download or cache results promptly.
Subscribe (SSE)
POST /api/v1/fashion/subscribe
Convenience endpoint that submits a job and streams real-time status updates via Server-Sent Events. No manual polling needed.
Request Body
Same as /api/v1/fashion/run.
SSE Events
| Event Type | Description |
|---|---|
job_submitted | Job accepted, includes prediction ID |
status_update | Status transitioned (e.g. in_queue → processing) |
completed | Job finished, includes output array |
failed | Job failed, includes error object |
error | Unexpected error during polling |
JavaScript Example
Timeout
The subscribe endpoint has a 2-minute timeout. For long-running jobs like image-to-video (1-3 minutes), use the async /run + /status pattern instead.
Model Reference
Virtual Try-On (tryon-v1.6)
Try a garment on a person. Outputs at 864×1296 resolution.
| Parameter | Type | Required | Description |
|---|---|---|---|
model_image | string | Yes | URL or base64 of the person image |
garment_image | string | Yes | URL or base64 of the garment image |
category | string | No | auto, tops, bottoms, one-pieces (default: auto) |
mode | string | No | performance (5s), balanced (8s), quality (12-17s) |
garment_photo_type | string | No | auto, flat-lay, model |
moderation_level | string | No | conservative, permissive, none |
num_samples | number | No | 1-4 images per request (default: 1) |
segmentation_free | boolean | No | Disable clothing segmentation (default: true) |
seed | number | No | 0 to 2³²-1 for reproducibility |
output_format | string | No | png or jpeg (default: png) |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Product to Model (product-to-model)
Transform flat-lay or product-only images into realistic on-model visuals. Supports two modes: generate a new person (default) or add product to an existing model image.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_image | string | Yes | URL or base64 of the product |
model_image | string | No | Person image (enables try-on mode) |
image_prompt | string | No | Inspiration image for pose/environment |
prompt | string | No | Styling instructions (e.g. "athletic man, studio background") |
aspect_ratio | string | No | 1:1, 2:3, 3:4, 4:5, 5:4, 4:3, 3:2, 16:9, 9:16 |
resolution | string | No | 1k (precise) or 4k (creative) |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Face to Model (face-to-model)
Transform a face/selfie into a try-on ready upper-body avatar.
| Parameter | Type | Required | Description |
|---|---|---|---|
face_image | string | Yes | URL or base64 of the face image |
prompt | string | No | Body guidance (e.g. "athletic build", "curvy figure") |
aspect_ratio | string | No | 1:1, 4:5, 3:4, 2:3, 9:16 (default: 2:3) |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg (default: jpeg) |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Model Create (model-create)
Generate realistic fashion models from text prompts, optionally guided by a reference image.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Description of desired model, clothing, pose, scene |
image_reference | string | No | Reference image for composition guidance |
reference_type | string | No | pose or silhouette (when image_reference is provided) |
aspect_ratio | string | No | 1:1, 2:3, 3:4, 4:5, 5:4, 4:3, 3:2, 16:9, 9:16 |
lora_url | string | No | FLUX-compatible LoRA weights URL (.safetensors, max 256MB) |
disable_prompt_enhancement | boolean | No | Use prompt exactly as-is |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Model Variation (model-variation)
Create controlled variations from an existing model image.
| Parameter | Type | Required | Description |
|---|---|---|---|
model_image | string | Yes | Source fashion model image |
variation_strength | string | No | subtle or strong (default: subtle) |
lora_url | string | No | FLUX-compatible LoRA weights URL |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Model Swap (model-swap)
Replace the model's identity (face, skin tone, hair) while keeping clothing and pose intact.
| Parameter | Type | Required | Description |
|---|---|---|---|
model_image | string | Yes | Source image with clothing/pose to preserve |
prompt | string | No | Desired identity description (e.g. "Asian woman with short hair") |
background_change | boolean | No | Also change background based on prompt |
disable_prompt_enhancement | boolean | No | Use prompt exactly as-is |
lora_url | string | No | FLUX-compatible LoRA weights URL |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Reframe (reframe)
Adjust image aspect ratios using AI-powered generative fill. Two modes: directional extension or aspect ratio adjustment.
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Source image to reframe |
mode | string | No | direction or aspect_ratio |
target_aspect_ratio | string | No | Target ratio (for aspect_ratio mode): 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 |
target_direction | string | No | Expand direction (for direction mode): both, down, up |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Background Change (background-change)
Replace the background with an AI-generated scene while preserving the foreground subject.
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Source image |
prompt | string | Yes | Description of new background (e.g. "beach sunset", "modern office") |
disable_prompt_enhancement | boolean | No | Use prompt exactly as-is |
seed | number | No | 0 to 2³²-1 |
output_format | string | No | png or jpeg |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Background Remove (background-remove)
Remove the background and create a transparent PNG cutout.
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Source image |
return_base64 | boolean | No | Return base64 instead of CDN URL |
Image to Video (image-to-video)
Turn a single image into a short motion clip with fashion-tailored camera work and model movements.
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Source image to animate |
prompt | string | No | Motion guidance (keep short, e.g. "raising hand to touch face") |
negative_prompt | string | No | Cues to avoid undesirable motion |
duration | number | No | 5 or 10 seconds (default: 5) |
resolution | string | No | 480p, 720p, 1080p (default: 1080p) |
Long Processing Time
Image-to-video takes 1-3 minutes. Use the /run + /status pattern for this model, as /subscribe has a 2-minute timeout.
Image Inputs
All image parameters accept either:
- URL: Publicly accessible image URL with correct
Content-Typeheaders - Base64: Data URI with format prefix, e.g.
data:image/jpg;base64,/9j/4AAQ...
Base64 Format
Base64 images must include the proper prefix: data:image/jpg;base64,<YOUR_BASE64> or data:image/png;base64,<YOUR_BASE64>. Omitting the prefix will cause an ImageLoadError.
Credits
| Model | Base Cost | With face_reference | Multiple Outputs |
|---|---|---|---|
tryon-v1.6 | 3 credits | — | × num_samples |
product-to-model | 3 credits | 5 credits | × num_images |
face-to-model | 3 credits | — | — |
model-create | 3 credits | 5 credits | × num_images |
model-variation | 3 credits | — | — |
model-swap | 3 credits | 5 credits | × num_images |
reframe | 2 credits | — | × num_images |
background-change | 2 credits | — | — |
background-remove | 2 credits | — | — |
image-to-video | 5 credits | — | — |
Failed predictions do not consume credits.
Rate Limits
| Endpoint | Limit |
|---|---|
/api/v1/fashion/run | 30 requests per 60 seconds |
/api/v1/fashion/subscribe | 30 requests per 60 seconds |
/api/v1/fashion/status/:id | 40 requests per 10 seconds |
Rate limit headers are included in every response:
X-RateLimit-Limit— Max requests allowedX-RateLimit-Remaining— Requests remaining in windowX-RateLimit-Reset— Unix timestamp when window resets
Error Handling
API-Level Errors
Returned before a prediction is created (no prediction ID):
| Code | Error | Solution |
|---|---|---|
| 400 | Validation failed | Check model_name and required inputs fields |
| 401 | Invalid API key | Verify your Authorization or X-API-Key header |
| 429 | Rate limit exceeded | Throttle requests, check Retry-After header |
| 503 | Service unavailable | Fashion generation service is not configured on the server |
Runtime Errors
Returned when polling /status/:id with status: "failed":
| Error Name | Cause | Solution |
|---|---|---|
ImageLoadError | Cannot fetch/decode input image | Use public URLs with image Content-Type, or valid base64 with prefix |
ContentModerationError | Input violated content policies | Adjust input or set moderation_level to permissive |
PoseError | Cannot detect body pose | Improve image quality, ensure full body is visible |
InputValidationError | Invalid parameter values | Check parameter types and enum values |
PipelineError | Internal processing failure | Retry the request |
ThirdPartyError | Upstream service failure | Retry with backoff |
Failed = Free
Failed predictions do not consume credits. It's safe to retry.