Skip to main content
POST
https://app.hoox.video
/
api
/
public
/
v1
/
avatar
/
edit
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"
  }'
{
  "avatar_id": "avtr_123",
  "look_id": "look_new"
}

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

avatar_id
string
required
Unique identifier of the avatar to edit.
look_id
string
required
Unique identifier of the source look to use as base for editing.
prompt
string
required
Text prompt describing how to edit the look.
format
string
default:"vertical"
Image format: vertical (9:16) or horizontal (16:9). Defaults to vertical.
images
array
Additional image URLs to use for editing. The source look’s image is automatically added first if available.
upscale
boolean
default:"false"
Whether to upscale the generated image for better quality.
webhook_url
string
URL to receive webhook notifications when generation completes.

Response

avatar_id
string
Unique identifier of the avatar.
look_id
string
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"
  }'
{
  "avatar_id": "avtr_123",
  "look_id": "look_new"
}

Credit Costs

  • Base cost: 2 credits
  • Upscale: +1.5 credits

Next Steps

  1. Check Status: Use /avatar/status endpoint to monitor the generation progress
  2. 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)