# Crowdin API

```ts
import { createCrowdinClient } from "@crowdin/serverless-apps-sdk/api";

const client = createCrowdinClient();
const strings = await client.sourceStringsApi.listProjectStrings(projectId);
```

`createCrowdinClient()` returns a [`@crowdin/crowdin-api-client`](https://www.npmjs.com/package/@crowdin/crowdin-api-client) instance whose requests are executed by the Crowdin host under the current user's session - no tokens ever reach the app. See the [Crowdin REST API reference](https://support.crowdin.com/developer/api/) for the available endpoints.

## Scopes

Access is limited to the [scopes](https://support.crowdin.com/developer/understanding-scopes/) declared in the [manifest](/serverless-apps/reference/manifest/). An empty `scopes` array means no API access.

## Uploading files

Raw request bodies work like with any other transport, so the Storage API accepts files directly:

```ts
const file = new Blob([docxBytes]);
const storage = await client.uploadStorageApi.addStorage("guide.docx", file);
await client.sourceFilesApi.createFile(projectId, {
  name: "guide.docx",
  storageId: storage.data.id,
});
```

`addStorage` accepts a `Blob`/`File`, an `ArrayBuffer`, a typed array, or a string. `FormData` is the one body type that is not supported - no Crowdin API v2 endpoint requires multipart; pass the raw file instead.

## Streaming endpoints

Endpoints that respond with a stream (such as AI chat completions with `stream: true`) resolve once the stream completes, with the full response as a string. This matches how the client behaves with its native transports - the `HttpClient` contract has no channel for incremental delivery, so there is no progressive streaming with tokens arriving one by one.

## Limitations

- GraphQL is not available - the host bridge proxies the REST API (`/api/v2`) only.
- `FormData` bodies are rejected; pass raw files instead.
- Response headers are not exposed - the client resolves with the parsed body only, like its native transports.
- Errors surface as the client's own `CrowdinError`/`CrowdinValidationError`, same as with a token.