# SDK

> The TypeScript client for the Tune.Toys API.

Source: https://docs.tune.toys/developers/sdk/ (updated 2026-11-01)

`@tunetoys/sdk` is the typed client used by the app, the MCP server and the Player. With a key:

```ts
import { PlatformClient } from '@tunetoys/sdk';

const client = new PlatformClient('https://tune.toys/v1', fetch, {
  apiKey: process.env.TUNETOYS_API_KEY,
});
```

It sends the bearer, omits credentials, skips CSRF and refuses to run in a browser page unless you pass `allowBrowserKey`. It exports `verifyWebhook` for webhook receivers.

The package is private to the repository today and is not published to npm. Until it is, generate a client from [`openapi.json`](https://docs.tune.toys/developers/openapi.json) or call the HTTP API directly.
