# API overview

Base URL, authentication and what the OpenAI-compatible API serves.

Source: https://docs.noduma.dev/api/

Noduma's API is an OpenAI-compatible subset, for every account with an API key.

| | |
|---|---|
| **Base URL** | `https://app.noduma.dev/v1` |
| **Authentication** | `Authorization: Bearer ndm_k_...`, a key created under **API keys** in the Noduma app |
| **Format** | JSON in and out, UTF-8; streamed answers as server-sent events |
| **Transport** | HTTPS only |

## Endpoints

| Method and path | Key | What it does |
|---|---|---|
| [`POST /v1/chat/completions`](/api/chat-completions/) | Yes | An answer from a model, whole or [streamed](/api/streaming/), with [tools](/api/tools/) |
| [`GET /v1/models`](/api/models/) | Yes | Noduma's models, each with its state and price |
| [`GET /v1/catalog`](/api/catalog/) | No | The same list without a key |
| [`GET /v1/account`](/api/account/) | Yes | Your balance and default routing |

Any other address under `/v1/` answers `404 unknown_url`; a served address with another method answers `405 method_not_allowed` with an `Allow` header.

## Compatible, and how it differs

- Text only: a message's content is a string or an array of `text` parts. Images and audio are refused.
- No embeddings, completions, images, audio, files, assistants or batch endpoints.
- A model name is a Noduma catalog name, such as `qwen2.5-7b-instruct-q4_k_m`; see [Models](/models/).
- `usage` carries two fields of Noduma's own, `noduma_cost` and `noduma_price_per_1k_tokens`; clients that do not know them ignore them. See [Usage and cost](/api/usage-and-cost/).
- Two request headers of Noduma's own: [`Noduma-Routing` and `Noduma-Redaction`](/api/headers/).
- Unknown top-level fields of a request are ignored, so newer SDKs keep working.

## Keys

An API key starts with `ndm_k_`, is shown once when created, and is stored by Noduma only as a hash. Keep it like a password: whoever holds it spends your credits. **Revoke** in the Noduma app ends it at once. A key also opens the [chat page](https://chat.noduma.dev) and the terminal commands `noduma chat` and `noduma agent`.
