Integrate powerful AI image and video generation into your applications with our simple REST API.
Sign up for a Prototipal account and generate your API key from the dashboard.
API DashboardUse the examples below to start generating images and videos.
GET /api/generations/status/{id}Check the status of a specific video generation using its UUID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (path) | Required | Video generation UUID to check status for |
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"status": "processing",
"output": [
"https://prototipal.b-cdn.net/sungerbob/generations/abc123.mp4"
],
"error": "string",
"created_at": "2025-09-28T20:59:20.1122",
"model": "openai/sora-2"
}curl -X GET https://gateway-api.prototipal.com/api/generations/status/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "accept: application/json"POST /api/long-story/videosGenerate a long-form video with multiple scenes. Each scene can have its own prompt, and the video can include narration in multiple languages.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Main topic or theme for the video |
scenes | array | Required | Array of scene objects with scene_number and prompt |
language_code | string | Required | Language code for narration (e.g., "en", "tr", "es") |
model | string | Optional | Video model to use (default: "sora-2") |
enable_narration | boolean | Optional | Enable narration (default: true) |
video_style | string | Optional | Video style (e.g., "cinematic", "documentary", "auto") |
{
"prompt": "A journey through space exploration",
"model": "sora-2",
"enable_narration": true,
"language_code": "en",
"scenes": [
{
"scene_number": 1,
"prompt": "Astronaut floating in space"
},
{
"scene_number": 2,
"prompt": "Space station orbiting Earth"
}
],
"video_style": "cinematic"
}{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"video_id": "video_abc123",
"status": "processing",
"message": "Video generation started"
}curl -X POST https://gateway-api.prototipal.com/api/long-story/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "accept: application/json" \
-d '{
"prompt": "A journey through space exploration",
"model": "sora-2",
"enable_narration": true,
"language_code": "en",
"scenes": [
{
"scene_number": 1,
"prompt": "Astronaut floating in space"
},
{
"scene_number": 2,
"prompt": "Space station orbiting Earth"
}
],
"video_style": "cinematic"
}'POST /api/long-story/videos/estimateGet an estimate of the credits required to generate a long-form video with a specific number of scenes and model.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Video model to use (e.g., "sora-2") |
scene_count | number | Required | Number of scenes in the video |
{
"model": "sora-2",
"scene_count": 5
}{
"success": true,
"model": "sora-2",
"duration": 25,
"scene_count_mode": true,
"scene_info": {
"total_scenes": 5,
"duration_per_scene": 5,
"scene_duration_note": "Each scene is approximately 5 seconds"
},
"credits": {
"required": 125,
"per_second": 5,
"total": 125
},
"pricing": {
"base_cost_usd_per_second": 0.05,
"total_base_cost_usd": 1.25,
"profit_margin": "20%"
}
}curl -X POST https://gateway-api.prototipal.com/api/long-story/videos/estimate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "accept: application/json" \
-d '{
"model": "sora-2",
"scene_count": 5
}'GET /api/long-story/videos/{videoId}Check the status and progress of a long-form video generation using its video ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
videoId | string (path) | Required | Video ID returned from the generate endpoint |
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"status": "processing",
"final_video_url": "https://prototipal.b-cdn.net/...video.mp4",
"total_duration": 25,
"error": null
}curl -X GET https://gateway-api.prototipal.com/api/long-story/videos/video_abc123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "accept: application/json"| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 402 | Payment Required - Insufficient credits |
| 404 | Not Found - Resource not found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Something went wrong |
API requests are rate-limited based on your subscription plan:
Our support team is here to help you integrate our API successfully.