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

# Gateway Overview

> Multi-provider routing architecture, authentication, and unified Neosantara endpoints.

Neosantara is Indonesia's AI Gateway, routing requests to multiple upstream providers (OpenAI, Anthropic, Bedrock, Gemini, Mistral, Ollama) through a single unified interface with optimized low-latency performance.

```python Python (OpenAI SDK) icon="python" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.neosantara.xyz/v1",
    api_key=os.environ["NEOSANTARA_API_KEY"]
)

response = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Explain Indonesia's AI Gateway."}]
)
print(response.choices[0].message.content)
```

```python Python (Anthropic SDK) icon="python" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
from anthropic import Anthropic
import os

client = Anthropic(
    base_url="https://api.neosantara.xyz/anthropic",
    api_key=os.environ["NEOSANTARA_API_KEY"]
)

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain Indonesia's AI Gateway."}]
)
print(response.content[0].text)
```

```bash cURL icon="terminal" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
curl -X POST https://api.neosantara.xyz/v1/chat/completions \
  -H "Authorization: Bearer $NEOSANTARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.8-flash",
    "messages": [{"role": "user", "content": "Hello Neosantara"}]
  }'
```

## Main Endpoints

| Endpoint Path | Protocol | Description |
| :- | :- | :- |
| `/v1/chat/completions` | OpenAI | Universal chat, SSE streaming, tool calling, JSON schema. |
| `/anthropic/v1/messages` | Anthropic | Full Anthropic Messages API parity. |
| `/v1/responses` | OpenResponses | Persistent asynchronous jobs, status polling, retrieval. |
| `/v1/models` | OpenAI | Active models list, token limits, IDR token pricing. |
| `/v1/audio/*` | OpenAI | Whisper speech-to-text and text-to-speech. |
| `/v1/images/*` | OpenAI | Image synthesis with generative models. |
| `/v1/embeddings` | OpenAI | Text vector embeddings for semantic search and RAG. |
| `/v1/ocr` | Specialized | Structured text and table extraction from documents. |

## Request Headers

| Header | Required | Description |
| :- | :- | :- |
| `Authorization` | Yes (OpenAI) | Format: `Bearer nsk_...` with your Neosantara API key. |
| `x-api-key` | Yes (Anthropic) | Format: `nsk_...` on `/anthropic/*` endpoints. |
| `anthropic-version` | Yes (Anthropic) | Use version `2023-06-01`. |
| `X-Guard` | Optional | Set to `on` to enable automated UU PDP PII redaction. |
| `x-request-id` | Optional | Unique request tracking ID for audit and logging. |

## Next Steps

| Task | Guide |
| :- | :- |
| Chat and streaming | [Chat Completions](https://docs.neosantara.xyz/en/gateway/chat-completions.md) |
| Anthropic integration | [Anthropic Messages](https://docs.neosantara.xyz/en/gateway/anthropic-messages.md) |
| Asynchronous jobs | [OpenResponses API](https://docs.neosantara.xyz/en/gateway/responses-api.md) |
| Model list and pricing | [Model Catalog](https://docs.neosantara.xyz/en/gateway/models.md) |


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