List your models
GET
https://us-central1-aiavatar-01.cloudfunctions.net/businessApi/modelsGives you the list of models you created in your dashboard. Show these in your app so your user can choose who wears their clothing.
Before you use it
Models are created in your dashboard, under Models — there's no API for creating them. Make a few male and female models before you go live. You can have up to 25.
What to send
| Header / query | Required? | What to send |
|---|---|---|
X-Api-Key | Required | Your API key, as a header. |
gender | Optional | Send male or female if you only want one kind. Leave it out to get all your models. |
Example request
curl "https://us-central1-aiavatar-01.cloudfunctions.net/businessApi/models?gender=female" \
-H "X-Api-Key: cp_live_xxxxxxxxxxxxxxxx"
Example response
{
"models": [
{
"model_id": "5b0e3f1c-…", // send this as model_id when you make clothing photos
"gender": "female", // male or female
"image_url": "https://…", // a photo of the model, to show in your app
"traits": { // how the model looks
"ethnicity": "indian",
"skin_color": "medium",
"body_type": "auto"
},
"created_at": 1790611200000 // when you created it (milliseconds)
}
]
}
Good to know
- Models you hide in the dashboard are not in this list.
- Models don't change, so you can save this list on your side and refresh it now and then.
- Model photos are never deleted.
