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

# Quickstart

> Get started with the Messari Typescript SDK in minutes

The [Messari Typescript SDK](https://github.com/messari/sdk-ts) provides a type-safe interface for accessing Messari's crypto data and AI services.

## Key Features

<CardGroup>
  <Card title="Type-safe" icon="shield-check">
    Full TypeScript support with auto-generated types from OpenAPI specs
  </Card>

  <Card title="Modern" icon="rocket">
    Built with modern TypeScript features and best practices
  </Card>

  <Card title="Well-documented" icon="book">
    Comprehensive documentation and examples
  </Card>

  <Card title="Developer-friendly" icon="code">
    Intuitive API design with built-in error handling
  </Card>
</CardGroup>

## Installation

```bash theme={null}
# Using npm
npm install @messari/sdk-ts

# Using pnpm
pnpm add @messari/sdk-ts

# Using yarn
yarn add @messari/sdk-ts
```

## Authorization

You'll need a Messari API key to use the SDK. See our [docs](/api-reference/authentication) for more information.

## API Services

Each endpoint in the API has a corresponding method in the SDK. Here are some examples:

| API Route                     | SDK Method                                   | Description                                        |
| ----------------------------- | -------------------------------------------- | -------------------------------------------------- |
| `/ai/v1/chat/completions`     | `client.ai.v1.chat.generateCompletion()`     | AI chat completion using Messari's standard format |
| `/ai/openai/chat/completions` | `client.ai.openai.chat.generateCompletion()` | AI chat completion in OpenAI-compatible format     |
| `/api/v1/assets`              | `client.signal.v0.assets.list()`             | List all tracked assets                            |
| `/api/v1/assets/{assetId}`    | `client.signal.v0.assets.retrieve()`         | Get details for a specific asset                   |

For the complete list of available endpoints and methods, please refer to the [API documentation](/api-reference/authentication).

## Example Usage

### AI Chat Completion

```typescript theme={null}
import MessariSDK from "@messari/sdk-ts";

// Initialize the client
const client = new MessariSDK({
  apiKey: process.env["MESSARI_SDK_API_KEY"],
});

// Use the AI service
const response = await client.ai.openai.chat.generateCompletion({
  messages: [
    {
      role: "user",
      content: "What companies have both paradigm and a16z on their cap table?",
      MultiContent: [{}],
    },
  ],
  inlineCitations: true,
});
console.log(response.choices[0].message.content);
```

For full examples, see the [Examples section](/examples/overview).
