Avatar
Edit Avatar Look
Create a new look for an existing avatar by editing from an existing look with a prompt
POST
Overview
This endpoint creates a new look for an existing avatar by editing a source look using AI. The source look is not modified - a new look is created based on it.Authentication
This endpoint requires API key authentication. Include your API key in the
Authorization header.Request Body
string
required
Unique identifier of the avatar to edit.
string
required
Unique identifier of the source look to use as base for editing.
string
required
Text prompt describing how to edit the look.
string
default:"vertical"
Image format:
vertical (9:16) or horizontal (16:9). Defaults to vertical.string
Avatar style to apply:
selfie, podcast, car, iphone, conference, or raw.array
Additional image URLs to use for editing. The source look’s image is automatically added first if available.
string
default:"2K"
Output image resolution:
2K or 4K. Optional, defaults to 2K. Note that 4K generation costs more credits.string
URL to receive webhook notifications when generation completes.
Response
string
Unique identifier of the avatar.
string
Unique identifier of the newly created look. This look starts in “pending” status.
Example
Credit Costs
- Base cost (2K): 2 credits
- Base cost (4K): 4 credits
Next Steps
- Check Status: Use
/avatar/statusendpoint to monitor the generation progress - List Looks: Use
/avatar/listto see all available looks for your avatar
Error Codes
MISSING_AVATAR_ID: avatar_id parameter is requiredMISSING_LOOK_ID: look_id parameter is requiredINVALID_WEBHOOK_URL: webhook_url must be a valid URLMISSING_PROMPT: prompt parameter is requiredNO_IMAGE_AVAILABLE: No image available (source look has no thumbnail and images array is empty)INSUFFICIENT_CREDITS: Not enough credits to edit the avatarSPACE_NOT_FOUND: Space doesn’t existAVATAR_NOT_FOUND: Avatar with specified ID doesn’t existLOOK_NOT_FOUND: Look with specified ID doesn’t existFAILED_TO_PERSIST: Error saving new look to databaseGENERATION_FAILED: Look generation failed (async error sent via webhook)

