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
Unique identifier of the avatar to edit.
Unique identifier of the source look to use as base for editing.
Text prompt describing how to edit the look.
Image format: vertical (9:16) or horizontal (16:9). Defaults to vertical.
Additional image URLs to use for editing. The source look’s image is automatically added first if available.
Whether to upscale the generated image for better quality.
URL to receive webhook notifications when generation completes.
Response
Unique identifier of the avatar.
Unique identifier of the newly created look. This look starts in “pending” status.
Example
curl -X POST "https://app.hoox.video/api/public/v1/avatar/edit" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"avatar_id": "avtr_123",
"look_id": "look_src",
"prompt": "Add my product in his hand",
"format": "vertical",
"images": ["https://cdn.example.com/extra.jpg"],
"upscale": false,
"webhook_url": "https://example.com/webhooks/avatar-edit"
}'
Success Response
Error 400 - Validation Failed
Error 404 - Avatar Not Found
Error 402 - Insufficient Credits
{
"avatar_id" : "avtr_123" ,
"look_id" : "look_new"
}
Credit Costs
Base cost : 2 credits
Upscale : +1.5 credits
Next Steps
Check Status : Use /avatar/status endpoint to monitor the generation progress
List Looks : Use /avatar/list to see all available looks for your avatar
Error Codes
MISSING_AVATAR_ID: avatar_id parameter is required
MISSING_LOOK_ID: look_id parameter is required
INVALID_WEBHOOK_URL: webhook_url must be a valid URL
MISSING_PROMPT: prompt parameter is required
NO_IMAGE_AVAILABLE: No image available (source look has no thumbnail and images array is empty)
INSUFFICIENT_CREDITS: Not enough credits to edit the avatar
SPACE_NOT_FOUND: Space doesn’t exist
AVATAR_NOT_FOUND: Avatar with specified ID doesn’t exist
LOOK_NOT_FOUND: Look with specified ID doesn’t exist
FAILED_TO_PERSIST: Error saving new look to database
GENERATION_FAILED: Look generation failed (async error sent via webhook)