RawUGC API
Procedural knowledge for agents to call the RawUGC API. All requests require an API key from the RawUGC dashboard, passed via environment variable.
Authentication
- Environment variable: Read the API key from . The key is created in the RawUGC dashboard and must be kept secret; do not hardcode or log it.
- Header: Send on every request:
Authorization: Bearer <value of RAWUGC_API_KEY>
.
- If is missing or empty, inform the user they must set it and obtain a key from the RawUGC dashboard.
Base URL
- Production:
https://rawugc.com/api/v1
- All paths below are relative to this base.
API Versioning
RawUGC uses date-based API versioning. The current latest version is
.
- request header: Override the version per-request (recommended).
- API key pinned version: Set when creating the key in the dashboard.
- Fallback: Latest version () if neither is set.
Always send
RawUGC-Version: 2026-03-06
in requests to ensure consistent behavior.
Video Generation
POST /videos/generate
Initiate video generation.
Request body (JSON):
| Field | Type | Required | Description |
|---|
| string | Yes | , , , , |
| string | For text-to-video / veo3 | Text description (1-5000 chars) |
| string[] | For image-to-video / kling | URLs, max 10. Veo3/veo3_fast accept up to 2 optional images. |
| string[] | For kling | URLs, max 1. Required for |
| string | No | Sora: /. Veo3: // |
| string | No | or (Sora only) |
| string | No | Character username (e.g. ) |
| string | No | or (kling only) |
| string | No | or (kling only) |
Response (201):
,
,
,
,
,
,
.
GET /videos/:videoId
Get video status. Returns
,
,
,
,
,
(when completed),
,
,
,
,
(edit history array).
GET /videos
List videos. Query:
,
(1-100, default 50),
. Returns
array +
.
POST /videos/captions
Add styled captions to a completed video. Costs 1 credit.
| Field | Type | Required | Description |
|---|
| string | Yes | Video identifier (vid_xxx) |
| string | No | Language code (e.g. ). Defaults to auto-detect |
Response (200):
,
,
,
,
.
POST /videos/overlay
Add text overlay to a completed video.
| Field | Type | Required | Description |
|---|
| string | Yes | Video identifier (vid_xxx) |
| string | Yes | Overlay text (1-500 chars) |
| string | No | , , or |
| integer | No | 8-200 pixels |
| integer | No | 0-500 pixels |
| number | No | 0-10 |
Response (200):
,
,
,
,
.
Image Generation
POST /images/generate
Generate AI images using Nano Banana models. Async -- poll GET /images/:imageId.
| Field | Type | Required | Description |
|---|
| string | Yes | (text-to-image, 4 credits) or (image editing, 2 credits) |
| string | Yes | Text description or edit instruction (1-20000 chars) |
| string[] | For editing | Source images. Required for . Optional for (reference images, max 14). |
| string | No | For : , , , , etc. |
| string | No | For : , , , , etc. |
| string | No | For : , , |
| string | No | , , |
| boolean | No | Use Google Web Search grounding ( only) |
Response (201):
,
,
,
,
,
,
.
GET /images/:imageId
Get image status. Returns
,
,
,
,
(when completed),
,
,
,
,
,
,
,
.
GET /images
List images. Query:
,
(1-100, default 20),
. Returns
array +
.
Music Generation
POST /music/generate
Generate AI music using Suno models. 3 credits per generation. Async -- poll GET /music/:musicId.
| Field | Type | Required | Description |
|---|
| string | Yes | Music description (1-2000 chars) |
| string | No | , , , , , (default: ) |
| boolean | No | Instrumental only, no vocals (default: true) |
| string | No | Track title (max 200 chars). Enables custom mode with . |
| string | No | Style descriptor (max 500 chars, e.g. ) |
Response (201):
,
,
,
,
,
,
.
GET /music/:musicId
Get music status. Returns
,
,
,
,
(when completed),
,
,
,
,
,
,
,
.
GET /music
List music tracks. Query:
,
(1-100, default 20),
. Returns
array +
.
Upload
POST /upload
Upload a video or image file. Returns a URL for use in generation requests (
,
) or
. Max 100MB.
Request:
with
field. Accepted types:
,
,
,
,
,
.
Characters
GET /characters
List all available AI characters (built-in + custom). Returns
array,
,
,
.
GET /characters/:characterId
Get a character by ID. Returns
,
,
,
,
,
(
/
),
,
,
.
Personas (CRUD)
Personas define target audiences for content plan generation.
- GET /personas -- List all. Returns array + .
- POST /personas -- Create. Body: (required, max 200), (required, max 5000). Returns .
- GET /personas/:personaId -- Get one.
- PATCH /personas/:personaId -- Update. Body: , (both optional).
- DELETE /personas/:personaId -- Delete.
PersonaResponse:
,
,
,
,
,
.
Messaging (CRUD)
Brand/positioning messaging templates.
- GET /messaging -- List all. Returns array + .
- POST /messaging -- Create. Body: (required, max 200), (required, max 5000). Returns .
- GET /messaging/:messageId -- Get one.
- PATCH /messaging/:messageId -- Update. Body: , (both optional).
- DELETE /messaging/:messageId -- Delete.
MessagingResponse:
,
,
,
,
,
.
Products (CRUD)
Products for video generation.
- GET /products -- List all. Returns array + .
- POST /products -- Create. Body: (required, max 200), (required, URL array), (max 1000), (max 5000). Returns .
- GET /products/:productId -- Get one.
- PATCH /products/:productId -- Update. Body: , , , (all optional).
- DELETE /products/:productId -- Delete.
ProductResponse:
,
,
,
,
,
,
.
Styles (CRUD)
Video/image creative styles with optional prompt templates.
- GET /styles -- List all (built-in + custom). Query: (/). Returns array + .
- POST /styles -- Create. Body: (required, max 200), (max 1000), (/), (//), (max 5000, supports , , placeholders). Returns .
- GET /styles/:styleId -- Get one.
- PATCH /styles/:styleId -- Update. All fields optional.
- DELETE /styles/:styleId -- Delete.
StyleResponse:
,
,
,
,
,
,
,
,
.
Social Scheduling
GET /social/accounts
List connected social accounts (max 3 per org). Returns
array +
. Each account:
,
(
/
/
),
,
,
,
.
POST /social/accounts
Sync connected accounts from the scheduling provider. Returns
.
DELETE /social/accounts/:accountId
Disconnect a social account. Returns
.
POST /social/posts
Schedule, draft, or immediately publish a video to social media.
| Field | Type | Required | Description |
|---|
| string | Yes | URL of video to post |
| string[] | Yes | Target account IDs |
| string | Yes | , , or |
| integer | For schedule | Unix timestamp (ms) |
| string | No | IANA timezone (default: ) |
| string | No | Caption (max 2200 chars) |
| string | No | RawUGC video ID to link |
| boolean | No | Send to TikTok Creator Inbox |
| string | No | , , , |
| boolean | No | Allow TikTok comments |
| boolean | No | Allow TikTok duets |
| boolean | No | Allow TikTok stitches |
tiktokCommercialContentType
| string | No | , , |
Response (201): SocialPost object.
GET /social/posts
List posts. Query:
(ms),
(ms),
(boolean). Returns
array +
.
GET /social/posts/:postId
Get a post.
PATCH /social/posts/:postId
Update a post. Body:
,
,
,
(at least one field required).
DELETE /social/posts/:postId
POST /social/posts/:postId/reschedule
Reschedule a post. Body:
(required, ms),
.
POST /social/posts/:postId/publish
Immediately publish a draft post.
SocialPost:
,
,
(
/
/
/
),
,
,
,
,
,
.
Viral Library
GET /viral-library/videos/:videoId
Get a viral library video with full AI analysis (hooks, keyframes, performance insights). Returns ViralLibraryVideo.
GET /viral-library/search
Semantic search across analyzed videos. Query:
(required, natural language),
(1-50, default 20). Returns
(array of
),
,
.
Research
POST /scrape-tiktok
Scrape TikTok videos. Costs 3 credits.
| Field | Type | Required | Description |
|---|
| string | Yes | Search keyword, hashtag, or query (max 500) |
| string | No | , , (default: ) |
| integer | No | 1-10 (default: 10) |
Response (200):
(use with content-plans),
,
(array with
,
,
,
,
,
,
,
,
).
POST /content-plans
Generate a content plan from scraped videos. Costs 3 credits.
| Field | Type | Required | Description |
|---|
| string | Yes | From scrape-tiktok response |
| string | Yes | Content plan goals (max 5000) |
Response (200):
,
,
,
,
,
(array with
,
,
,
).
GET /content-plans
List all content plans. Returns
array +
.
POST /analyze-video
Analyze any video URL (social links or direct URLs). Costs 1 credit. Max 150MB.
| Field | Type | Required | Description |
|---|
| string | Yes | Video URL to analyze |
| string | No | Custom analysis prompt (max 5000) |
Response (200):
,
,
(array with
,
,
,
,
,
),
,
,
,
,
.
Errors
All error responses use RFC 7807 Problem Details (JSON):
,
,
,
,
,
.
| Status | Meaning |
|---|
| 400 | Validation error. Surface and to user. |
| 401 | Auth error. Check . |
| 402 | Insufficient credits. Add credits in dashboard. |
| 403 | Insufficient scope. API key lacks permissions. |
| 404 | Resource not found. |
| 429 | Rate limit exceeded. Check header. |
| 500 | Server error. Retry or contact support. |
Rate Limits
- API Key: 10 req/min. Session: 20 req/min.
- Headers: , , (unix timestamp).
Workflow: Generate then poll
- Generate: POST to the generation endpoint. Note the returned ID (//).
- Poll: GET the status endpoint periodically (10-30s). Use exponential backoff.
- Finish: When , use the result URL. When , surface error to user.
- Edit (video only): POST to or .
For full request/response shapes, see reference.md.