Skip to content

[Generate/concat] Missleading function : i'm unable to process a concatenation #36

Description

@sKunZel

Sadly, i can't concatenate at the moment.

Concatenating songs with V1 ID: 186fa21c-f5c7-4af5-8fd4-5112f4486e31 and V2 ID: 5ed9894f-2208-47ed-8210-a35c8545927b
Failed to concatenate songs: 500 Server Error: Internal Server Error for url: https://api.sunoaiapi.com/api/v1/gateway/generate/concat

Here is a snippet:

def concatenate_songs(v1_id, v2_id):
url = 'https://api.sunoaiapi.com/api/v1/gateway/generate/concat'
headers = {'Content-Type': 'application/json', 'api-key': API_KEY}
payload = {"clip_id": v2_id}
try:
print(f"Concatenating songs with V1 ID: {v1_id} and V2 ID: {v2_id}")
response = requests.post(url, json=payload, headers=headers)
response.raise_for_status()
data = response.json()
print(f"Response from concatenation API: {data}")
if 'data' in data and 'song_id' in data['data']:
concat_id = data['data']['song_id']
print(f"Successfully concatenated V1 and V2: {v1_id} + {v2_id} = {concat_id}")
return concat_id
else:
print(f"Unexpected response structure: {data}")
return None
except requests.exceptions.RequestException as e:
print(f"Failed to concatenate songs: {e}")
return None

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions