API Documentation

Generate videos programmatically via REST API, or connect Wavemaker as an MCP tool in Cursor, Claude Desktop, or any MCP-compatible client.

Authentication

All API requests require an API key passed as a Bearer token. Create and manage keys from your dashboard API Keys page.

API Key Format

Keys are prefixed with mcp_ and are at least 32 characters long. Store them securely. They cannot be retrieved after creation, only the last 4 characters are visible in the dashboard.

Rate Limits

30 requests per minute per API key. Rate limit headers are included in every response: X-RateLimit-Remaining and X-RateLimit-Reset (Unix timestamp).

Authorization: Bearer mcp_your_api_key_here

Quick Start

Generate a video in three steps: create a job, poll for status, then retrieve the result.

1. Create a video generation job
curl -X POST https://wavemaker.adwave.com/api/v1/videos \
  -H "Authorization: Bearer mcp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Create a 30-second ad for a coffee shop in Brooklyn",
    "aspect_ratio": "16:9",
    "platform": "youtube"
  }'
2. Poll for status
curl https://wavemaker.adwave.com/api/v1/videos/job_abc123 \
  -H "Authorization: Bearer mcp_your_api_key"
3. Get the composition
curl https://wavemaker.adwave.com/api/v1/videos/job_abc123/composition \
  -H "Authorization: Bearer mcp_your_api_key"

Or use webhooks to get notified automatically when the video is ready.

Videos

POST /api/v1/videos API Key

Start a new video generation job. The AI analyzes your prompt, plans scenes, generates visuals, voiceover, and music, then composes a final video. Costs credits based on complexity.

Request Body
ParameterTypeRequiredDescription
prompt string Required Description of the video to generate. Min 3 characters. Can include a URL to scrape.
aspect_ratio string Optional 16:9 (default), 9:16, 1:1, or 4:5
platform string Optional Target platform hint (e.g. youtube, instagram, tiktok)
duration string Optional Target duration hint (e.g. 30s, 60s)
style string Optional Visual style preference (e.g. cinematic, minimal, playful)
webhook_url string Optional HTTPS URL to receive a POST when the job completes or fails. See Webhooks.
webhook_secret string Optional Secret used to sign webhook payloads via HMAC-SHA256.
Response

202 Job accepted

{
  "job_id": "job_abc123",
  "status": "queued",
  "message": "Video generation started",
  "webhook_url": "https://your-server.com/webhook"
}
Error Responses

402 Insufficient credits: your organization does not have enough credits

429 Rate limit or monthly quota exceeded

GET /api/v1/videos/:jobId API Key

Check the status and progress of a video generation job. Returns an ETag header for conditional requests and Retry-After when the job is still processing.

Response

200 Job status

{
  "job_id": "job_abc123",
  "status": "running",
  "phase": "generating_media",
  "progress_pct": 65,
  "composition_id": null,
  "output": null,
  "error": null
}
Status Values
StatusDescription
queuedJob accepted, waiting to start
runningActively generating. Check phase and progress_pct
completedDone. composition_id and output are populated
erroredFailed. See error field
GET /api/v1/videos/:jobId/events API Key

Stream real-time progress events via Server-Sent Events (SSE). The stream ends with a complete or errored event.

Query Parameters
ParameterTypeDescription
last_event_id string Resume from a specific event ID (for reconnection)
Response

SSE text/event-stream

event: progress
data: {"phase":"generating_media","progress_pct":45,"message":"Generating scene 3 of 5"}

event: progress
data: {"phase":"composing","progress_pct":85,"message":"Composing final video"}

event: complete
data: {"composition_id":"comp_xyz","output":{"url":"https://..."}}
GET /api/v1/videos/:id/composition API Key

Retrieve the full video composition JSON for a completed job. Contains the complete scene definitions, style spec, audio tracks, and asset URLs.

Response

200 Composition data

{
  "composition_id": "comp_xyz",
  "composition": {
    "scenes": [...],
    "style": {
      "colorPalette": {...},
      "typography": {...},
      "motionLanguage": "cinematic"
    },
    "audio": {
      "voiceover": {...},
      "music": {...}
    },
    "metadata": {
      "aspectRatio": "16:9",
      "totalDurationFrames": 900
    }
  }
}
POST /assets/sign API Key

Generate signed public URLs for composition asset keys. Use this to resolve asset references from the composition JSON into downloadable URLs. Up to 50 keys per request.

Request Body
{
  "keys": ["assets/scene-1/image.png", "assets/scene-2/video.mp4"]
}
Response

200

{
  "urls": {
    "assets/scene-1/image.png": "https://...",
    "assets/scene-2/video.mp4": "https://..."
  }
}

Webhooks

Instead of polling, receive an HTTPS POST to your server when a video generation job completes or fails. Pass webhook_url (and optionally webhook_secret) when creating a job.

Delivery

Webhooks are sent as POST requests with a JSON body. Your endpoint must respond with a 2xx status code. The URL must use HTTPS.

Verification

If you provide a webhook_secret, each request is signed. Verify using the X-Webhook-Signature header (format: v1,<hmac>).

Headers
HeaderDescription
X-Webhook-IDUnique delivery identifier
X-Webhook-TimestampUnix timestamp of delivery
X-Webhook-SignatureHMAC-SHA256 signature (when webhook_secret is set). Signed content: webhookId.timestamp.body
Payload: video.completed
{
  "event": "video.completed",
  "job_id": "job_abc123",
  "status": "completed",
  "composition_id": "comp_xyz",
  "output": {
    "url": "https://..."
  },
  "created_at": "2026-04-01T12:00:00Z",
  "completed_at": "2026-04-01T12:03:45Z"
}
Payload: video.failed
{
  "event": "video.failed",
  "job_id": "job_abc123",
  "status": "errored",
  "error": "Generation failed: insufficient scene content",
  "created_at": "2026-04-01T12:00:00Z",
  "completed_at": "2026-04-01T12:01:12Z"
}

Usage

GET /api/v1/usage API Key

Retrieve usage statistics for the API key over a specified period.

Query Parameters
ParameterTypeDefaultDescription
days integer 30 Lookback period in days (1–90)
Response

200

{
  "period_days": 30,
  "total_requests": 142,
  "total_cost_cents": 8500,
  "by_action": {
    "video_generation": { "count": 42, "cost_cents": 8500 }
  },
  "quota": {
    "quota_cents": 50000,
    "used_cents": 8500,
    "remaining_cents": 41500,
    "unlimited": false
  }
}

MCP Integration

Wavemaker implements the Model Context Protocol, so you can use it as a tool in Cursor, Claude Desktop, Windsurf, or any MCP-compatible client. The MCP endpoint uses the same API key authentication.

Available Tools
generate_video
Generate a complete video from a natural language prompt
get_status
Check the progress and status of a generation job
scrape_and_analyze
Scrape a URL and extract brand assets, colors, and content
plan_video
Plan a video's structure, scenes, and storyboard
compose_video
Compose a video from a structured plan
refine_video
Refine a composition with natural language instructions
get_cost_estimate
Estimate credit cost before generating
render_video
Render a composition to a final MP4 file
get_usage
View current credit usage and quota
Cursor MCP Configuration

Add this to your .cursor/mcp.json in any project:

{
  "mcpServers": {
    "wavemaker": {
      "url": "https://wavemaker.adwave.com/mcp",
      "headers": {
        "Authorization": "Bearer mcp_your_api_key"
      }
    }
  }
}
Claude Desktop Configuration

Add to your Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "wavemaker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://wavemaker.adwave.com/mcp",
        "--header",
        "Authorization:${MCP_API_KEY}"
      ],
      "env": {
        "MCP_API_KEY": "Bearer mcp_your_api_key"
      }
    }
  }
}
Direct MCP Request

You can also call the MCP endpoint directly:

curl -X POST https://wavemaker.adwave.com/mcp \
  -H "Authorization: Bearer mcp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'

Errors

The API uses standard HTTP status codes. Error responses include a JSON body with an error field describing the issue.

CodeMeaningDescription
200 OK Request succeeded
202 Accepted Job created and queued for processing
400 Bad Request Invalid or missing parameters
401 Unauthorized Missing or invalid API key
402 Payment Required Insufficient credits. Purchase more or upgrade your plan
404 Not Found Job or resource does not exist
429 Too Many Requests Rate limit exceeded. Check Retry-After header
Error Response Format
{
  "error": "Monthly quota exceeded",
  "retryAfterSeconds": 3600
}

Ready to integrate? Create your API key to get started.

Manage API Keys