Skip to main content
POST
/
v1
/
project
/
create
/
ugc-ads
Create UGC Ad Video
curl --request POST \
  --url https://b8e35428b2f8.ngrok-free.app/api/v1/project/create/ugc-ads \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data @- <<EOF
{
  "name": "Product Review Ad",
  "script": "Hey everyone! I just got this amazing product and I had to share. The quality is incredible and it's so easy to use!",
  "avatarId": "avatar_casual_01",
  "voiceId": "enthusiastic_voice_id",
  "musicId": "music_lofi_01",
  "caption": {
    "preset": "wrap1",
    "alignment": "bottom",
    "disabled": false
  },
  "media": [
    {
      "id": "product_video",
      "type": "video",
      "title": "Product Demo",
      "url": "https://example.com/demo.mp4",
      "durationInFrames": 200,
      "isAIGenerated": true
    }
  ],
  "adSettings": {
    "bRollType": "rounded-cover",
    "removeAvatarBackground": true
  },
  "aspectRatio": "ratio_9_16",
  "language": "en",
  "webhook": "https://yoursite.com/webhook",
  "metadata": {
    "campaignId": "campaign_id",
    "variant": "A"
  }
}
EOF
{
  "success": true,
  "data": {
    "videoId": "vid_ugc_abc123xyz",
    "projectId": "proj_ugc_abc123xyz",
    "status": "STARTED"
  },
  "message": "UGC ad successfully created"
}
Try it out! Use the API playground on the right to test the UGC Ads endpoint directly.

Overview

UGC Ads videos are perfect for creating authentic-looking user-generated content style advertisements. This format is ideal for:
  • Social media advertising (TikTok, Instagram Reels, Facebook)
  • Product reviews and testimonials
  • Influencer-style marketing content
  • Authentic brand storytelling
UGC Ads use AI avatars with voice synthesis to create realistic spokesperson videos that feel natural and engaging.

Endpoint

POST /v1/project/create/ugc-ads

Required Fields

script
string
required
The script for the avatar to speak (1-10,000 characters). Write naturally as if a real person is speaking.
avatarId
string
required
Avatar ID from /v1/avatar/list. Choose an avatar that matches your target audience.
voiceId
string
required
Voice ID from /v1/voice/list. The voice used for the avatar’s speech.
caption
object
required
Caption settings for the video
adSettings
object
required
Ad-specific settings for B-roll behavior
aspectRatio
string
required
Video aspect ratio:
  • ratio_9_16: Vertical (TikTok, Reels, Shorts) - Recommended for UGC
  • ratio_16_9: Horizontal (YouTube)
  • ratio_1_1: Square (Instagram)
language
string
required
Language code for the video (max 2 characters).
media
array
required
B-roll media items (min 1, max 50). At least one media item is required. These are images or videos that will be shown during the ad.

Optional Fields

name
string
Video name (max 100 characters)
musicId
string
Music ID from /v1/music/list for background music.
webhook
string
HTTPS URL to receive completion notification (max 500 characters). Highly recommended for production use.
metadata
object
Custom metadata object (max 5KB). Store any additional data you need to associate with this video.
{
  "campaignId": "summer2024",
  "productSku": "SKU-12345",
  "customField": "any value"
}

Request Examples

Basic UGC Ad

{
  "script": "I've been using this product for a month now and I'm obsessed! Let me show you why it's so amazing.",
  "avatarId": "avatar_influencer_01",
  "voiceId": "enthusiastic_voice_id",
  "caption": {
    "preset": "wrap1",
    "alignment": "top",
    "disabled": false
  },
  "adSettings": {
    "bRollType": "rounded-cover",
    "removeAvatarBackground": true
  },
  "aspectRatio": "ratio_9_16",
  "webhook": "https://yoursite.com/webhooks/video-complete"
}

Complete UGC Ad

{
  "name": "Brand Campaign Ad",
  "script": "Stop scrolling! I need to tell you about something that literally changed my morning routine. I was skeptical at first, but after trying this for just one week... I'm never going back.",
  "avatarId": "avatar_professional_01",
  "voiceId": "confident_voice_id",
  "musicId": "trending_music_01",
  "caption": {
    "preset": "beast",
    "alignment": "bottom",
    "disabled": false
  },
  "media": [
    {
      "id": "demo_video",
      "type": "video",
      "title": "Product Demo",
      "url": "https://your-cdn.com/demo.mp4",
      "durationInFrames": 200,
      "isAIGenerated": true
    }
  ],
  "adSettings": {
    "bRollType": "down",
    "removeAvatarBackground": false
  },
  "aspectRatio": "ratio_9_16",
  "language": "en",
  "webhook": "https://api.yoursite.com/hooks/hooked",
  "metadata": {
    "campaignId": "Q1-2024-ugc",
    "abTestVariant": "B",
    "internalRef": "MKT-5678"
  }
}

Response

{
  "success": true,
  "data": {
    "videoId": "vid_ugc_abc123xyz",
    "projectId": "proj_ugc_abc123xyz",
    "status": "STARTED"
  },
  "message": "UGC ad successfully created"
}

Webhook Notification

When your video is ready, we’ll POST to your webhook URL:
Webhook Payload
{
  "status": "COMPLETED",
  "data": {
    "videoId": "vid_ugc_abc123xyz",
    "status": "COMPLETED",
    "url": "https://cdn.tryhooked.ai/videos/abc123xyz.mp4",
    "shareUrl": "https://cdn.tryhooked.ai/shared/abc123xyz.mp4",
    "metadata": {
      "projectId": "proj_ugc_abc123xyz",
      "campaignId": "Q1-2024-ugc",
      "abTestVariant": "B"
    }
  },
  "message": "Video completed"
}
Your webhook endpoint must return a 200 status code. We’ll retry up to 3 times if the request fails.

Caption Presets

Available caption presets for the caption.preset field:
PresetDescription
defaultDefault caption style with bold text and shadow effects
beastBold uppercase style with Komika font
umiYellow glowing text style
tiktokViral & trendy style, perfect for social media
wrap1Wrapped style with red background highlight
wrap2Wrapped style with blue background highlight (uppercase)
arielBold uppercase style with purple highlight
hookedBrand style with purple background
classicClean, simple captions with black background (Default)
activeGreen background with bold text
bubbleWhite background bubble style
glassGlassmorphic transparency effect
comicComic Sans font with colorful style
glowPink and orange glow effects
pastelSoft pastel pink background
neonGreen neon glow effect
retroTVRetro TV style with cyan glow
redRed glow effect with white text
markerYellow marker/highlighter style
modernContemporary white background style
blueBlue background style
vividVibrant pink background with uppercase text

B-Roll Types

Available B-roll display options for adSettings.bRollType:
TypeDescription
downAvatar on top half, B-roll on bottom half (Default)
upB-roll on top half, avatar on bottom half
leftAvatar on right, B-roll on left - balanced layout
rightAvatar on left, B-roll on right - balanced layout
rounded-coverRounded avatar overlay on B-roll background
full-widthB-roll covers entire screen, avatar hidden

Best Practices

Write Naturally

Scripts should sound conversational. Use contractions, pauses, and natural speech patterns.

Hook First

Start with an attention-grabbing hook in the first 2-3 seconds to stop scrolling.

Keep It Short

15-60 seconds is ideal for social media ads. Get to the point quickly.

Use B-Roll

Add product shots or demos to keep viewers engaged and showcase your product.

Common Use Cases

Create authentic-looking product review videos.
{
  "name": "5-Star Review",
  "script": "I bought this not expecting much, but WOW! This exceeded all my expectations. The build quality is amazing and it works exactly as advertised. 10/10 would recommend!",
  "avatarId": "avatar_casual_01",
  "voiceId": "enthusiastic_voice_id",
  "caption": {
    "preset": "tiktok",
    "alignment": "bottom",
    "disabled": false
  }
}
Showcase customer success stories.
{
  "name": "Customer Testimonial",
  "script": "Before I found this product, I was struggling every day. Now? My life is completely different. I can't imagine going back to how things were before.",
  "avatarId": "avatar_professional_01",
  "voiceId": "enthusiastic_voice_id",
  "caption": {
    "preset": "modern",
    "alignment": "bottom",
    "disabled": false
  },
  "adSettings": {
    "removeAvatarBackground": true
  }
}
Create engaging unboxing content.
{
  "name": "Unboxing Experience",
  "script": "Okay so my package just arrived and I'm SO excited to open this with you! Let's see what's inside... Oh my gosh, look at this packaging! They really went all out!",
  "avatarId": "avatar_enthusiastic_01",,
  "voiceId": "enthusiastic_voice_id",
  "caption": {
    "preset": "modern",
    "alignment": "bottom",
    "disabled": false
  },
  "media": [
    {
      "id": "unbox_1",
      "type": "video",
      "url": "https://example.com/unboxing.mp4",
      "durationInFrames": 200
    }
  ],
  "adSettings": {
    "bRollType": "down"
  }
}

Error Handling

ErrorDescriptionSolution
script: Script must be at least 1 characterMissing or empty scriptAdd the script field with your ad content
avatarId: Avatar not foundInvalid avatar IDUse a valid avatar ID from /v1/avatar/list
voiceId: Voice not foundInvalid voice IDUse a valid voice ID from /v1/voice/list
webhook: Must be a valid HTTPS URLInvalid webhook URLEnsure webhook URL starts with https://
media: Cannot have more than 50 media itemsToo many media itemsReduce media array to 50 items or fewer
Not enough creditsInsufficient creditsTop up your account credits

Next Steps

Authorizations

x-api-key
string
header
required

Body

application/json
script
string
required

The script for the avatar to speak (1-10,000 characters)

Required string length: 1 - 10000
avatarId
string
required

Avatar ID from /v1/avatar/list

Maximum string length: 30
voiceId
string
required

Voice ID from /v1/voice/list. If not provided, uses avatar's default voice.

Maximum string length: 30
caption
object
required
media
object[]
required

B-roll media items (min 1, max 50). At least one media item is required.

Required array length: 1 - 50 elements
adSettings
object
required
aspectRatio
enum<string>
required

Video aspect ratio

Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
language
enum<string>
required

Language code (max 2 characters)

Available options:
en,
es
Maximum string length: 2
name
string

Video name (max 100 characters)

Maximum string length: 100
musicId
string

Music ID from /v1/music/list for background music

Maximum string length: 30
webhook
string

HTTPS URL to receive completion notification

Maximum string length: 500
metadata
object

Custom metadata object (max 5KB)

Response

UGC Ad created successfully

success
boolean
data
object
message
string