## Basic model info - Model name: suno/suno suno-v5-relay - Model description: Suno v5 music generation via relay gateway. - Endpoint name: extend ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/suno/suno-v5-relay/latest.json) ### Model input schema The model input schema is: ```json { "properties": { "clip_id": { "description": "Clip ID to continue from", "title": "Clip Id", "type": "string", "x-sr-order": 301 }, "continue_at": { "description": "Continue from this timestamp in seconds", "title": "Continue At", "type": "integer", "x-sr-order": 302 }, "instrumental": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Generate instrumental music without lyrics", "title": "Instrumental", "x-sr-order": 500 }, "lyrics": { "description": "Song lyrics", "title": "Lyrics", "type": "string", "x-sr-order": 401 }, "style": { "description": "Music style", "title": "Style", "type": "string", "x-sr-order": 402 }, "task_id": { "description": "Original task ID", "title": "Task Id", "type": "string", "x-sr-order": 300 }, "title": { "description": "Song title", "title": "Title", "type": "string", "x-sr-order": 400 } }, "required": [ "task_id", "clip_id", "continue_at", "title", "lyrics", "style" ], "title": "ExtendInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "properties": { "clips": { "anyOf": [ { "items": { "properties": { "image_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image Url" }, "audio_url": { "title": "Audio Url", "type": "string" }, "clip_id": { "title": "Clip Id", "type": "string" }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration" }, "lyrics": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lyrics" }, "styles": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Styles" }, "task_id": { "title": "Task Id", "type": "string" }, "title": { "title": "Title", "type": "string" } }, "required": [ "task_id", "clip_id", "title", "audio_url" ], "title": "MusicClip", "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Clips" }, "lyrics": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lyrics" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" } }, "title": "SunoOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "clip_id": "", "continue_at": 0, "instrumental": null, "lyrics": "", "style": "", "task_id": "", "title": "" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("suno/suno-v5-relay/extend", { input: { task_id: '', clip_id: '', continue_at: 0, title: '', lyrics: '', style: '', instrumental: null }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "suno/suno-v5-relay/extend", arguments={ "task_id": "", "clip_id": "", "continue_at": 0, "title": "", "lyrics": "", "style": "", "instrumental": None }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "suno/suno-v5-relay/extend", SubscribeOptions.builder() .input(Map.of( "task_id", "", "clip_id", "", "continue_at", 0, "title", "", "lyrics", "", "style", "", "instrumental", null)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "suno/suno-v5-relay/extend", input = mapOf( "task_id" to "", "clip_id" to "", "continue_at" to 0, "title" to "", "lyrics" to "", "style" to "", "instrumental" to null), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/suno/suno-v5-relay/extend \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"task_id":"","clip_id":"","continue_at":0,"title":"","lyrics":"","style":"","instrumental":null}' ``` ## Model readme >