Developer Docs/Product Avatar API

Product Avatar API

Build Product Avatar integrations with MakeFun AI. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Create dynamic product showcase videos that pair a product image with an AI avatar or custom background scene.

Primary Endpoint

POST/api/v1/productAvatar/start

Generate product avatar with AI (Async)

Request Parameters

NameTypeRequiredDescription
namestringNoName for the product avatar generation task (optional)
image_urlsarray<string>YesArray of image URLs - [0] product image, [1] person image
product_rectobjectYesProduct positioning and transformation parameters
promptstringNoAdditional prompt for AI generation (optional)
timeoutnumberNoProcessing timeout in seconds
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.

Request Example

curl -X POST "https://makefun.ai/api/v1/productAvatar/start" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Product Avatar",
  "image_urls": [
    "https://example.com/product.jpg",
    "https://example.com/person.jpg"
  ],
  "product_rect": {},
  "prompt": "Professional product showcase",
  "timeout": 120,
  "webhook_url": "https://your-server.example.com/a2e/webhook",
  "webhook_token": "a-shared-secret"
}'

Related Endpoints

POST/api/v1/productAvatar/start

Generate product avatar with AI (Async)

GET/api/v1/productAvatar/allRecords

List all product avatar tasks

POST/api/v1/productAvatar/batchDetail

Batch query task details

GET/api/v1/productAvatar/{_id}

Query task status and get result

DELETE/api/v1/productAvatar/{_id}

Delete a product avatar task

Responses

200

Product avatar generation started successfully

400

Bad Request - Invalid parameters or missing required fields

401

Unauthorized - Invalid or missing bearer token