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

# API Overview

> ModelStack provides an OpenAI-compatible REST API for accessing 40+ AI models from Anthropic, OpenAI, and Google.

## Base URL

All API requests are made to:

```
https://api.modelstack.cc
```

## OpenAI-Compatible Format

ModelStack follows the OpenAI API format, so you can use any existing OpenAI SDK or HTTP client. Just change the base URL and API key.

## Available Endpoints

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v1/chat/completions` | Create a chat completion |
| `GET` | `/v1/models` | List available models |

## Authentication

All requests require an API key passed via the `Authorization` header:

```
Authorization: Bearer your_api_key
```

API keys are created and managed from your [dashboard](https://modelstack.cc/dashboard).

## Request Format

All requests use JSON. Set the `Content-Type` header:

```
Content-Type: application/json
```

## Response Format

Responses follow the OpenAI response format:

```json theme={null}
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1699000000,
  "model": "claude-sonnet-4-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 15,
    "total_tokens": 25
  }
}
```

## Streaming

ModelStack supports Server-Sent Events (SSE) streaming. Set `"stream": true` in your request body to receive incremental responses.

## Rate Limits

Rate limits depend on your subscription plan:

| Plan | Rate Limit |
| - | - |
| Starter | 15 RPM |
| Pro | 40 RPM |
| Max | 60 RPM |

When you exceed your rate limit, requests return a `429 Too Many Requests` error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.