Get started with the UGCKit API in under 5 minutes. Create carousels, AI videos, and reaction videos programmatically.
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer ugck_live_xxxxxxxxxxxxx
ugck_test_ keys during development - they return mock data and don't consume credits. Switch to ugck_live_ for production.
Go to your dashboard → Settings → API tab. Click "Generate API Key". Choose Test or Live mode. Copy and save it securely - you won't see it again!
Let's create a carousel. The API is asynchronous - you'll get a job ID to poll for results.
curl -X POST https://ugckit.io/api/v1/carousels \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "5 Tips for Better Sleep",
"num_slides": 5,
"style": "educational"
}'
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
| topic | string required | The topic or title for your carousel |
| num_slides | integer optional | Number of slides (3-10, default: 5) |
| style | string optional | Style: "educational", "promotional", "storytelling" |
Response:
{
"job_id": "abc12345",
"status": "pending",
"message": "Carousel generation started",
"poll_url": "/api/v1/jobs/abc12345"
}
Use the job ID to check when your content is ready:
curl https://ugckit.io/api/v1/jobs/abc12345 \
-H "Authorization: Bearer YOUR_API_KEY"
Response (completed):
{
"job_id": "abc12345",
"status": "completed",
"progress": 100,
"result": {
"media_urls": [
"https://storage.ugckit.io/users/.../slide_01.png",
"https://storage.ugckit.io/users/.../slide_02.png",
"https://storage.ugckit.io/users/.../slide_03.png"
],
"thumbnail_url": "https://storage.ugckit.io/users/.../slide_01.png",
"caption": "Your generated caption with hashtags..."
}
}
Create AI-generated videos from text prompts using Veo3, Sora, Runway, Pika, or Kling.
curl -X POST https://ugckit.io/api/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cat playing piano in a cozy living room, cinematic lighting",
"model": "veo3",
"duration": 5,
"aspect_ratio": "9:16"
}'
| Parameter | Type | Description |
|---|---|---|
| prompt | string required | Description of the video to generate |
| model | string optional | "veo3" (default), "sora", "runway", "pika", "kling" |
| duration | integer optional | Video length in seconds (model-dependent) |
| aspect_ratio | string optional | "9:16" (vertical), "16:9" (horizontal), "1:1" (square) |
Generate AI avatar reactions to any video URL.
curl -X POST https://ugckit.io/api/v1/reaction-videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video_url": "https://example.com/viral-video.mp4",
"reaction_style": "excited"
}'
| Parameter | Type | Description |
|---|---|---|
| video_url | string required | URL of the video to react to |
| persona_id | string optional | Your custom persona ID (uses default if omitted) |
| reaction_style | string optional | "excited", "shocked", "thoughtful", "funny" |
import requests
import time
API_KEY = "ugck_live_xxxxx"
BASE_URL = "https://ugckit.io/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# 1. Create a carousel
response = requests.post(
f"{BASE_URL}/carousels",
headers=headers,
json={
"topic": "10 Morning Habits of Successful People",
"num_slides": 6,
"style": "educational"
}
)
job = response.json()
job_id = job["job_id"]
print(f"Started job: {job_id}")
# 2. Poll until complete (with timeout)
for _ in range(60): # Max 5 minutes
status = requests.get(
f"{BASE_URL}/jobs/{job_id}",
headers=headers
).json()
print(f"Status: {status['status']}")
if status["status"] == "completed":
print("✅ Done!")
print(f"Slides: {status['result']['media_urls']}")
print(f"Caption: {status['result']['caption']}")
break
elif status["status"] == "failed":
print(f"❌ Failed: {status.get('error')}")
break
time.sleep(5) # Wait 5 seconds between polls
const axios = require('axios');
const API_KEY = 'ugck_live_xxxxx';
const BASE_URL = 'https://ugckit.io/api/v1';
async function createCarousel() {
// Start the job
const { data: job } = await axios.post(
`${BASE_URL}/carousels`,
{
topic: '5 Ways to Boost Productivity',
num_slides: 5,
style: 'promotional'
},
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
console.log(`Job started: ${job.job_id}`);
// Poll for completion
while (true) {
const { data: status } = await axios.get(
`${BASE_URL}/jobs/${job.job_id}`,
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
if (status.status === 'completed') {
console.log('Done!', status.result);
return status.result;
}
if (status.status === 'failed') {
throw new Error(status.error);
}
await new Promise(r => setTimeout(r, 5000));
}
}
createCarousel().catch(console.error);
The API returns standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request - check your parameters |
| 401 | Unauthorized - invalid or missing API key |
| 403 | Forbidden - insufficient credits or plan |
| 404 | Not found - job ID doesn't exist |
| 429 | Rate limited - slow down requests |
{
"detail": {
"error": "insufficient_credits",
"credits_required": 10,
"credits_balance": 5
}
}