Avatar

Create product avatar image

Changed on

Generate product avatar images using AI with specified parameters

post/v2/product_avatar/generation

Request

  • Base URL
    https://api.jogg.ai
  • URL
    https://api.jogg.ai/v2/product_avatar/generation
  • Auth
    API key in header x-api-key

Request body

product_image_urlstring uri required

Product image URL for avatar generation

promptstring

Image generation prompt

quality'medium' | 'high' | 'low' required

Image generation quality

aspect_ratio'3:2' | '2:3' | '1:1' required

Aspect ratio(3:2, 2:3, 1:1)

num_imagesinteger required

Number of images to generate

webhook_urlstring uri

Webhook URL for status notifications

Example request

{
  "product_image_url": "https://res.jogg.ai/product.jpg",
  "avatar_source": {
    "type": "id"
  },
  "prompt": "Professional product presenter in business attire",
  "quality": "high",
  "aspect_ratio": "3:2",
  "num_images": 4,
  "webhook_url": "https://example.com/webhook"
}

Response

Success

codeinteger required

Business status code:

  • 0 - Success
  • 10104 - Record not found
  • 10105 - Invalid API key
  • 18020 - Insufficient credit
  • 18025 - No permission to call APIs
  • 40000 - Parameter error
  • 50000 - System error
msgstring required

Response message

Example response

{
  "msg": "Success",
  "data": {
    "batch_id": "batch_123456",
    "total_submitted": 4,
    "generations": [
      {
        "generation_id": "gen_123",
        "status": "pending",
        "created_at": 1640995200
      }
    ]
  }
}

Changes