Skip to content

Beatoven

Modern .NET SDK for Beatoven generated from the provider's OpenAPI definition with AutoSDK.

Nuget package dotnet License: MIT Discord

Generated from the source spec

Built from Beatoven's OpenAPI definition so the SDK stays close to the upstream API surface.

Auto-updated

Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.

Modern .NET

Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.

Docs from examples

Examples stay in sync between the README, MkDocs site, and integration tests through the AutoSDK docs pipeline.

Usage

1
2
3
using Beatoven;

using var client = new BeatovenClient(apiKey);

Compose Track

Shows how to start an asynchronous composition task from a natural-language prompt and receive the task_id to poll for results.

1
2
3
4
5
6
7
8
9
// 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".

using var client = new BeatovenClient(apiKey);

var response = await client.Tracks.ComposeTrackAsync(
    prompt: new ComposeTrackPrompt { Text = "30 seconds peaceful lo-fi chill hop track" },
    format: ComposeTrackFormat.Mp3,
    looping: false);

Poll Task Status

Shows how to poll the status of a composition task until the track is composed and the download URLs for the full track and individual stems are available.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Compose a short track and poll until it finishes, then read the track + stem URLs
// from the response metadata.

using var client = new BeatovenClient(apiKey);

var composeResponse = await client.Tracks.ComposeTrackAsync(
    prompt: new ComposeTrackPrompt { Text = "15 seconds calm piano melody" });

using var timeoutCts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
TaskStatusResponse? status = null;
while (!timeoutCts.IsCancellationRequested)
{
    status = await client.Tasks.GetTaskStatusAsync(
        taskId: composeResponse.TaskId,
        cancellationToken: timeoutCts.Token);

    if (status.Status is Beatoven.TaskStatus.Composed or Beatoven.TaskStatus.Failed)
    {
        break;
    }

    await Task.Delay(TimeSpan.FromSeconds(5), timeoutCts.Token);
}

Support

Bugs

Open an issue in tryAGI/Beatoven.

Ideas and questions

Use GitHub Discussions for design questions and usage help.

Community

Join the tryAGI Discord for broader discussion across SDKs.

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.