> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platform.toloka.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

> Call the HTTP API, define pipelines as code, and check your project locally.

`@toloka-platform/sdk` provides a typed client for the platform's HTTP API, Data Labeling pipeline authoring functions, and local checks and tests. The client covers projects, datasets, pipelines, Training, Models, and Batch Inference.

## Install

Use **Bun 1.4.0 or newer** as the runtime and package manager. The package ships TypeScript source.

```sh theme={null}
bun add @toloka-platform/sdk@latest
```

In an existing project, `bun install` installs the locked dependencies. Use `bun add @toloka-platform/sdk@latest` to update the SDK dependency.

> [!NOTE]
>
> The SDK is `0.x`. Its public API can change between minor releases before `1.0`. Review and test your source when updating.

## Entry points

| Import | Use it for |
| - | - |
| `@toloka-platform/sdk` | [`createClient`](https://docs.platform.toloka.ai/docs/sdk/reference/create-client), pipeline authoring functions, public types, and API errors |
| `@toloka-platform/sdk/testing` | Python Code node execution and typed Vitest tests for nodes, labeling interfaces, and pipeline flows |
| `@toloka-platform/sdk/checks` | Labeling-interface typecheckers and postprocess key-collision checks |

Install the [CLI](https://docs.platform.toloka.ai/docs/cli.md#install) separately to import, check, plan, and apply pipeline source. Updating the CLI and updating your project's SDK dependency are separate steps.

## Start building

> [card] [Quickstart](https://docs.platform.toloka.ai/docs/sdk/quickstart.md)
>
> Authenticate, list projects, add dataset rows, and export them.

> [card] [Client and credentials](https://docs.platform.toloka.ai/docs/sdk/client.md)
>
> Configure authentication, project-scoped tokens, and requests.

> [card] [Pagination](https://docs.platform.toloka.ai/docs/sdk/pagination.md)
>
> Read a page or iterate through every result.

> [card] [Long-running jobs](https://docs.platform.toloka.ai/docs/sdk/long-running-jobs.md)
>
> Wait for uploads, exports, checks, runs, and dataset operations.

> [card] [Errors](https://docs.platform.toloka.ai/docs/sdk/errors.md)
>
> Handle HTTP failures, polling timeouts, and invalid graphs.

> [card] [Pipelines as code](https://docs.platform.toloka.ai/docs/sdk/pipelines.md)
>
> Define fields, nodes, and connections in TypeScript.

> [card] [Local testing](https://docs.platform.toloka.ai/docs/sdk/testing.md)
>
> Exercise Code nodes and labeling interfaces before applying changes.

## Reference

The Reference tab holds the SDK's method and function documentation alongside the [HTTP API reference](https://docs.platform.toloka.ai/docs/api-reference.md).

> [card] [Client reference](https://docs.platform.toloka.ai/docs/sdk/reference/client-methods.md)
>
> Look up client methods, parameters, return values, and examples.

> [card] [Pipeline authoring](https://docs.platform.toloka.ai/docs/sdk/reference/define-pipeline.md)
>
> Look up functions for fields, nodes, connections, and graph validation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.