Webhooks allow you to receive real-time updates on avatar-related processes. You can register a webhook URL to get notifications about different events.

Registering a Webhook

To set up a webhook, you can register your URL by sending a request to the endpoint: POST /v1/avatars/create_avatar .Include your webhook URL in the webhook_data.webhook_url field of your request.

Event Types

There are two main event types you can subscribe to:

1. AVATAR EVENT

Description: This event is triggered during the avatar creation process.

Payload Structure:


{
	"event_type": "avatar_event",
	"data": {
			"avatar_id": "your_avatar_id",
			"status": "processing"
		}
}

Trigger Statuses:

processing : The avatar is currently being created.
failed : The avatar creation has failed.
published : The avatar has been successfully created and is now published.
consent_pending : Awaiting user consent.
consent_failed : User consent was not obtained.

2. AVATAR INFERENCE EVENT

Description: This event relates to the inference process of the avatar, i.e. when a video is being created from a Published Avatar. The inference_id in the payload represents the unique_id of the video created from the avatar.

Payload Structure:


{
	"event_type": "avatar_inference_event",
	"data": {
		"inference_id": "your_inference_id",
		"status": "failed"
	}
}

Trigger Statuses:

succeeded : The video creation was successful.
failed : The video creation has failed.