Developer Hub

Build with agent-media

REST API, TypeScript & Python SDKs, CLI, MCP server for AI agents, OpenAPI spec, and webhooks. Pick your path.

Code Examples

Real-world snippets you can copy-paste.

Generate a product review video

TypeScript
import { AgentMedia } from '@agentmedia/sdk';

const client = new AgentMedia({ apiKey: 'ma_YOUR_KEY' });
const video = await client.createVideo({
  script: 'This app completely changed how I manage my tasks...',
  actor_slug: 'sofia',
  tone: 'excited',
  subtitles: 'hormozi',
});
console.log(video.video_url);

Batch generate from a list

Python
from agent_media import AgentMedia

client = AgentMedia(api_key="ma_YOUR_KEY")
scripts = [
    "Stop scrolling. This tool changed everything.",
    "I tried every app out there. This one won.",
    "Here's why 10,000 teams switched this month.",
]

jobs = [client.create_video(script=s, actor_slug="sofia") for s in scripts]
for job in jobs:
    print(job["video_url"])

Webhook + downstream processing

curl
curl -X POST https://api.agent-media.ai/v1/generate/ugc_video \
  -H "Authorization: Bearer ma_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "Your ad script here...",
    "actor_slug": "sofia",
    "webhook_url": "https://your-app.com/api/video-ready"
  }'

Generate from CLI in a shell script

bash
#!/bin/bash
# Generate 5 variants with different actors
for actor in sofia marcus adaeze jake emma; do
  agent-media ugc "This product is incredible." \
    --actor "$actor" --style hormozi --sync
done

Published Packages

All packages are open source and available on public registries.

Package
@agentmedia/sdkView →
agent-mediaView →
agent-media-cliView →
@agentmedia/mcp-serverView →
@agentmedia/schemaView →

Ready to build?

Get your API key and generate your first video in under a minute.