Create Task
Create a new content generation task using Sora2 or Sora2-Pro models.
Models Overview
Standard Models
- sora2_text_to_video: Generate videos from text prompts (10-15s)
- sora2_image_to_video: Animate images into videos (10-15s)
Pro Models (Powered by OpenAI Sora2-Pro)
- sora2_pro_text_to_video: Professional text-to-video with extended duration (15s HD / 25s SD)
- sora2_pro_image_to_video: Professional image-to-video with extended duration (15s HD / 25s SD)
- ⚠️ Remix feature not available for Pro models
All Videos Are Watermark-Free
✨ Both Standard and Pro models generate videos without any watermarks! All generated content is clean and ready for professional use.
Endpoint
POST /api/tasks
Authentication
All requests require Bearer Token authentication:
Authorization: Bearer YOUR_API_KEY
Request Body Parameters
Main Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| requestParams | object | Yes | Request parameters object containing all task configuration |
requestParams Object
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name (sora2) |
| modelName | string | Yes | Model to use: sora2_text_to_video, sora2_image_to_video, sora2_pro_text_to_video, sora2_pro_image_to_video |
| prompt | string | Yes | Description of the video to generate. Must avoid adult content, violence, political content, and copyrighted IP |
| imageUrl | string | Conditional | Required for image-to-video models - single image URL or base64 data. Images must not contain unauthorized real person likenesses |
| aspectRatio | string | No | Video aspect ratio: 9:16, 16:9 (default: 9:16) |
| duration | number | No | Video duration in seconds: 10 (SD), 15 (SD for standard, HD for pro), 25 (SD, pro only). Default: 10 for standard, 25 for pro. Only Pro 15s is HD quality, all others are SD |
| remixTargetId | string | No | Previous task ID to create a remix/variation (only available for standard models, not pro) |
| callbackUrl | string | No | Webhook URL to receive task completion notifications |
Examples
Text-to-Video
- cURL
- Python
- JavaScript
curl -X POST https://api.firebirdgen.com/api/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"requestParams": {
"projectName": "sora2",
"modelName": "sora2_text_to_video",
"prompt": "A beautiful sunset over the ocean",
"aspectRatio": "9:16",
"duration": 10,
"callbackUrl": "https://your-domain.com/webhook"
}
}'
import requests
API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://api.firebirdgen.com'
def create_task():
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
data = {
'requestParams': {
'projectName': 'sora2',
'modelName': 'sora2_text_to_video',
'prompt': 'A beautiful sunset over the ocean',
'aspectRatio': '9:16',
'duration': 10,
'callbackUrl': 'https://your-domain.com/webhook'
}
}
response = requests.post(
f'{BASE_URL}/api/tasks',
json=data,
headers=headers
)
response.raise_for_status()
result = response.json()
print('Task created:', result)
return result['data']['taskId']
task_id = create_task()
print(f'Task ID: {task_id}')
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.firebirdgen.com';
async function createTask() {
const response = await fetch(`${BASE_URL}/api/tasks`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestParams: {
projectName: 'sora2',
modelName: 'sora2_text_to_video',
prompt: 'A beautiful sunset over the ocean',
aspectRatio: '9:16',
duration: 10,
callbackUrl: 'https://your-domain.com/webhook'
}
})
});
const result = await response.json();
console.log('Task created:', result);
return result.data.taskId;
}
createTask().then(taskId => {
console.log('Task ID:', taskId);
});
Image-to-Video
- cURL
- Python
- JavaScript
curl -X POST https://api.firebirdgen.com/api/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"requestParams": {
"projectName": "sora2",
"modelName": "sora2_image_to_video",
"prompt": "Animate this image with gentle camera movement",
"imageUrl": "https://example.com/image.jpg",
"aspectRatio": "9:16",
"duration": 10,
"callbackUrl": "https://your-domain.com/webhook"
}
}'
import requests
API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://api.firebirdgen.com'
def create_image_to_video_task():
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
data = {
'requestParams': {
'projectName': 'sora2',
'modelName': 'sora2_image_to_video',
'prompt': 'Animate this image with gentle camera movement',
'imageUrl': 'https://example.com/image.jpg',
'aspectRatio': '9:16',
'duration': 10,
'callbackUrl': 'https://your-domain.com/webhook'
}
}
response = requests.post(
f'{BASE_URL}/api/tasks',
json=data,
headers=headers
)
response.raise_for_status()
return response.json()
result = create_image_to_video_task()
print('Task ID:', result['data']['taskId'])
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.firebirdgen.com';
async function createImageToVideoTask() {
const response = await fetch(`${BASE_URL}/api/tasks`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestParams: {
projectName: 'sora2',
modelName: 'sora2_image_to_video',
prompt: 'Animate this image with gentle camera movement',
imageUrl: 'https://example.com/image.jpg',
aspectRatio: '9:16',
duration: 10,
callbackUrl: 'https://your-domain.com/webhook'
}
})
});
return await response.json();
}
createImageToVideoTask().then(result => {
console.log('Task ID:', result.data.taskId);
});
Video Remix (New Feature)
Create a variation or continuation of a previous video by providing the task ID.
- cURL
- Python
- JavaScript
curl -X POST https://api.firebirdgen.com/api/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"requestParams": {
"projectName": "sora2",
"modelName": "sora2_text_to_video",
"prompt": "Continue the previous scene with more dramatic lighting",
"remixTargetId": "task_abc123"
}
}'
import requests
API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://api.firebirdgen.com'
def create_remix_task(original_task_id):
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
data = {
'requestParams': {
'projectName': 'sora2',
'modelName': 'sora2_text_to_video',
'prompt': 'Continue the previous scene with more dramatic lighting',
'remixTargetId': original_task_id
}
}
response = requests.post(
f'{BASE_URL}/api/tasks',
json=data,
headers=headers
)
response.raise_for_status()
return response.json()
# Use a previous task ID
result = create_remix_task('task_abc123')
print('Remix Task ID:', result['data']['taskId'])
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.firebirdgen.com';
async function createRemixTask(originalTaskId) {
const response = await fetch(`${BASE_URL}/api/tasks`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestParams: {
projectName: 'sora2',
modelName: 'sora2_text_to_video',
prompt: 'Continue the previous scene with more dramatic lighting',
remixTargetId: originalTaskId
}
})
});
return await response.json();
}
// Use a previous task ID
createRemixTask('task_abc123').then(result => {
console.log('Remix Task ID:', result.data.taskId);
});
Response
Success Response
{
"success": true,
"statusCode": 200,
"data": {
"taskId": "task_abc123",
"status": "processing",
"estimatedTime": 180
},
"message": "Task created successfully"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| statusCode | number | HTTP status code |
| data.taskId | string | Unique identifier for the created task |
| data.status | string | Current task status (processing) |
| data.estimatedTime | number | Estimated completion time in seconds |
| message | string | Human-readable response message |
Status Codes
| Code | Description |
|---|---|
| 200 | Success - Task created successfully |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server error occurred |
Error Response
{
"success": false,
"statusCode": 400,
"error": {
"code": "INVALID_PARAMETERS",
"message": "Invalid request parameters",
"details": {
"field": "prompt",
"message": "Prompt is required"
}
}
}
Notes
Remix Feature
The remixTargetId parameter allows you to create variations or continuations of previously generated videos:
- What it does: Uses a previous video as a reference to generate a new video with similar style or as a continuation
- How to use: Provide the task ID of a completed task that belongs to your account
- Security: You can only remix your own tasks - the system validates ownership
- Use cases:
- Create variations with different prompts
- Continue a story from where it left off
- Experiment with different styles while maintaining consistency
Example workflow:
- Generate an initial video and get task ID
task_abc123 - Wait for the task to complete
- Create a remix by providing
remixTargetId: "task_abc123"with a new prompt - The new video will reference the original for consistency
Remix Tips
- The original task must be completed before you can remix it
- You can only remix tasks that belong to your account
- The remix inherits the aspect ratio and duration from the original unless specified otherwise
- Use descriptive prompts to guide how the remix should differ from the original
Processing Time
Video generation typically takes 3-5 minutes. Use the Query Task endpoint to check the status, or provide a callbackUrl to receive automatic notifications.
Rate Limits
- 10 requests per second per user
Next Steps
- Query Task Status - Check the status of your task
- Webhooks - Set up automatic notifications
- Error Handling - Handle API errors properly