# API reference
Reference for every public API surface in the @ably/ai-transport package. The SDK is organised into four entry points so you only import what you need.
This reference covers every public API surface in the `@ably/ai-transport` package. The SDK is organised into four entry points so you only import what you need.
## Quick example
A minimal client transport setup:
### Javascript
```
import * as Ably from 'ably';
import { createClientTransport } from '@ably/ai-transport/vercel';
const ably = new Ably.Realtime({ authUrl: '/auth' });
const channel = ably.channels.get('conversation-42');
const transport = createClientTransport({ channel });
```
See the individual reference pages for the full API.
## API surfaces
| Surface | Description | Reference |
| --- | --- | --- |
| ClientTransport | Subscribe to turns, build conversation views, cancel and control from the client. | [ClientTransport](https://ably.com/docs/ai-transport/api/javascript/client-transport.md) |
| ServerTransport | Manage turn lifecycle, stream responses, handle cancellation on the server. | [ServerTransport](https://ably.com/docs/ai-transport/api/javascript/server-transport.md) |
| Vercel AI SDK integration | Pre-built codec and factories for the Vercel AI SDK. | [Vercel AI SDK integration](https://ably.com/docs/ai-transport/api/javascript/vercel.md) |
| Codec | Interface for bridging any AI framework to Ably messages. | [Codec](https://ably.com/docs/ai-transport/api/javascript/codec.md) |
| Errors | The `ErrorInfo` type and numeric error codes with recovery guidance. | [Errors](https://ably.com/docs/ai-transport/api/errors.md) |
| React | Providers and hooks for building chat UIs. | [Providers](https://ably.com/docs/ai-transport/api/react/providers.md) and the per-hook pages under `react/`. |
## Entry points
| Entry point | Import path | Contents |
| --- | --- | --- |
| Core | `@ably/ai-transport` | `createClientTransport`, `createServerTransport`, codec interfaces |
| React | `@ably/ai-transport/react` | Generic React hooks (`useClientTransport`, `useView`, and so on) |
| Vercel | `@ably/ai-transport/vercel` | `UIMessageCodec`, Vercel-specific transport factories |
| Vercel React | `@ably/ai-transport/vercel/react` | `useChatTransport`, `useMessageSync` |
## Related Topics
- [Errors](https://ably.com/docs/ai-transport/api/errors.md): ErrorInfo type and numeric error codes for Ably AI Transport. Codes, descriptions, HTTP status, and recovery guidance.
## Documentation Index
To discover additional Ably documentation:
1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages.
2. Identify relevant URLs from that index.
3. Fetch target pages as needed.
Avoid using assumed or outdated documentation paths.