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

# API Reference

> Exact endpoint contracts, request builders, auth requirements, and response schemas.

Use the API Reference when you need the exact wire contract for a request: required fields, schema shapes, auth requirements, status codes, and example payloads.

Use the hand-written Docs pages when you want workflow guidance, SDK examples, migration advice, or help choosing the right surface.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Make a first successful request before diving into full schemas.
  </Card>

  <Card title="Authentication" icon="key" href="/get-started/authentication">
    Confirm which key type a given endpoint expects.
  </Card>

  <Card title="Choose an API" icon="compass" href="/get-started/choose-an-api">
    Compare Responses, Chat Completions, Messages, and modality APIs.
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/agents/claude-code">
    Open tool-specific setup guides for Claude Code, Codex CLI, and other supported agent clients.
  </Card>
</CardGroup>

## How this section works

* Endpoint pages in this section are generated from `openapi/naga-api.json`.
* The sidebar grouping is curated in `docs.json`, but request and response details come directly from the OpenAPI contract.
* Playground authentication inputs and example payloads are pulled from the same specification so the reference stays aligned with the live API surface.

## Base URL

All paths in this reference are defined relative to:

```bash theme={null}
https://api.naga.ac
```

That means an endpoint like `POST /v1/responses` resolves to:

```bash theme={null}
https://api.naga.ac/v1/responses
```

For OpenAI-compatible SDKs, set `baseURL` to `https://api.naga.ac/v1`.

For Anthropic-compatible `Messages API` clients, tools usually expect `https://api.naga.ac`.

## Authentication

Inference endpoints accept either of these headers:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

```bash theme={null}
x-api-key: YOUR_API_KEY
```

Account management endpoints under `/v1/account/*` require a provisioning key:

```bash theme={null}
Authorization: Bearer YOUR_PROVISIONING_KEY
```

* Use a standard API key for inference endpoints such as Responses, Chat, Messages, Embeddings, Audio, Images, and Moderations.
* Use a provisioning key only for account balance, activity, and API key management endpoints.
* The playground is prefilled with placeholder values so it is clear which credential shape each endpoint expects.

## Endpoint groups

* Models and Startups: discovery and catalog endpoints.
* Responses, Chat, and Messages: primary text generation surfaces.
* Embeddings, Moderations, Audio, and Images: modality-specific APIs.
* Account: balance, activity, and API key management.

## Before you dive into the reference

* Read [Authentication](/get-started/authentication) if you are unsure which key to use.
* Read [Choose an API](/get-started/choose-an-api) if you are not sure which surface you need.
* Read [Quickstart](/get-started/quickstart) if you want a first successful request before looking at full schemas.

## API compatibility

<Note>
  NagaAI supports OpenAI-compatible and Anthropic-compatible surfaces alongside our primary APIs. Use the guide pages for end-to-end examples and migration advice.
</Note>
