> This page is for version Dev.
> For other versions, use one of these documentation indexes:
> - Prod (default): https://docs.chrt.com/prod/llms.txt
> - Staging: https://docs.chrt.com/staging/llms.txt
> - Dev: https://docs.chrt.com/dev/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chrt.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chrt.com/_mcp/server.

# Chrt SDKs

Use a Chrt SDK with an explicit API environment and supported credentials. Pin a version appropriate to your integration and validate the endpoints you use; package installation does not establish compatibility or permission.

## Choose the package

The SDK families documented here are TypeScript, Swift and Java. The current web application uses `@chrt-inc/typescript-sdk`; confirm published package coordinates and versions with the relevant SDK repository/release before adding them to a new integration. Do not assume identical version numbers establish identical endpoint coverage.

![A four-step path: your integration, the SDK client with an explicit API environment URL and access token, the chosen API version, and the endpoint called.](/_fern-files/chrt.docs.buildwithfern.com/4c3f557822693f904f85ce68f33d673867d8604e65c7787d42cc26330f4855c8/assets/sdks-integration-path.svg)

*The path of an SDK call.*

## TypeScript

```bash
npm install @chrt-inc/typescript-sdk
```

The following illustrates client construction. Supply an access token through your supported authentication flow and configure the intended API URL explicitly. Keep credentials out of browser-visible configuration and logs.

```typescript
import { ChrtClient } from "@chrt-inc/typescript-sdk";

export function makeChrtClient(apiUrl: string, accessToken: string) {
  if (!apiUrl) throw new Error("An explicit API environment is required");
  if (!accessToken) throw new Error("Authentication is required");

  return new ChrtClient({
    environment: apiUrl,
    token: () => accessToken,
  });
}
```

Acquire/refresh credentials through your integration's supported authentication method. The sign-in helper inside Chrt's own web application is not a reusable public credential flow. Do not silently fall back to Development when configuration is absent.

This construction example is not an executed endpoint test. Consult the [API reference](/dev/api-reference) for the selected environment, required authorization, request fields and response schema. A successful authenticated request must still be checked for the intended organization and resource.

## Swift and Java

Use the official SDK package/repository appropriate to your runtime. Select and pin a published version deliberately. Check the release's supported endpoints, environment configuration, authentication and platform requirements before integrating. Existing app dependency versions are evidence of that app's setup, not a promise that every customer integration should use the same version.

## Errors, retries and uploads

Read the selected SDK version's documented error and retry options. Handle authentication failures explicitly. Do not assume every mutation is safe to retry, every upload is replayable or that a client-side success proves the intended saved result. Use idempotency where the endpoint supports it and read back consequential changes.

For support, provide the SDK version, environment, endpoint, request reference and sanitized error. Never include tokens or private payloads. Contact [support](/dev/support) for credential and integration setup questions.

## Contributing

While we value open-source contributions to these SDKs, the libraries are generated programmatically. Additions made directly would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!