Skip to content
Trang này chưa có bản dịch sang ngôn ngữ của bạn, nên hiện đang được hiển thị bằng tiếng Anh.

Music Video Rendering

Flow Music renders music into an mp4 video from a template, supporting three presets: simple / modern / player

Toàn bộ tài liệu
POST/v1/music/generations/videoClipFlowMusic

Ví dụ request

curl --request POST \
  --url https://api.apisea.ai/v1/music/generations/videoClipFlowMusic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "flowmusic",
    "clip_id": "abc123-def456",
    "preset": "modern"
  }'

Authentication

Authorizationstringrequired

All endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key management page to get your API Key

Add it to the request header:

text
Authorization: Bearer YOUR_API_KEY

Request Parameters

modelstringrequired

Model name, must be "flowmusic" (case-insensitive)

clip_idstringrequired

clip_id of the music to generate a video for, from a successful task's result.music[].clip_id

presetstringdefault: simple

Video template preset

Options:

  • simple - Clean template
  • modern - Modern-style template
  • player - Player-style template

Response

codeinteger

Response status code, 200 on success

dataarray

Array of returned data

Array elements

statusstring

Task status, submitted upon initial submission

task_idstring

Unique task identifier, used to query task status and results

Use Cases

Scenario 1: Render a music video with the modern template

json
{
  "model": "flowmusic",
  "clip_id": "abc123-def456",
  "preset": "modern"
}

Note

Query Task Results

Music video rendering is an asynchronous task; a task_id is returned after submission. Use the Get Task Status endpoint to query generation progress and results. The result is in result.music[0].video_url.

Completed Task Result Example

Query response example (GET /v1/music/tasks/{task_id}):

json
{
  "code": 200,
  "data": {
    "id": "task_01KWXVD4HQEEY7B5NJ31177Q1H",
    "status": "completed",
    "progress": 100,
    "created": 1783413248,
    "completed": 1783413327,
    "actual_time": 79,
    "cost": 0.016,
    "credits_cost": 0.16,
    "result": {
      "music": [
        {
          "clip_id": "a41aade4-993e-4d28-b56f-d97e7ef7167c",
          "video_url": "https://cdn.example.com/video/flowmusic_a41aade4_video_clip.mp4",
          "url": "https://cdn.example.com/video/flowmusic_a41aade4_video_clip.mp4"
        }
      ]
    }
  }
}

Phản hồi

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KWXVD4HQEEY7B5NJ31177Q1H"
    }
  ]
}

Phát hiện lỗi trong tài liệu này? Gửi email đến support@apisea.ai.