Shows how to start an asynchronous composition task from a natural-language
prompt and receive the task_id to poll for results.
This example assumes using Beatoven; is in scope and apiKey contains your Beatoven API key.
123456789
// Beatoven composition is asynchronous. POST /api/v1/tracks/compose returns a task_id// that you then poll via GET /api/v1/tasks/{task_id} until status is "composed".usingvarclient=newBeatovenClient(apiKey);varresponse=awaitclient.Tracks.ComposeTrackAsync(prompt:newComposeTrackPrompt{Text="30 seconds peaceful lo-fi chill hop track"},format:ComposeTrackFormat.Mp3,looping:false);