Skip to main content

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

ParameterTypeRequiredDescription
requestParamsobjectYesRequest parameters object containing all task configuration

requestParams Object

ParameterTypeRequiredDescription
projectNamestringYesProject name (sora2)
modelNamestringYesModel to use: sora2_text_to_video, sora2_image_to_video, sora2_pro_text_to_video, sora2_pro_image_to_video
promptstringYesDescription of the video to generate. Must avoid adult content, violence, political content, and copyrighted IP
imageUrlstringConditionalRequired for image-to-video models - single image URL or base64 data. Images must not contain unauthorized real person likenesses
aspectRatiostringNoVideo aspect ratio: 9:16, 16:9 (default: 9:16)
durationnumberNoVideo 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
remixTargetIdstringNoPrevious task ID to create a remix/variation (only available for standard models, not pro)
callbackUrlstringNoWebhook URL to receive task completion notifications

Examples

Text-to-Video

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"
}
}'

Image-to-Video

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"
}
}'

Video Remix (New Feature)

Create a variation or continuation of a previous video by providing the task ID.

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"
}
}'

Response

Success Response

{
"success": true,
"statusCode": 200,
"data": {
"taskId": "task_abc123",
"status": "processing",
"estimatedTime": 180
},
"message": "Task created successfully"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request was successful
statusCodenumberHTTP status code
data.taskIdstringUnique identifier for the created task
data.statusstringCurrent task status (processing)
data.estimatedTimenumberEstimated completion time in seconds
messagestringHuman-readable response message

Status Codes

CodeDescription
200Success - Task created successfully
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
429Too Many Requests - Rate limit exceeded
500Internal 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:

  1. Generate an initial video and get task ID task_abc123
  2. Wait for the task to complete
  3. Create a remix by providing remixTargetId: "task_abc123" with a new prompt
  4. 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