Fashion Editorial API
Generate professional fashion photography with AI. Upload clothing, select a model, and produce editorial-quality images ready for campaigns, lookbooks, and social media.
Authentication
x-api-key header. See the Authentication guide for details.Generate Fashion Editorial Image
/api/fashion-editorial/generateGenerate a fashion editorial image by combining a model with clothing items. You can reference a model stored in your account by ID, or pass model data inline via the models array.
Model selection
modelId or models[] is required. Use modelId when referencing a model already saved via /api/fashion-model/list, or use models[] to pass inline model data with image URLs.Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
modelId | string | Required | Database model ID (from /api/fashion-model/list). Required if models[] is not provided. |
models | array | Required | Array of {modelId, clothingImageUrls, imageUrl?, prompt?, characterSheetUrl?}. Required if modelId is not provided. |
clothingImageUrls | string[] | Required | URLs of clothing or product images to dress the model in. |
aiModel | string | Optional | AI model to use: gemini-3-pro-image-preview (default), gemini-3.1-flash-image-preview, bytedance/seedream-4.5, bytedance/seedream-5-lite. |
makeupAnalysis | string | Optional | Makeup description for the model (e.g. "natural glam with bold red lip"). |
hairstyleAnalysis | string | Optional | Hairstyle description (e.g. "slicked-back low bun"). |
styleData | object | Optional | {style: string} - Style preset such as "editorial-vogue", "street-style", "minimalist-clean". |
backgroundData | object | Optional | {background: string} - Background preset such as "studio-white", "urban-city", "nature-garden". |
promptModifier | string | Optional | Custom creative direction appended to the generation prompt. |
brandAnalysis | string | Optional | Brand style guidelines to influence the output aesthetic. |
{
"imageUrl": "https://storage.auto-toon.com/.../editorial_abc123.png",
"creditsRemaining": 42,
"prompt": "A fashion editorial photo of a model wearing...",
"fallbackUsed": false
}Example 1 -- Basic generation with a saved model
curl -X POST https://auto-toon.com/api/fashion-editorial/generate \
-H "Content-Type: application/json" \
-H "x-api-key: toon_xx_your_api_key_here" \
-d '{
"modelId": "clx9abc123def456",
"clothingImageUrls": [
"https://example.com/images/red-dress.jpg"
],
"styleData": { "style": "editorial-vogue" },
"backgroundData": { "background": "studio-white" }
}'Example 2 -- Inline model with creative direction
curl -X POST https://auto-toon.com/api/fashion-editorial/generate \
-H "Content-Type: application/json" \
-H "x-api-key: toon_xx_your_api_key_here" \
-d '{
"models": [
{
"modelId": "clx9abc123def456",
"clothingImageUrls": [
"https://example.com/images/blazer.jpg",
"https://example.com/images/trousers.jpg"
],
"imageUrl": "https://example.com/model-reference.jpg"
}
],
"aiModel": "bytedance/seedream-4.5",
"makeupAnalysis": "natural glam, dewy skin, bold red lip",
"hairstyleAnalysis": "loose waves, side part",
"promptModifier": "Cinematic lighting, shot on medium format, shallow depth of field",
"brandAnalysis": "High-end luxury brand with minimalist aesthetic"
}'Example 3 -- Street-style look
curl -X POST https://auto-toon.com/api/fashion-editorial/generate \
-H "Content-Type: application/json" \
-H "x-api-key: toon_xx_your_api_key_here" \
-d '{
"modelId": "clx9xyz789ghi012",
"clothingImageUrls": [
"https://example.com/images/oversized-jacket.jpg",
"https://example.com/images/sneakers.jpg"
],
"styleData": { "style": "street-style" },
"backgroundData": { "background": "urban-city" },
"aiModel": "gemini-3.1-flash-image-preview"
}'Generate Campaign Variations
/api/fashion-editorial/variationsGenerate a set of campaign variations from a hero image. Useful for producing multiple angles, poses, and crop ratios from a single editorial shot -- ideal for social media, ads, and lookbooks.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
baseImageUrl | string | Required | URL of the hero image to create variations from. |
styleData | { style: string, mode?: 'user-model' | 'scratch-model' } | Optional | Creative direction. `style` is a persona id: "fashion-editorial" or "surreal-product-hero". `mode` applies only to fashion-editorial ("user-model" preserves the face from modelImageUrls; "scratch-model" invents one). Defaults to fashion-editorial / user-model. |
modelImageUrls | string[] | Optional | Additional model reference images for consistency. |
clothingImageUrls | string[] | Optional | Product/clothing reference images. For surreal-product-hero these are the hero subject. |
aspectRatio | string | Optional | Output aspect ratio (e.g. "9:16", "4:5", "1:1"). |
{
"success": true,
"variations": [
"https://storage.auto-toon.com/.../variation_1.png",
"https://storage.auto-toon.com/.../variation_2.png",
"https://storage.auto-toon.com/.../variation_3.png"
]
}Example -- Surreal product hero for a shoe drop
curl -X POST https://auto-toon.com/api/fashion-editorial/variations \
-H "Content-Type: application/json" \
-H "x-api-key: toon_xx_your_api_key_here" \
-d '{
"baseImageUrl": "https://storage.auto-toon.com/.../oxford_abc123.png",
"styleData": { "style": "surreal-product-hero" },
"aspectRatio": "1:1",
"clothingImageUrls": [
"https://example.com/images/tan-oxford.jpg"
]
}'Relight Image
/api/fashion-editorial/relightApply a new lighting style to an existing fashion image. Choose from preset lighting moods or provide a custom light position and color for fine-grained control.
lighting or lightPosition is required. You can combine both for a preset mood with a custom direction.Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
baseImageUrl | string | Required | URL of the image to relight. |
lighting | string | Required | Lighting preset: golden-hour, blue-hour, studio-soft, dramatic, neon, natural-window, backlit, moonlight. Required if lightPosition is not provided. |
lightPosition | string | Optional | Custom light position description (e.g. "above-left at 45 degrees"). Required if lighting is not provided. |
lightColor | string | Optional | Custom light color (e.g. "warm amber", "#FF9500"). |
aiModel | string | Optional | AI model to use for relighting. |
{
"imageUrl": "https://storage.auto-toon.com/.../relit_abc123.png",
"creditsRemaining": 38
}Upscale Image
/api/fashion-editorial/upscaleUpscale a fashion editorial image to a higher resolution while preserving fine details such as fabric texture and skin tone.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
imageUrl | string | Required | URL of the image to upscale. |
scale | number | Optional | Upscale factor (default determined by server). |
{
"imageUrl": "https://storage.auto-toon.com/.../upscaled_abc123.png",
"creditsRemaining": 36
}Video Generation
Turn a fashion editorial image into a short video clip. Video generation is asynchronous -- you submit a job and then poll for its status until it completes.
/api/fashion-editorial/video/generateSubmit a video generation job from a fashion editorial image. Returns a job ID that you can poll with the status endpoint.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
imageUrl | string | Required | URL of the source editorial image. |
{
"id": "vid_abc123def456",
"status": "processing"
}/api/fashion-editorial/video/status/[id]Check the generation status of a video job. Poll this endpoint until status is completed or failed.
{
"id": "vid_abc123def456",
"status": "completed",
"videoUrl": "https://storage.auto-toon.com/.../fashion_video.mp4",
"createdAt": "2026-04-02T10:30:00.000Z"
}/api/fashion-editorial/videosList all generated videos for the authenticated user.
{
"videos": [
{
"id": "vid_abc123def456",
"status": "completed",
"videoUrl": "https://storage.auto-toon.com/.../fashion_video.mp4",
"createdAt": "2026-04-02T10:30:00.000Z"
},
{
"id": "vid_xyz789ghi012",
"status": "processing",
"videoUrl": null,
"createdAt": "2026-04-02T11:15:00.000Z"
}
]
}Error Responses
All endpoints return a consistent error shape. Common error codes are listed below.
| Status | Code | Description |
|---|---|---|
400 | BAD_REQUEST | Missing or invalid parameters. |
401 | UNAUTHORIZED | Missing or invalid API key. |
402 | INSUFFICIENT_CREDITS | Account does not have enough credits. |
429 | RATE_LIMITED | Too many requests. Retry after the indicated delay. |
500 | INTERNAL_ERROR | An unexpected error occurred on the server. |
{
"error": "Insufficient credits",
"code": "INSUFFICIENT_CREDITS",
"balance": 0,
"required": 3,
"needsTopUp": true
}