curl -X POST "https://api.hooked.so/v1/project/create/ugc-studio/voiceover" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Morning routine",
"script": "Mornings used to be chaos. Now I start every day with ten quiet minutes.",
"avatarId": "2",
"voiceId": "1000",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75
},
"language": "en",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
}'
const response = await fetch("https://api.hooked.so/v1/project/create/ugc-studio/voiceover", {
method: "POST",
headers: {
"x-api-key": "your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
script: "This is the bottle that goes everywhere with me.",
avatarId: "2",
voiceId: "1000",
productImageKey: "https://example.com/images/bottle.png",
webhook: "https://example.com/hooks/hooked?token=YOUR_SECRET"
}),
});
const { data } = await response.json();
console.log(data.projectId, data.status);
import requests
response = requests.post(
"https://api.hooked.so/v1/project/create/ugc-studio/voiceover",
headers={"x-api-key": "your_api_key_here"},
json={
"script": "Ten minutes a day changed how I sleep.",
"avatarId": "2",
"voiceId": "1000",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
},
)
data = response.json()["data"]
print(data["projectId"], data["status"])
{
"success": true,
"data": {
"projectId": "cm8x4f2qk0007l708a1b2c3d4",
"status": "processing"
},
"message": "UGC ad successfully created"
}
{
"success": false,
"message": "voiceId: A narrator voice is required for the voiceover format"
}
{
"code": "not_authenticated",
"message": "Not authenticated",
"errorCode": "NOT_AUTHENTICATED",
"details": { "x-api-key": "Header not provided or API Key invalid" }
}
{
"success": false,
"code": "missing_credentials",
"errorCode": "MISSING_CREDENTIALS",
"missingProviders": [["elevenlabs"]],
"message": "Your team uses its own provider keys (BYOK) and these are missing or invalid: ElevenLabs. Add them in Settings → AI keys."
}
{
"success": false,
"code": "subscription_required",
"errorCode": "SUBSCRIPTION_REQUIRED",
"message": "Your team generates with Hooked's keys, which are paid by your plan. Subscribe to keep generating."
}
{
"success": false,
"errorCode": "INSUFFICIENT_CREDITS",
"message": "Not enough credits for UGC ad creation. Estimated: 107, Available: 40",
"creditsNeeded": 107,
"creditsAvailable": 40
}
{
"code": "entitlement_required",
"error": "entitlement_required",
"message": "This endpoint requires the \"app\" product.",
"product": "app"
}
Voiceover
UGC Studio: a narrator reads the script over silent scenes of the avatar
curl -X POST "https://api.hooked.so/v1/project/create/ugc-studio/voiceover" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Morning routine",
"script": "Mornings used to be chaos. Now I start every day with ten quiet minutes.",
"avatarId": "2",
"voiceId": "1000",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75
},
"language": "en",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
}'
const response = await fetch("https://api.hooked.so/v1/project/create/ugc-studio/voiceover", {
method: "POST",
headers: {
"x-api-key": "your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
script: "This is the bottle that goes everywhere with me.",
avatarId: "2",
voiceId: "1000",
productImageKey: "https://example.com/images/bottle.png",
webhook: "https://example.com/hooks/hooked?token=YOUR_SECRET"
}),
});
const { data } = await response.json();
console.log(data.projectId, data.status);
import requests
response = requests.post(
"https://api.hooked.so/v1/project/create/ugc-studio/voiceover",
headers={"x-api-key": "your_api_key_here"},
json={
"script": "Ten minutes a day changed how I sleep.",
"avatarId": "2",
"voiceId": "1000",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
},
)
data = response.json()["data"]
print(data["projectId"], data["status"])
{
"success": true,
"data": {
"projectId": "cm8x4f2qk0007l708a1b2c3d4",
"status": "processing"
},
"message": "UGC ad successfully created"
}
{
"success": false,
"message": "voiceId: A narrator voice is required for the voiceover format"
}
{
"code": "not_authenticated",
"message": "Not authenticated",
"errorCode": "NOT_AUTHENTICATED",
"details": { "x-api-key": "Header not provided or API Key invalid" }
}
{
"success": false,
"code": "missing_credentials",
"errorCode": "MISSING_CREDENTIALS",
"missingProviders": [["elevenlabs"]],
"message": "Your team uses its own provider keys (BYOK) and these are missing or invalid: ElevenLabs. Add them in Settings → AI keys."
}
{
"success": false,
"code": "subscription_required",
"errorCode": "SUBSCRIPTION_REQUIRED",
"message": "Your team generates with Hooked's keys, which are paid by your plan. Subscribe to keep generating."
}
{
"success": false,
"errorCode": "INSUFFICIENT_CREDITS",
"message": "Not enough credits for UGC ad creation. Estimated: 107, Available: 40",
"creditsNeeded": 107,
"creditsAvailable": 40
}
{
"code": "entitlement_required",
"error": "entitlement_required",
"message": "This endpoint requires the \"app\" product.",
"product": "app"
}
Overview
Nobody talks to camera: a narrator voice (voiceId, with optional audio settings) reads the script over silent scenes of the avatar, one scene per stretch of the script. With productImageKey, one scene shows the product alone. There is no B-roll, layout or camera style to choose.
This is one of the five UGC Studio formats; each one has its own endpoint and reads only its own fields. The avatar’s voice, lip movement and gestures are generated with the picture.
curl -X POST "https://api.hooked.so/v1/project/create/ugc-studio/voiceover" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Morning routine",
"script": "Mornings used to be chaos. Now I start every day with ten quiet minutes.",
"avatarId": "2",
"voiceId": "1000",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75
},
"language": "en",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
}'
const response = await fetch("https://api.hooked.so/v1/project/create/ugc-studio/voiceover", {
method: "POST",
headers: {
"x-api-key": "your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
script: "This is the bottle that goes everywhere with me.",
avatarId: "2",
voiceId: "1000",
productImageKey: "https://example.com/images/bottle.png",
webhook: "https://example.com/hooks/hooked?token=YOUR_SECRET"
}),
});
const { data } = await response.json();
console.log(data.projectId, data.status);
import requests
response = requests.post(
"https://api.hooked.so/v1/project/create/ugc-studio/voiceover",
headers={"x-api-key": "your_api_key_here"},
json={
"script": "Ten minutes a day changed how I sleep.",
"avatarId": "2",
"voiceId": "1000",
"webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
},
)
data = response.json()["data"]
print(data["projectId"], data["status"])
{
"success": true,
"data": {
"projectId": "cm8x4f2qk0007l708a1b2c3d4",
"status": "processing"
},
"message": "UGC ad successfully created"
}
{
"success": false,
"message": "voiceId: A narrator voice is required for the voiceover format"
}
{
"code": "not_authenticated",
"message": "Not authenticated",
"errorCode": "NOT_AUTHENTICATED",
"details": { "x-api-key": "Header not provided or API Key invalid" }
}
{
"success": false,
"code": "missing_credentials",
"errorCode": "MISSING_CREDENTIALS",
"missingProviders": [["elevenlabs"]],
"message": "Your team uses its own provider keys (BYOK) and these are missing or invalid: ElevenLabs. Add them in Settings → AI keys."
}
{
"success": false,
"code": "subscription_required",
"errorCode": "SUBSCRIPTION_REQUIRED",
"message": "Your team generates with Hooked's keys, which are paid by your plan. Subscribe to keep generating."
}
{
"success": false,
"errorCode": "INSUFFICIENT_CREDITS",
"message": "Not enough credits for UGC ad creation. Estimated: 107, Available: 40",
"creditsNeeded": 107,
"creditsAvailable": 40
}
{
"code": "entitlement_required",
"error": "entitlement_required",
"message": "This endpoint requires the \"app\" product.",
"product": "app"
}
Errors
| Status | Body | When |
|---|---|---|
| 400 | { success: false, message } | Invalid JSON body; Subscription not found (no plan record: contact support); a field fails validation (script: Script must be at least 1 character); voiceId missing (voiceId: A narrator voice is required for the voiceover format) or unknown; an unknown avatarId or musicId; an image key of another team; an invalid caption preset; webhook: Must be a valid HTTPS URL |
| 401 | not_authenticated | Missing or invalid x-api-key |
| 402 | missing_credentials | Your team uses its own keys (BYOK) and a key this request needs is missing. Nothing is created |
| 402 | subscription_required | Your team uses Hooked’s keys and has no active subscription |
| 402 | INSUFFICIENT_CREDITS | The estimate is higher than your balance |
| 403 | entitlement_required | Your team does not have the product this endpoint belongs to |
| 500 | { success: false, message } | Internal server error or Failed to create UGC ad. Credits charged are refunded |
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.Credits and your own keys
- Teams on Hooked’s keys (managed): priced from the narration, the scene images and the silent clips. Charged up front when the project is created; refunded if it fails.
- Teams on their own keys (BYOK): no credits are charged. The team needs OpenRouter and ElevenLabs in Settings → AI keys; without them the request answers
402 missing_credentialsand nothing is created.
What happens next
The clips are generated, assembled and rendered automatically.- Poll Get Project with the
projectIduntildata.videois present anddata.video.statusisCOMPLETED, then downloaddata.video.url. The project’s ownstatusturnscompletedwhen the clips are assembled, a little before the render finishes;failed(or aFAILEDvideo) means it will not finish. - Or pass a
webhookand get the result when the render finishes. See Webhooks.
Related
List Avatars
List Voices
Get Project
Webhooks
Authorizations
Headers
Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header Idempotent-Replayed: true, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See Idempotency.
1 - 255^[\x20-\x7E]+$Body
What the narrator reads over the scenes.
1 - 10000Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400.
30The narrator: a voice ID from /v1/voice/list (yours or the library's). An unknown ID answers 400.
30Project name (max 100 characters). Generated from the script when omitted.
100The narrator's voice settings (ElevenLabs).
Show child attributes
Show child attributes
Optional product photo (a public https image URL or the storage key of an image in your team's library (a key of another team answers 400)): one scene shows the product alone.
1000Shape of the video.
ratio_9_16, ratio_16_9, ratio_1_1 Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. en, es.
Burned-in captions.
Show child attributes
Show child attributes
Branding.
Show child attributes
Show child attributes
Background music ID from /v1/music/list. An unknown ID answers 400.
30HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of ".") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload.
500Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key automationId is reserved for dashboard automations and is removed.