## Basic model info - Model name: suno/suno suno-v4.5-plus-relay - Model description: Suno v4.5+ music generation via relay gateway. Enhanced version with improved quality. - Endpoint name: clip ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/suno/suno-v4.5-plus-relay/latest.json) ### Model input schema The model input schema is: ```json { "properties": { "clip_id": { "description": "Clip ID to crop", "title": "Clip Id", "type": "string", "x-sr-order": 301 }, "crop_end": { "description": "Crop end time in seconds", "title": "Crop End", "type": "string", "x-sr-order": 303 }, "crop_start": { "description": "Crop start time in seconds", "title": "Crop Start", "type": "string", "x-sr-order": 302 }, "task_id": { "description": "Task ID of the song to crop", "title": "Task Id", "type": "string", "x-sr-order": 300 } }, "required": [ "task_id", "clip_id", "crop_start", "crop_end" ], "title": "ClipInput", "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": "", "crop_end": "", "crop_start": "", "task_id": "" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("suno/suno-v4.5-plus-relay/clip", { input: { task_id: '', clip_id: '', crop_start: '', crop_end: '' }, 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-v4.5-plus-relay/clip", arguments={ "task_id": "", "clip_id": "", "crop_start": "", "crop_end": "" }, 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-v4.5-plus-relay/clip", SubscribeOptions.builder() .input(Map.of( "task_id", "", "clip_id", "", "crop_start", "", "crop_end", "")) .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-v4.5-plus-relay/clip", input = mapOf( "task_id" to "", "clip_id" to "", "crop_start" to "", "crop_end" to ""), 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-v4.5-plus-relay/clip \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"task_id":"","clip_id":"","crop_start":"","crop_end":""}' ``` ## Model readme >