Using FoxAI v1 Model
Billing Rules
One request returns two songs. Different models have different prices:
- Using the foxai-v1 model, each request deducts 1 point and returns two songs.
Getting Started
Note: When using the foxai-v1 model, only English is supported, and instrumental music is not supported. For instrumental music, please use the suno model.
Base URL: https://api.foxai.me/api/v1/music
headers parameters:
{
"api-key": "Your API Key",
}
Submitting a Music Generation Task
Path: /generate
Method: POST
Type: application/json
Example parameters:
- Generate music based on lyrics and tags
{
"model": "foxai-v1",
"tags": ["rock", "pop"],
"lyrics" : """[Verse]
Woke up today the sky was gray
o sunshine no color play
But in my heart there’s light to share
I’ll dance in rain without a care
[Verse 2]
Puddles were made for us to splash
No need to rush no need to dash
Dancing free with lightning’s flash
Embrace the moment make it last"""
}
- Generate music based on description
{
"model": "foxai-v1",
"description": "The last song ever sung on the planet earth"
}
Querying
Path: /query
Method: GET
Supports querying multiple IDs at once. For example:
/query?ids=id1,id2,id3
Example response:
[
{
"id": "9852c423-203e-4ae9-a616-cc5f8eda7fb3",
"audio_url": "https://cdn.foxai.me/song_9852c423-203e-4ae9-a616-cc5f8eda7fb3.mp3",
"image_url": "https://cdn.foxai.me/image_9852c423-203e-4ae9-a616-cc5f8eda7fb3.png",
"video_url": "",
"title": "Splashing in Stormy Serenades",
"metadata": {
"model": "foxai-v1",
"lyrics": "[Verse]\n Woke up today the sky was gray\n o sunshine no color play\n But in my heart there’s light to share\n I’ll dance in rain without a care\n\n [Verse 2]\n Puddles were made for us to splash\n No need to rush no need to dash\n Dancing free with lightning’s flash\n Embrace the moment make it last",
"tags": [
"rock",
"pop"
],
"duration": 30
},
"status": "success",
"duration": 30,
"err_msg": null,
"created_at": "2024-11-28T13:36:05.382514"
}
]