Skip to main content

Background music

GET /api/v1/musics

List all MP3 files available in the background music library (resource/songs/).
curl http://localhost:8080/api/v1/musics
{
  "status": 200,
  "message": "success",
  "data": {
    "files": [
      {
        "name": "output013.mp3",
        "size": 1891269,
        "file": "/path/to/resource/songs/output013.mp3"
      }
    ]
  }
}
files
array

POST /api/v1/musics

Upload an MP3 file to the background music library. Only .mp3 files are accepted.
curl -X POST http://localhost:8080/api/v1/musics \
  -F "file=@/path/to/my-track.mp3"
{
  "status": 200,
  "message": "success",
  "data": {
    "file": "/path/to/resource/songs/my-track.mp3"
  }
}
After uploading, reference the file by name in bgm_file when generating a video.

Video materials

GET /api/v1/video_materials

List all local video and image files available as video materials.
curl http://localhost:8080/api/v1/video_materials
{
  "status": 200,
  "message": "success",
  "data": {
    "files": [
      {
        "name": "my-clip.mp4",
        "size": 12345678,
        "file": "/path/to/storage/local_videos/my-clip.mp4"
      }
    ]
  }
}
Supported formats: mp4, mov, avi, flv, mkv, jpg, jpeg, png.

POST /api/v1/video_materials

Upload a video or image file to the local materials library.
curl -X POST http://localhost:8080/api/v1/video_materials \
  -F "file=@/path/to/my-clip.mp4"
{
  "status": 200,
  "message": "success",
  "data": {
    "file": "/path/to/storage/local_videos/my-clip.mp4"
  }
}
After uploading local materials, set video_source = "local" in your video generation request to use them as footage. See Video Sources for details.

Build docs developers (and LLMs) love