---
title: "Create a new prediction"
method: POST
path: "/v1/run"
tags: ["Predictions"]
---

# Create a new prediction

`POST /v1/run`

Submit a prediction request for AI-powered fashion processing. Supports multiple model types including:
- Try-on max (tryon-max)
- Virtual try-on v1.6 (tryon-v1.6)
- Model creation (model-create)
- Model swap (model-swap)
- Product to model (product-to-model)
- Face to model (face-to-model)
- Background operations (background-remove, background-change)
- Image reframing (reframe)
- Image to video (image-to-video)
- Image editing (edit)
- Product packshot (packshot)

All requests use the versioned format with model_name and inputs structure.

## Query parameters

- `webhook_url` string, uri

## Request body

- union
  - TryOnMaxRequest
    - `model_name` 'tryon-max', required — Premium virtual try-on built for AI fashion photoshoots and publishable e-commerce content. Places products onto model images with enhanced fidelity, producing images suitable for PDPs, catalogs, and marketing assets.
    - `inputs` TryOnMaxInputs, required
      - `product_image` string, required — URL or base64 encoded image of the product (garment, accessory, etc.) to place on the model. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `model_image` string, required — URL or base64 encoded image of the person to wear the product. The try-on process preserves the model's identity, pose, and styling while seamlessly integrating the product. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `prompt` string — Optional instructions to customize the try-on result. Use this to adjust how the product is worn or make minor styling changes. **Examples:** "remove scarf", "tuck in shirt", "roll up sleeves", "open jacket"
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Optional aspect ratio for the output image.
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate per request (1-4).
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - TryOnRequest
    - `model_name` 'tryon-v1.6', required — Virtual Try-On v1.6 enables realistic garment visualization using just a single photo of a person and a garment
    - `inputs` TryOnInputs, required
      - `model_image` string, required — Primary image of the person on whom the virtual try-on will be performed. Models Studio users can use their saved models by passing `saved:<model_name>`. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `garment_image` string, required — Reference image of the clothing item to be tried on the `model_image`. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `category` 'auto' | 'tops' | 'bottoms' | 'one-pieces' — Use `auto` to enable automatic classification of the garment type. For flat-lay or ghost mannequin images, the system detects the garment type automatically. For on-model images, full-body shots default to a full outfit swap. For focused shots (upper or lower body), the system selects the most likely garment type (tops or bottoms).
      - `segmentation_free` boolean — Direct garment fitting without clothing segmentation, enabling bulkier garment try-ons with improved preservation of body shape and skin texture. Set to `false` if original garments are not removed properly.
      - `moderation_level` 'conservative' | 'permissive' | 'none' — Sets the content moderation level for garment images. - `conservative` enforces stricter modesty standards suitable for culturally sensitive contexts. Blocks underwear, swimwear, and revealing outfits. - `permissive` allows swimwear, underwear, and revealing garments, while still blocking explicit nudity. - `none` disables all content moderation. **This technology is designed for ethical virtual try-on applications. Misuse—such as generating inappropriate imagery without consent—violates our Terms of Service. Setting moderation_level: none does not remove your responsibility for ethical and lawful use. Violations may result in service denial.**
      - `garment_photo_type` 'auto' | 'flat-lay' | 'model' — Specifies the type of garment photo to optimize internal parameters for better performance. `model` is for photos of garments on a model, `flat-lay` is for flat-lay or ghost mannequin images, and `auto` attempts to automatically detect the photo type.
      - `mode` 'performance' | 'balanced' | 'quality' — Specifies the mode of operation. - `performance` mode is faster but may compromise quality (5 seconds). - `balanced` mode is a perfect middle ground between speed and quality (8 seconds). - `quality` mode is slower, but delivers the highest quality results (12–17 seconds).
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_samples` integer — Number of images to generate per request (1-4).
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications like consumer virtual try-on experiences.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
  - ProductToModelRequest
    - `model_name` 'product-to-model', required — Product to Model endpoint transforms product images into people wearing those products. It supports dual-mode operation: standard product-to-model (generates new person) and try-on mode (adds product to existing person)
    - `inputs` ProductToModelInputs, required
      - `product_image` string, required — URL or base64 encoded image of the product to be worn. Supports clothing, accessories, shoes, and other wearable fashion items. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `model_image` string — URL or base64 encoded image of the person to wear the product. When provided, enables try-on mode. When omitted, generates a new person wearing the product. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `image_prompt` string — Optional URL or base64 of an inspiration image to guide pose, environment, and lighting while keeping the final edit product-centric.
      - `prompt` string — Additional instructions for person appearance (when `model_image` is not provided), styling preferences, or background. **Examples:** "man with tattoos", "tucked-in", "open jacket", "rolled-up sleeves", "studio background", "professional office setting" **Default:** None
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Desired aspect ratio for the output image. Only applies when `model_image` is not provided (standard product-to-model mode). When `model_image` is provided (try-on mode), this parameter is ignored and the output will match the `model_image`'s aspect ratio. **Default:** product_image's aspect ratio (standard mode only)
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `seed` integer — Seed for reproducible results. Use the same seed to reproduce results with the same inputs, or different seed to force different results. Must be between 0 and 2^32-1.
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed `data:image/png;base64,....` This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - FaceToModelRequest
    - `model_name` 'face-to-model', required — Face to Model endpoint transforms face images into try-on ready upper-body avatars. It converts cropped headshots or selfies into full upper-body representations that can be used in virtual try-on applications when full-body photos are not available, while preserving facial identity.
    - `inputs` FaceToModelInputs, required
      - `face_image` string, required — URL or base64 encoded image of the face to transform into an upper-body avatar. The AI will analyze facial features, hair, and skin tone to create a representation suitable for virtual try-on applications. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `prompt` string — Optional styling or body shape guidance for the avatar representation. Examples: "athletic build", "curvy figure", "slender frame". If you don't provide a prompt, the body shape will be inferred from the face image. **Default:** Empty string
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Desired aspect ratio for the output image. Vertical ratios (e.g. `2:3`, `3:4`, `9:16`) produce the most natural upper-body portraits. **Default:** `2:3`
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `num_images` integer — Number of images to generate in a single run.
      - `output_format` 'png' | 'jpeg' — Specifies the output image format. - `png` - PNG format, original quality - `jpeg` - JPEG format, smaller file size **Default:** `"jpeg"`
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed `data:image/png;base64,...`. This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled. **Default:** `false`
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - ModelCreateRequest
    - `model_name` 'model-create', required — Model creation endpoint
    - `inputs` ModelCreateInputs, required
      - `prompt` string, required — Prompt for the model image generation. Describes the desired fashion model, clothing, pose, and scene.
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Defines the width-to-height ratio of the generated image. This parameter controls the canvas dimensions for text-only generation. When image_reference is provided, the output inherits the reference image's aspect ratio and this parameter is ignored. **Supported Resolutions** Each aspect ratio corresponds to a specific resolution optimized for ~1MP output: | Aspect Ratio | Resolution | Use Case | |--------------|------------|----------| | 21:9 | 1568 × 672 | Ultra-wide cinematic | | 1:1 | 1024 × 1024 | Square format, social media | | 2:3 | 832 × 1248 | Portrait, fashion photography | | 3:4 | 880 × 1176 | Standard portrait | | 4:5 | 912 × 1144 | Instagram portrait | | 5:4 | 1144 × 912 | Landscape portrait | | 4:3 | 1176 × 880 | Traditional landscape | | 3:2 | 1176 × 784 | Wide landscape | | 16:9 | 1360 × 768 | Widescreen, banners | | 9:16 | 760 × 1360 | Vertical video format |
      - `image_reference` string — Optional reference image that guides the generation process. The model extracts structural information from this image to control the output composition. Processing Behavior: - Aspect Ratio: When image_reference is provided and aspect_ratio is omitted, the output matches the reference image's dimensions. If aspect_ratio is explicitly set, it overrides the reference image's proportions. - Image Processing: Automatically resized while preserving aspect ratio. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `face_reference` string — Optional face reference image to guide facial features in the generated model. When provided, the generated person will resemble the face in this image. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `face_reference_mode` 'match_base' | 'match_reference' — Controls how the face reference is applied. - `match_base` adapts the reference face to match the base image's style and lighting. - `match_reference` preserves the reference face as closely as possible.
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate.
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - ModelSwapRequest
    - `model_name` 'model-swap', required — Model swap endpoint for transforming model identity while preserving clothing and pose
    - `inputs` ModelSwapInputs, required
      - `model_image` string, required — Source fashion model image containing the clothing and pose to preserve. The model's identity (face, skin tone, hair) will be transformed while keeping the outfit exactly as shown. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `prompt` string — Description of the desired model identity transformation. Specify ethnicity, facial features, hair color, and other physical characteristics. **Default: Empty string (Random identity change)**
      - `face_reference` string — Optional face reference image to guide facial features of the replacement person. When provided, the new person will resemble the face in this image. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `face_reference_mode` 'match_base' | 'match_reference' — Controls how the face reference is applied. - `match_base` adapts the reference face to match the base image's style and lighting. - `match_reference` preserves the reference face as closely as possible.
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate.
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Optional aspect ratio for the output image.
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - ReframeRequest
    - `model_name` 'reframe', required — Image reframing endpoint
    - `inputs` ReframeInputs, required
      - `image` string, required — Source image to reframe to a new aspect ratio. The AI will intelligently analyze the image content and decide whether to expand (outpainting/zoom-out) or crop (zoom-in) based on subject position, content density, and edge details. Resolution Handling: Output resolution is limited to ~1MP. If your image is already at or above this size, it will be downsampled so that, after reframing, the final result fits within the 1MP limit. Base64 Format: Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16', required — Target aspect ratio for the reframed image. The AI determines whether expansion or cropping is more appropriate based on the current image content and dimensions. **Behavior:** - If target is wider than source → may expand horizontally or crop vertically - If target is taller than source → may expand vertically or crop horizontally - If source already matches target (within 2% tolerance) → returns an error **Supported Aspect Ratios** Each aspect ratio corresponds to a specific resolution optimized for ~1MP output: | Aspect Ratio | Resolution | Use Case | |--------------|------------|----------| | 21:9 | 1568 × 672 | Ultra-wide cinematic | | 1:1 | 1024 × 1024 | Square format, social media | | 4:3 | 1176 × 880 | Traditional landscape | | 3:2 | 1248 × 832 | Standard landscape | | 2:3 | 832 × 1248 | Portrait, fashion photography | | 5:4 | 1144 × 912 | Instagram landscape | | 4:5 | 912 × 1144 | Instagram portrait | | 3:4 | 880 × 1176 | Standard portrait | | 16:9 | 1360 × 760 | Horizontal video format | | 9:16 | 760 × 1360 | Vertical video format |
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate per request (1-4).
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - BackgroundChangeRequest
    - `model_name` 'background-change', required — Background change endpoint
    - `inputs` BackgroundChangeInputs, required
      - `image` string, required — Source image containing the subject to preserve. The AI will automatically detect and separate the foreground subject from the background. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `prompt` string, required — Description of the desired new background (e.g., 'beach sunset', 'modern office', 'forest clearing'). The AI generates a new background based on this description and harmonizes it with the preserved foreground subject.
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `num_images` integer — Number of images to generate in a single run.
      - `output_format` 'png' | 'jpeg' — Specifies the output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - BackgroundRemoveRequest
    - `model_name` 'background-remove', required — Background removal endpoint
    - `inputs` BackgroundRemoveInputs, required
      - `image` string, required — Source image to remove the background from. The AI will automatically detect the main subject and create a clean cutout with transparent background. Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed `data:image/png;base64,...`. This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
  - ImageToVideoRequest
    - `model_name` 'image-to-video', required — Image to Video turns a single image into a short motion clip, with tasteful camera work and model movements tailored for fashion.
    - `inputs` ImageToVideoInputs, required
      - `image` string, required — Source image to animate into a short video. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `prompt` string — Optional motion guidance. Detailed prompting is not recommended because motion is difficult to control precisely. For the best results, leave this field empty and allow the system to plan motion automatically. If you include guidance, keep it short and concrete (e.g., "raising hand to touch face").
      - `negative_prompt` string — Optional cues to avoid undesirable motion or framing.
      - `duration` 5 | 10 — Duration of the generated video in seconds.
      - `resolution` '480p' | '720p' | '1080p' — Target video resolution used by the internal video engine.
      - `end_image` string — Optional image to use as the final frame of the generated video. When provided, the video smoothly transitions from the `image` (start frame) to `end_image` (end frame) over the clip duration. Only supported with `resolution: "1080p"`. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`).
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
  - EditRequest
    - `model_name` 'edit', required — Versatile post-processing to restyle shots, adjust views, and fix details while preserving identity and product fidelity.
    - `inputs` EditInputs, required
      - `image` string, required — Source image to edit. The AI will apply the requested modifications based on your prompt while preserving the overall composition and identity of the image. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `mask` string — Optional mask image where white (255) marks regions to edit and black (0) areas remain unchanged. When provided, the edit will only affect the masked regions, enabling precise local edits. Base64 images must include the proper prefix (e.g., `data:image/png;base64,<YOUR_BASE64>`)
      - `prompt` string, required — Natural language description of the edit to apply. Be specific about what you want to change. **Examples:** "change the dress to red", "add sunglasses", "make the background a beach sunset", "change the shirt to a floral pattern"
      - `image_context` string — Optional URL or base64 of a context image to guide the edit. This image provides additional visual context that influences how the edit is applied. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate per request (1-4).
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Optional aspect ratio for the output image.
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.
  - PackshotRequest
    - `model_name` 'packshot', required — Turns a product photo into a clean commercial packshot. Optionally accepts a style reference image to guide staging, background, and lighting.
    - `inputs` PackshotInputs, required
      - `product_image` string, required — Source product image to convert into a commercial packshot. The AI generates a clean studio-style presentation while preserving product identity and detail. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `image_context` string — Optional URL or base64 of a style reference image guiding the packshot presentation (staging, background, lighting). The reference influences styling without overriding the product itself. Base64 images must include the proper prefix (e.g., `data:image/jpg;base64,<YOUR_BASE64>`)
      - `prompt` string — Optional natural-language description of the desired packshot styling. If empty, the model picks a sensible commercial default for the detected product. **Examples:** "clean white background flat-lay", "soft studio lighting on a beige pedestal", "isolated on a marble surface"
      - `seed` integer — Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.
      - `num_images` integer — Number of images to generate per request (1-4).
      - `resolution` '1k' | '2k' | '4k' — Resolution setting for the output image.
      - `aspect_ratio` '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16' — Optional aspect ratio for the output image.
      - `output_format` 'png' | 'jpeg' — Specifies the desired output image format. - `png`: Delivers the highest quality image, ideal for use cases such as content creation where quality is paramount. - `jpeg`: Provides a faster response with a slightly compressed image, more suitable for real-time applications.
      - `return_base64` boolean — When set to `true`, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed according to the `output_format` (e.g., `data:image/png;base64,...` or `data:image/jpeg;base64,...`). This option offers enhanced privacy as user-generated outputs are not stored on our servers when `return_base64` is enabled.
      - `generation_mode` 'fast' | 'balanced' | 'quality' — Sets the generation quality level. 'quality' produces the most detailed and realistic output but takes longer to process and costs more credits. 'fast' prioritizes speed and lower cost.

## Response `200`

Prediction created successfully

- PredictionResponse
  - `id` string, required — Unique prediction identifier
  - `error` string, nullable, required — Error message if prediction failed to start

## Other responses

- `400` — Bad request - Invalid request format. Check request structure and required parameters.
- `401` — Unauthorized - Invalid/missing API key. Verify your API key in the Authorization header.
- `429` — Too many requests - Implement request throttling, wait for current requests to complete, or purchase more credits.
- `500` — Internal server error - Server error. Retry after delay, contact support if persistent.

## Changes

- **2026-05-25** `bff12bc9de53` — 9 info
  - added `packshot` mapping keys to the request discriminator
  - added `#/components/schemas/PackshotRequest` to the request body `oneOf` list
  - added the new `16:9` enum value to the request property `oneOf[#/components/schemas/FaceToModelRequest]/inputs/aspect_ratio`
  - added the new `21:9` enum value to the request property `oneOf[#/components/schemas/FaceToModelRequest]/inputs/aspect_ratio`
  - …5 more
- **2026-04-13** `ddbebf46f6af` — 1 info
  - added the new optional request property `oneOf[#/components/schemas/ImageToVideoRequest]/inputs/end_image`
- **2026-03-30** `ff222a7f898d` — 1 breaking, 7 warning, 27 info
  - removed `#/components/schemas/ModelVariationRequest` from the request body `oneOf` list
  - removed the request property `oneOf[#/components/schemas/BackgroundChangeRequest]/inputs/disable_prompt_enhancement`
  - removed the request property `oneOf[#/components/schemas/ModelCreateRequest]/inputs/disable_prompt_enhancement`
  - removed the request property `oneOf[#/components/schemas/ModelCreateRequest]/inputs/lora_url`
  - …31 more
- …earlier changes not shown

[Full history](https://skmtc.dev/fashn-ai/apis/fashn-api/changes/v1/run/post.md)

---

[API](https://skmtc.dev/fashn-ai/apis/fashn-api.md) · [All operations](https://skmtc.dev/fashn-ai/apis/fashn-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fashn-ai/fashn-api/revisions/bff12bc9de53/schema)
