Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.loova.ai/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows how to make your first Loova API request.

Before You Start

Make sure you have:
  • a Loova account
  • an API key
  • sufficient API Credits
You can purchase API Credits, create and manage API keys, and view API credits usage in the Loova API Dashboard: https://loova.ai/api

Step 1: Get your API key

Go to the Loova API Dashboard: https://loova.ai/api After signing up, create an API key from the dashboard.

Step 2: Make sure you have enough API Credits

Before submitting a task, make sure your account has sufficient API Credits. You can purchase API Credits and view usage in the Loova API Dashboard: https://loova.ai/api

Step 3: Submit a video generation task

Use the following request to create a Seedance 2.0 video task:
curl -X POST "https://api.loova.ai/api/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": []
  }'

Example Response

{
  "code": 200,
  "trace_id": "trace_xxx",
  "message": "success",
  "data": {
    "task_id": "record_id",
    "status": "running",
    "created_at": "2024-01-01T12:00:00Z",
    "credits_cost": 12.0
  }
}
Save the returned task_id. You will use it to check task progress and retrieve the final output.

Step 4: Check task status

Use the returned task_id to query the task endpoint:
curl -X GET "https://api.loova.ai/api/v1/tasks?task_id=record_id" \
  -H "Authorization: Bearer <api_key>"

Example Response

{
  "code": 200,
  "trace_id": "trace_xxx",
  "message": "success",
  "data": {
    "task_id": "record_id",
    "status": "running",
    "model": "seedance_2_0",
    "created_at": "2024-01-01T12:00:00Z",
    "updated_at": "2024-01-01T12:00:05Z",
    "credits_cost": 12.0,
    "result": {
      "status": "succeeded",
      "video_url": "https://...",
      "error_message": null,
      "finished_at": "2024-01-01T12:02:00Z"
    }
  }
}

Step 5: Retrieve the final video

When the task succeeds, the generated video URL is returned at:
data.result.video_url

Polling Notes

  • The API is asynchronous
  • result may be null while the task is still in progress
  • Poll the task endpoint periodically until the task reaches a terminal state
  • If the task fails, check data.result.error_message when available

Next Steps

Once your first request works, you can continue with: