Model Create
Model Create enables you to generate realistic fashion models with simple, intuitive prompts or reference images.
- Model Name:
model-create
- Processing Time: 10-12 seconds
- Supported Resolution: up to 1.05MP per image (see full list below)
Request
Generate fashion models by submitting your prompt and optional reference to the universal /v1/run
endpoint:
Request Parameters
Required Parameters
prompt
Requiredstring
Prompt for the model image generation. Describes the desired fashion model, clothing, pose, and scene.
Optional Parameters
aspect_ratio
'1:1' | '2:3' | '3:4' | '4:5' | '5:4' | '4:3' | '3:2' | '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.
Default: 2:3
image_reference
image URL | base64
Optional reference image that guides the generation process. The model extracts structural information from this image to control the output composition.
- Aspect Ratio: Output automatically matches the reference image's dimensions
- Guidance Type: Controlled by the
reference_type
parameter (pose or silhouette) - Image Processing: Automatically resized while preserving aspect ratio
Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>
)
reference_type
'pose' | 'silhouette'
Type of reference to use when image_reference
is provided:
pose
– Matches the body position and stance from the reference imagesilhouette
– Matches the outline and shape from the reference image
Default (if image_reference
is provided): pose
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.
Default: 42
Range: 0
to 2^32 - 1
disable_prompt_enhancement
boolean
Disable prompt enhancement. When true
, the prompt will be used as is, or a default prompt will be used if no prompt is provided.
Default: false
lora_url
file URL
URL to a FLUX-based LoRA weights file (.safetensors) for custom identity generation. When provided, the LoRA will be loaded and applied during generation to maintain consistent character appearance across generations.
- Architecture: Must be FLUX-compatible LoRA weights
- Format: .safetensors file format only
- File Size: Must be under 256MB
Example: https://example.com/custom_identity.safetensors
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_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.
Default: false
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 creation completes successfully, the status endpoint will return:
The output
array contains URLs to your generated fashion model images based on your prompt and optional reference parameters.
Runtime Errors
Model Create may encounter the following model-specific errors during processing:
Name | Cause | Solution |
---|---|---|
ImageLoadError | The pipeline was unable to load the reference image from the provided inputs. | For Image URLs:
|
LoRALoadError | Failed to download or load the LoRA weights file from the provided URL. |
|
PipelineError | An unexpected error occurred during the execution of the pipeline. | Retry the request (you will not be charged for failed attempts). If the issue persists, please reach out to us at support@fashn.ai and include the prediction ID from the failed attempt to help us locate and address the issue promptly. |
The Error Object
Example of an error when polling the /status
endpoint:
If you encounter an unrecognized error, please contact us at support@fashn.ai.
Related Guides
For detailed implementation guidance and best practices:
- Image Preprocessing Best Practices - Optimize your reference images