Face to Model
The 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.
- Model Name:
face-to-model - Lifecycle: experimental
- Processing Time: 20sā120s (see below)
- Output Formats: PNG, JPEG
- Delivery Methods: URL or Base64 encoding
- Credits: 1-5 per output image depending on
resolutionandgeneration_mode
Request
Transform face images into professional model shots by submitting the face image to the universal /v1/run endpoint:
Request Parameters
face_imageRequiredimage URL | base64
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.
promptstring
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.
aspect_ratiostring
Desired aspect ratio for the output image. Only vertical ratios are supported. Images will always be extended downward to fit the aspect ratio.
Supported ratios: "1:1", "4:5", "3:4", "2:3", "9:16".
Default: 2:3
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 face-to-model, 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
num_imagesinteger
Number of images to generate in a single request. Must be between 1 and 4. Additional images consume more compute (and credits) and can increase processing time.
Default: 1
output_formatstring
Specifies the output image format.
"png"- PNG format, original quality"jpeg"- JPEG format, smaller file size
Default: "jpeg"
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 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
Credit Cost
generation_mode \ resolution | 1k | 2k | 4k |
|---|---|---|---|
fast | 1 | 2 | 3 |
balanced | 2 | 3 | 4 |
quality | 3 | 4 | 5 |
Additional pricing rules:
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 face-to-model avatar creation completes successfully, the status endpoint will return:
The images array contains URLs to your upper-body avatars with preserved facial identity, ready for virtual try-on applications.
Runtime Errors
Runtime errors for Face to Model use the shared set in Error Handling.
Related Guides
- Image Preprocessing Best Practices - Optimize your input images for better results
- Data Retention & Privacy - Understand how FASHN handles your data