Get the music
curl --request GET \
--url https://api.solaraai.com/api/v1/projects/{id}/music \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/music"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/projects/{id}/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"daily_limit": 123,
"enabled": true,
"mood": "auto",
"status": "off",
"used_today": 123,
"versions": [
{
"asset_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"mood": "<string>",
"provider": "<string>",
"status": "queued",
"trigger": "auto",
"version": 123,
"brief": "<string>",
"cache_hit": true,
"completed_at": "2023-11-07T05:31:56Z",
"error_class": "<string>",
"loudness_lufs": 123,
"note": "<string>",
"peaks_url": "<string>",
"rights_confirmed_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"track_ms": 123,
"url": "<string>"
}
],
"volume_db": 123,
"current": {
"asset_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"mood": "<string>",
"provider": "<string>",
"status": "queued",
"trigger": "auto",
"version": 123,
"brief": "<string>",
"cache_hit": true,
"completed_at": "2023-11-07T05:31:56Z",
"error_class": "<string>",
"loudness_lufs": 123,
"note": "<string>",
"peaks_url": "<string>",
"rights_confirmed_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"track_ms": 123,
"url": "<string>"
},
"default_provider": "elevenlabs",
"free_day_spent": true,
"generation_id": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Editing
Get the music
Solara AI API: The music setting, the current track and every version.
Permission: Read (read).
GET
/
api
/
v1
/
projects
/
{id}
/
music
Get the music
curl --request GET \
--url https://api.solaraai.com/api/v1/projects/{id}/music \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/projects/{id}/music"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/projects/{id}/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"daily_limit": 123,
"enabled": true,
"mood": "auto",
"status": "off",
"used_today": 123,
"versions": [
{
"asset_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"mood": "<string>",
"provider": "<string>",
"status": "queued",
"trigger": "auto",
"version": 123,
"brief": "<string>",
"cache_hit": true,
"completed_at": "2023-11-07T05:31:56Z",
"error_class": "<string>",
"loudness_lufs": 123,
"note": "<string>",
"peaks_url": "<string>",
"rights_confirmed_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"track_ms": 123,
"url": "<string>"
}
],
"volume_db": 123,
"current": {
"asset_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"model": "<string>",
"mood": "<string>",
"provider": "<string>",
"status": "queued",
"trigger": "auto",
"version": 123,
"brief": "<string>",
"cache_hit": true,
"completed_at": "2023-11-07T05:31:56Z",
"error_class": "<string>",
"loudness_lufs": 123,
"note": "<string>",
"peaks_url": "<string>",
"rights_confirmed_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"track_ms": 123,
"url": "<string>"
},
"default_provider": "elevenlabs",
"free_day_spent": true,
"generation_id": "<string>"
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Response
OK