Skip to main content
POST
/
v1
/
video
/
seedance-2
Create Video Task
curl --request POST \
  --url https://api.loova.ai/api/v1/video/seedance-2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedance_2_0",
  "prompt": "A futuristic city at sunset",
  "function_mode": "omni_reference",
  "ratio": "16:9",
  "duration": 5,
  "image_urls": [],
  "audio_urls": [],
  "video_urls": []
}
'
{
  "code": 200,
  "trace_id": "45c30d76f06549b199a3775544523689",
  "message": null,
  "data": {
    "task_id": "record_id",
    "status": "running",
    "created_at": "2024-01-01T12:00:00Z",
    "credits_cost": 12
  }
}
Creates an asynchronous video generation task using Seedance 2.0 or Seedance 2.0 Fast.

Authentication

Include your API key in the Authorization header:
Authorization: Bearer <api_key>

Response Format

All responses follow the same envelope:
{
  "code": 200,
  "trace_id": "xxxxxx",
  "message": null,
  "data": {}
}

Endpoint

POST https://api.loova.ai/v1/video/seedance-2

Content-Type

application/json

Request Body

FieldTypeRequiredDefaultDescription
modelstringNoseedance_2_0Supported values: seedance_2_0, seedance_2_0_fast
promptstringYes-Text prompt for video generation
function_modestringNoomni_referenceSupported values: first_last_frames, omni_reference
ratiostringNo16:9Supported values: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
durationintegerNo5Output duration in seconds. Range: 4 to 15
image_urlsstring[]No[]List of image URLs
audio_urlsstring[]No[]List of audio URLs
video_urlsstring[]No[]List of video URLs

Validation Rules

  • prompt is required
  • model, ratio, and function_mode must use supported values
  • duration must be between 4 and 15 seconds
  • When function_mode = first_last_frames, a maximum of 2 images is allowed
  • When function_mode = omni_reference, audio-only input is not allowed; at least one image or video must be included if audio is provided
  • video_urls maximum: 3
  • image_urls maximum: 9
  • audio_urls maximum: 3

Success Response

{
  "code": 200,
  "trace_id": "45c30d76f06549b199a3775544523689",
  "message": null,
  "data": {
    "task_id": "task_id",
    "status": "running",
    "created_at": "2024-01-01T12:00:00Z",
    "credits_cost": 12.0
  }
}

Business-Level Failure Responses

Insufficient API Credits

{
  "code": 300111,
  "trace_id": "45c30d76f06549b199a3775544515689",
  "message": "Insufficient API credits"
}

Concurrent Task Limit Reached

{
  "code": 300111,
  "trace_id": "45c30d76f06549b199a3775544515689",
  "message": "Parallel task limit reached."
}

Notes

  • A successful request returns a task_id
  • Use the returned task_id to query task status and retrieve the final result
  • Business-level failures may return the same code with different message values, so client logic should inspect message when needed

cURL Example

curl -X POST "https://api.loova.ai/v1/video/seedance-2" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance_2_0",
    "prompt": "A futuristic city at sunset",
    "function_mode": "omni_reference",
    "ratio": "16:9",
    "duration": 5,
    "image_urls": [],
    "audio_urls": [],
    "video_urls": []
  }'

Error Response

All failed requests follow the same response envelope structure:
{
  "code": 400,
  "trace_id": "45c30d76f06549b199a3775544515689",
  "message": "Detailed error message",
  "data": null
}
  • code != 200 indicates the request failed
  • message contains the specific error reason

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Validation rules:

  • prompt is required
  • model, ratio, and function_mode must use supported values
  • duration must be between 4 and 15 seconds
  • When function_mode = first_last_frames, a maximum of 2 images is allowed
  • When function_mode = omni_reference, audio-only input is not allowed; at least one image or video must be included if audio is provided
prompt
string
required
model
enum<string>
default:seedance_2_0
Available options:
seedance_2_0,
seedance_2_0_fast
function_mode
enum<string>
default:omni_reference
Available options:
first_last_frames,
omni_reference
ratio
enum<string>
default:16:9
Available options:
21:9,
16:9,
4:3,
1:1,
3:4,
9:16
duration
integer
default:5
Required range: 4 <= x <= 15
image_urls
string<uri>[]
Maximum array length: 9
audio_urls
string<uri>[]
Maximum array length: 3
video_urls
string<uri>[]
Maximum array length: 3

Response

Successful response

code
integer
trace_id
string
message
string | null
data
object