API Endpoints
On this page you will find our HTTP API reference. Currently, we support 2 types of endpoints:
run
- Run predictionstatus/:id
- Get prediction status
Run prediction
Initiate a new try-on prediction by posting to the following endpoint:
POSThttps://api.fashn.ai/v1/run
Request
Top-level Properties
model_name
Required'tryon-v1.6' | 'tryon-v1.5'
Specifies the model version to use for the virtual try-on prediction.
tryon-v1.6
- The latest and most advanced model, producing higher-quality outputs at 864×1296 resolution.tryon-v1.5
- The previous stable release, generating outputs at 576×864 resolution. Slightly faster than v1.6.
inputs
Requiredobject
Contains all the input parameters for the selected model. See the expandable sections below for version-specific parameters.
For a temporary transition period, if you send a request using the old format (parameters directly in the request body without model_name
and inputs
), the API will automatically use tryon-v1.5
for backwards compatibility.
Input Parameters
The following parameters are nested within the inputs
object. Select a model version to view its available parameters:
Response
The reponse will return the id
of the prediction which you will need to use for getting the status and result.
Get prediction status
Receive the status of the prediction by id
. Unless in a queue, it takes
up to 40 seconds to generate a try-on.
GEThttps://api.fashn.ai/v1/status/:id
Poll this endpoint to monitor the prediction's progress and retrieve the final output once available.
Request
Response
The response will return the prediction id
and status
.
Status types can be one of the following:
status
starting | in_queue | processing | completed | failed
Prediction in progress
Prediction completed
Rate Limits
/run
- Up to 50 requests per 60 seconds/status
- Up to 50 requests per 10 seconds
Our API rate limits are in place to ensure fair usage and prevent misuse of our services. However, we understand that legitimate applications may require higher limits as they grow. If your app's usage nears the specified rate limits, and this usage is justified by your application's needs, we will gladly increase your rate limit. Please reach out to our support@fashn.ai to discuss your specific requirements.
Privacy
Inputs and outputs generated through the API will be automatically deleted from our systems after 72 hours. However, you can still view the requests via the web app interface.