Skip to main content
This guide makes a talking avatar video end to end: pick an avatar, create the project, wait until it finishes, and download the file.

Get your API key

1

Log in

Go to hooked.so and log in or create an account.
2

Create a key

Open Settings → Developer API and create a key.
3

Store it

Copy the key and keep it in an environment variable, for example HOOKED_API_KEY.
Keep your API key secret. Never commit it to version control or use it in browser code.
Generating costs credits on a managed team, or needs your own provider keys on a byok team. See Credits and your own keys.

Step 1: Pick an avatar

Response
Keep the id of the avatar you want. A talking avatar speaks with its own voice, so you do not need a voice id for this format.

Step 2: Create the video

Response
The create call only starts the work. Save the projectId: it is how you find the video later. webhook and metadata are optional.
Send an Idempotency-Key header to retry safely: if a request times out or answers 5xx, sending it again with the same key and body returns the first answer instead of creating (and charging) the project twice.

Step 3: Wait for the video

You have two options. Use either, or both.

Option A: poll the project

Response (finished)
  • Project status is draft, processing, completed or failed.
  • video is null until rendering starts. Its status is STARTED, COMPLETED or FAILED, and its url is "" until the file is ready.
  • The video is ready when video.status is COMPLETED. Stop polling when that happens, or when the project or the video is failed/FAILED. The message field says what went wrong.
Polling every 10 to 15 seconds is plenty.

Option B: receive a webhook

If you passed webhook, Hooked POSTs to it when the video is done:
A failed project or render sends status: "FAILED" with an empty url. See Webhooks for every payload and the retry rules. A few failures while generating do not send a webhook yet, so poll as a backup if nothing arrives.

Step 4: Download the video

The URL can be signed and expire. Download the file and keep your own copy; if a link has expired, call GET /v1/project/{projectId} again for a fresh one.

The whole flow in code

A narrated video instead

To make a voiceover over AI-generated images, pick a voice and call script-to-video:
The rest of the flow (poll or webhook, then download) is the same.

Next steps

Webhooks

Get called when a video is ready or fails

Error Handling

What each error means and when to retry

Personalization

One video per customer, with their name and details

Examples

A working request for every format

Common issues

The x-api-key header is missing or the key is wrong or deleted. Check the key in Settings → Developer API.
Read the body’s code / errorCode: subscription_required (managed team without an active plan), INSUFFICIENT_CREDITS (not enough credits), or missing_credentials (byok team missing a provider key, listed in missingProviders).
The message names the field and the reason, for example avatarId: Avatar "abc" not found. Use ids from the list endpoints.
It must be an HTTPS URL on a public host that answers 2xx within 10 seconds, without redirects. Poll GET /v1/project/{projectId} to see where the project stands.