AT
Auto Toon Docs

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

All endpoints require an x-api-key header. See the Authentication guide for details.

Generate Fashion Editorial Image

POST/api/fashion-editorial/generate

Generate 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

Either 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

ParameterTypeRequiredDescription
modelIdstringRequiredDatabase model ID (from /api/fashion-model/list). Required if models[] is not provided.
modelsarrayRequiredArray of {modelId, clothingImageUrls, imageUrl?, prompt?, characterSheetUrl?}. Required if modelId is not provided.
clothingImageUrlsstring[]RequiredURLs of clothing or product images to dress the model in.
aiModelstringOptionalAI model to use: gemini-3-pro-image-preview (default), gemini-3.1-flash-image-preview, bytedance/seedream-4.5, bytedance/seedream-5-lite.
makeupAnalysisstringOptionalMakeup description for the model (e.g. "natural glam with bold red lip").
hairstyleAnalysisstringOptionalHairstyle description (e.g. "slicked-back low bun").
styleDataobjectOptional{style: string} - Style preset such as "editorial-vogue", "street-style", "minimalist-clean".
backgroundDataobjectOptional{background: string} - Background preset such as "studio-white", "urban-city", "nature-garden".
promptModifierstringOptionalCustom creative direction appended to the generation prompt.
brandAnalysisstringOptionalBrand style guidelines to influence the output aesthetic.
Response200
json
{
  "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

bash
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

bash
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

bash
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

POST/api/fashion-editorial/variations

Generate 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

ParameterTypeRequiredDescription
baseImageUrlstringRequiredURL of the hero image to create variations from.
styleData{ style: string, mode?: 'user-model' | 'scratch-model' }OptionalCreative 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.
modelImageUrlsstring[]OptionalAdditional model reference images for consistency.
clothingImageUrlsstring[]OptionalProduct/clothing reference images. For surreal-product-hero these are the hero subject.
aspectRatiostringOptionalOutput aspect ratio (e.g. "9:16", "4:5", "1:1").
Response200
json
{
  "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

bash
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

POST/api/fashion-editorial/relight

Apply 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.

Either lighting or lightPosition is required. You can combine both for a preset mood with a custom direction.

Request Body

ParameterTypeRequiredDescription
baseImageUrlstringRequiredURL of the image to relight.
lightingstringRequiredLighting preset: golden-hour, blue-hour, studio-soft, dramatic, neon, natural-window, backlit, moonlight. Required if lightPosition is not provided.
lightPositionstringOptionalCustom light position description (e.g. "above-left at 45 degrees"). Required if lighting is not provided.
lightColorstringOptionalCustom light color (e.g. "warm amber", "#FF9500").
aiModelstringOptionalAI model to use for relighting.
Response200
json
{
  "imageUrl": "https://storage.auto-toon.com/.../relit_abc123.png",
  "creditsRemaining": 38
}

Upscale Image

POST/api/fashion-editorial/upscale

Upscale a fashion editorial image to a higher resolution while preserving fine details such as fabric texture and skin tone.

Request Body

ParameterTypeRequiredDescription
imageUrlstringRequiredURL of the image to upscale.
scalenumberOptionalUpscale factor (default determined by server).
Response200
json
{
  "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.

POST/api/fashion-editorial/video/generate

Submit a video generation job from a fashion editorial image. Returns a job ID that you can poll with the status endpoint.

Request Body

ParameterTypeRequiredDescription
imageUrlstringRequiredURL of the source editorial image.
Response200
json
{
  "id": "vid_abc123def456",
  "status": "processing"
}
GET/api/fashion-editorial/video/status/[id]

Check the generation status of a video job. Poll this endpoint until status is completed or failed.

Response200
json
{
  "id": "vid_abc123def456",
  "status": "completed",
  "videoUrl": "https://storage.auto-toon.com/.../fashion_video.mp4",
  "createdAt": "2026-04-02T10:30:00.000Z"
}
GET/api/fashion-editorial/videos

List all generated videos for the authenticated user.

Response200
json
{
  "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.

StatusCodeDescription
400BAD_REQUESTMissing or invalid parameters.
401UNAUTHORIZEDMissing or invalid API key.
402INSUFFICIENT_CREDITSAccount does not have enough credits.
429RATE_LIMITEDToo many requests. Retry after the indicated delay.
500INTERNAL_ERRORAn unexpected error occurred on the server.
Response402
json
{
  "error": "Insufficient credits",
  "code": "INSUFFICIENT_CREDITS",
  "balance": 0,
  "required": 3,
  "needsTopUp": true
}

Dialog Title

Dialog Title

Dialog Title

Dialog Title