FASHN Tryon V1 6

90 credits per successful call
ae_fashn_tryon_v1_6

Create virtual try-on images that show a garment on a person using garment and model photos.

Image
90 credits per successful call

Pricing

90 credits per successful call
ConditionCharge
Each successful call90 credits/call

Each successful call is charged 90 credits.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.modeenum (performance | balanced | quality)NoSpecifies the mode of operation. 'performance' mode is faster but may sacrifice quality, 'balanced' mode is a balance between speed and quality, and 'quality' mode is slower but produces higher quality results.balanced
request_body.seedinteger | unknownNoSets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results.—
request_body.categoryenum (tops | bottoms | one-pieces | auto)NoCategory of the garment to try-on. 'auto' will attempt to automatically detect the category of the garment.auto
request_body.sync_modebooleanNoIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.false
request_body.model_imagestringYesURL or base64 of the model image—
request_body.num_samplesintegerNoNumber of images to generate in a single run. Image generation has a random element in it, so trying multiple images at once increases the chances of getting a good result.1
request_body.garment_imagestringYesURL or base64 of the garment image—
request_body.output_formatenum (png | jpeg)NoOutput format of the generated images. 'png' is highest quality, while 'jpeg' is fasterpng
request_body.moderation_levelenum (none | permissive | conservative)NoContent moderation level for garment images. 'none' disables moderation, 'permissive' blocks only explicit content, 'conservative' also blocks underwear and swimwear.permissive
request_body.segmentation_freebooleanNoDisables human parsing on the model image.true
request_body.garment_photo_typeenum (auto | model | flat-lay)NoSpecifies 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.auto

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit first, then query with the returned task_id until the task completes.

Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_fashn_tryon_v1_6' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "category": "one-pieces",
      "garment_image": "https://v3b.fal.media/files/b/0ab1ca6e/EgrqBF7CCuUbA1Xao3xQK_S58QnF1r.jpg",
      "garment_photo_type": "flat-lay",
      "mode": "quality",
      "model_image": "https://v3b.fal.media/files/b/0ab1ca70/0fZpEuUhQRXurEcmLjUf5_HMYdTIil.jpg",
      "moderation_level": "permissive",
      "num_samples": 1,
      "output_format": "jpeg",
      "segmentation_free": true
    }
  }
}'
Response exampleresponse.json
JSON
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "cc3014ff-385c-4137-b381-bac9de4f7f38"
}