Getting started
Quickstart
Your first try-on in five minutes.
1. Get a key
Open the admin platform and copy your API key from Settings → API key. New accounts start with free credits, enough to run your first generations before paying.
2. Upload the shopper photo
bash
curl -X POST "https://api.genfashion.app/tryon/v1/images/upload" \
-H "x-api-key: gk_your_api_key" \
-F "file=@shopper.jpg"json
{ "imageId": "ephemeral/customer/ttl-7d/acc_1a2b3c/20260904-9f86d081.jpeg" }The imageId is opaque — pass it back exactly as received. It stays valid for your account's retention window, so one upload powers many generations.
3. Run the try-on
bash
curl -X POST "https://api.genfashion.app/tryon/v1/try-on" \
-H "x-api-key: gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"products": [{
"externalId": "shirt-42",
"title": "Blue check shirt",
"images": [{ "source": { "url": "https://cdn.example/shirt-42.jpg" } }]
}],
"person": { "image": { "source": { "id": "ephemeral/customer/…" } } }
}'json
{ "generationId": "gen_a81x", "status": "PENDING" }4. Poll for the result
bash
curl "https://api.genfashion.app/tryon/v1/generations/gen_a81x" \
-H "x-api-key: gk_your_api_key"Poll every 2 seconds until status is COMPLETED or FAILED. On success the response carries resultImageUrl.
Next steps
- Once a product exists, later calls only need its id:
{ "products": [{ "externalId": "shirt-42" }] }— about 50 bytes on the wire. - Prefer webhooks over polling in production. See Errors for the codes to branch on.
- Try the whole flow with no code in the Playground.