> ## 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.

# Chat Completions API

> AI-powered chat endpoints for crypto insights using Messari's knowledge graph.

The Copilot family of Chat completion endpoints are used for generating contextual crypto responses using Messari's knowledge graph and specialized tools. The family offers three endpoint options for generating contextual crypto responses using Messari's knowledge graph:

* [Chat Completions (Messari v2)](/api-reference/endpoints/ai/post-v2-chat-completions)
* [Chat Completions (OpenAI compatible)](/api-reference/endpoints/ai/post-openai-chat-completions)
* [Chat Completions (Messari Format)](/api-reference/endpoints/ai/post-v1-chat-completions)

The OpenAI-compatible endpoint returns data in the standard OpenAI response format, making it compatible with popular SDKs like the OpenAI Python package. This endpoint supports both streaming and synchronous response modes, allowing you to plug directly into packages expecting OpenAI format.

The Vercel DSP-compatible endpoint implements the [Vercel Data Stream Protocol](https://sdk.vercel.ai/docs/ai-sdk-ui/stream-protocol#data-stream-protocol), enabling direct integration with Vercel's AI SDK library through the useChat function; it only supports streaming responses.

The Messari Format endpoint serves as the standard option but uses Messari's proprietary format. For most implementations, the OpenAI-compatible endpoint is recommended for its broader compatibility and flexibility.

## Chat Completions Quickstart

<Card title="AI Copilot Chat Example" icon="code" href="/examples/ai-copilot-chat">
  Get started quickly with our SDK example for AI Copilot Chat. This guide walks you through instantiating the client, making chat completion requests, and handling responses.
</Card>

## Authorization

Refer to our [Authentication](/api-reference/authentication) docs for creating an API key.

### Pay-Per-Request with x402

No API key? You can also access the MessariAI API using [x402 micropayments](/api-reference/x402-payments) —
pay per request with USDC on Base Mainnet, no account required.

### Copilot Rate Limits

| **User Tier** | **Requests**   |
| ------------- | -------------- |
| Unpaid        | 10 per day     |
| Enterprise    | 600 per minute |

### AI Credits

If more Copilot requests are needed, contact [api@messari.io](mailto:api@messari.io) about enrolling in our consumption based credit system.

If you run out of credits, your requests will fallback to our default rate limits defined in the above table. After exhausting the credits and daily rate limit, the API will respond with a `429` error with the message of `"rate limit exceeded. Resets in <time_till_next_message>"`
