Model Swap
Model Swap enables you to change the identity of fashion models in existing images while preserving clothing and outfit details exactly as they appear. Transform skin tone, facial features, and hair while maintaining the garments, pose, and styling perfectly intact.
For consistent photoshoots, an optional premium face reference capability lets you swap to a specific identity and achieve repeatable, campaign‑ready results across sets.
- Model Name:
model-swap - Lifecycle: experimental
- Processing Time: 20s–120s (see below)
- Credits: 1-5 per output image depending on
resolutionandgeneration_mode(+3per output image withface_reference)
Request
Transform fashion model identity while preserving clothing by submitting the source image (and optionally a face reference) to the universal /v1/run endpoint:
Request Parameters
Required Parameters
model_imageRequiredimage URL | base64
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>)
Optional Parameters
promptstring
Text guidance for identity or scene adjustments. If omitted, the system generates an appropriate prompt based on image analysis.
Default: Empty string (automatic prompt)
face_referenceimage URL | base64
Optional reference image to guide identity. When provided, the pipeline refines the model swap so both the body and face are aligned with the reference.
Default: None
face_reference_mode'match_base' | 'match_reference'
Additional fine control for identity guidance when face_reference is provided.
-match_base keeps the original photo’s head angle, gaze, and expression while applying the reference identity.
-match_reference favors the reference face’s pose and expression for maximum
resemblance.
Default: match_reference
resolution'1k' | '2k' | '4k'
Output resolution tier. '1k' produces ~1 megapixel output, '2k' ~4 megapixels, and '4k' ~16 megapixels. Exact output dimensions depend on this tier and the image aspect ratio.
Default: '1k'
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. If omitted, FASHN selects generation_mode
automatically. For model-swap, omitted generation_mode is currently billed
as 'fast' at 1k and as 'quality' at 2k or 4k.
seedinteger
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.
Default: 42
Range: 0 to 2^32 - 1
num_imagesinteger
Number of images to generate per request. Must be between 1 and 4.
Default: 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.
Default: png
return_base64boolean
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.
Default: false
Credit Cost
generation_mode \ resolution | 1k | 2k | 4k |
|---|---|---|---|
fast | 1 | 2 | 3 |
balanced | 2 | 3 | 4 |
quality | 3 | 4 | 5 |
Additional pricing rules:
face_referenceadds+3credits per output image.num_imagesmultiplies the total cost by the number of outputs requested.- If
generation_modeis omitted, automatic pricing applies.
Processing Time
Processing time depends on both resolution and generation_mode. The fastest configuration (fast + 1k) typically completes in under 20 seconds, while the most intensive (quality + 4k) can take up to 120 seconds. Actual latency may vary with current server load.
Response Polling
After submitting your request, poll the status endpoint using the returned prediction ID. See API Fundamentals for complete polling details.
Successful Response
When your model swap completes successfully, the status endpoint will return:
The output array contains URLs to your processed images with the transformed model identity while preserving the original clothing and styling.
Runtime Errors
Runtime errors for Model Swap use the shared set in Error Handling.
Related Guides
For detailed implementation guidance and best practices:
- Prompting in FASHN ↗ - Learn how to write effective prompts for best results
- Image Preprocessing Best Practices - Optimize your source images for identity transformation