How it works
Three steps, all asynchronous.
One bearer key, JSON in and out. Every request carries its own prompt and pictures, so there's nothing to set up on our side first.
Send a photo and a prompt
POST /v1/avatars with the user's photo (a URL we can fetch, or an upload) and your look's prompt. You get 202 and a job id at once.
Get a webhook
When the job is done we POST it to your callback_url, signed with your webhook secret. Or poll GET /v1/jobs/{id}.
Download the result
output.url is a signed link, no key needed, valid for 7 days. Or give us a presigned URL and we upload straight to your bucket.
Create an avatar
curl -X POST https://api.loopfig.com/v1/avatars \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: avatar-u12345-1" \
-d '{
"prompt": "Turn the person in <image1> into a full-body collectible designer vinyl art toy figure, …",
"photo": {"url": "https://cdn.example.com/uploads/u12345/selfie.jpg"},
"ratio": "2:3",
"user_ref": "u12345",
"callback_url": "https://backend.example.com/hooks/avatars"
}'
# → 202 {"id": "job_01JD8X3K9Q2M4N6P8R0T2V4W6Y", "kind": "avatar", "status": "queued", …}
# webhook, ~20 s later:
# {"status": "succeeded", "output": {"type": "image", "width": 1024, "height": 1536,
# "url": "https://api.loopfig.com/v1/files/fil_01JD…?exp=…&sig=…"}, …}
The full contract, with outfits, emotes, webhooks, errors and the tested prompts for both styles, is in the integration guide and the OpenAPI schema.