Skip to main content
POST

Overview

Generates an avatar from a description, the same way Generate with AI does in the dashboard: one portrait with the image model you pick, which then becomes the avatar. The call answers 202 at once with the avatar in PROCESSING; the portrait takes about 20-60 seconds. Poll Get Avatar until status is COMPLETED (use the id as avatarId) or FAILED.
Managed teams pay the image model’s price: 4 credits with the default GPT Image 2, charged now and refunded if the generation fails. BYOK teams pay no credits; the team’s own OpenRouter key is used. Gender, age and tags are read off the finished portrait.
Describe the person and the scene the way you would brief a casting: age, gender, look, what they are doing and where.

Errors

A portrait that fails (the provider refused it, or it is still PROCESSING after 15 minutes) leaves the avatar FAILED and gives the credits back. Delete it with Delete Avatar and try again.

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header Idempotent-Replayed: true, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Body

application/json
description
string
required

Who the avatar is and where: age, gender, look, what they are doing, the setting. For example 28 year old woman with curly hair in a bright kitchen, holding a coffee.

Maximum string length: 2000
name
string

The avatar's name. Defaults to the first words of description.

Maximum string length: 60
model
string
default:gpt_image_2

Image model: an id of GET /v1/catalog/image-models.

aspectRatio
enum<string>
default:ratio_9_16
Available options:
ratio_9_16,
ratio_1_1,
ratio_16_9
artStyle
string
default:realistic

Visual style: a library id of GET /v1/catalog/visual-styles (realistic, anime, ...). Custom styles are not accepted.

Response

Generation started; the avatar is PROCESSING

success
boolean
required
data
object
required

One of your team's own avatars (an Actor under My Actors in the dashboard).

message
string