---
title: API reference
eyebrow: API Reference
description: Five ways to call Nolgia — REST, TypeScript, Python, the Rust CLI and the MCP server — and which one to reach for.
---

# API reference

Everything Nolgia does is one HTTP API. The clients, the CLI and the MCP server are all wrappers over the same endpoints, so anything you can do in one you can do in all of them.

## Which one should I use

| If you are | Use | Start here |
| --- | --- | --- |
| Writing a script or a backend in TypeScript | `@nolgia/sdk` | [Client libraries](./client-libraries.html) |
| Writing Python | `nolgia` | [Client libraries](./client-libraries.html) |
| Working in a terminal, or in CI | The CLI | [The CLI](./cli.html) |
| Using a coding agent (Claude Code, Cursor, Codex) | The MCP server | [Run MCP](./mcp.html) |
| In another language, or want no dependency at all | REST directly | [Browse the endpoints](../api/) |

If you are not sure, start with REST. Every example on this site shows a `curl` call beside the language tabs, so you can always see exactly what goes over the wire.

## REST

<!-- gen:spec-servers -->
| Environment | Base URL |
| --- | --- |
| Production | `https://api.nolgia.ai/v1` |
| Staging | `https://api.stg.nolgia.ai/v1` |
| Local development | `http://localhost:8080/v1` |
<!-- /gen -->

The full reference is generated from the same OpenAPI document the server validates against, so it can never describe an endpoint we do not serve: [browse the endpoints](../api/) or download [`openapi.yaml`](../api/openapi.yaml) and generate your own client.

Authentication is a bearer token on every request. See [Authentication](./authentication.html) for how to create one, and [Errors](./errors.html) for the shape of a failure.

## Client libraries

<!-- gen:sdk-versions -->
| Client | Package | Version |
| --- | --- | --- |
| TypeScript | `@nolgia/sdk` | 0.1.4 |
| Python | `nolgia` on PyPI | 0.1.4 |
| Rust | `nolgia-client` | published with the CLI release; see crates.io |
<!-- /gen -->

Both published clients are generated from the OpenAPI document, so their types move when the spec moves. [Client libraries](./client-libraries.html) has installation and a first call in each.

## CLI

<!-- gen:cli-release -->
From `nolgia --help` in release 0.2.30, published 2026-09-21:
<!-- /gen -->

The CLI signs in once and then generates from a terminal or a CI job. [The CLI](./cli.html) covers install, `nolgia auth login` and the generate commands.

## MCP server

The MCP server exposes the same API as tools a coding agent can call directly, grouped by what they do. [Run MCP](./mcp.html) lists every tool and has the install snippets for Claude Code, Cursor and Codex.

## Models

Every model, with what it costs and what it can do, is generated from the live catalog:

<!-- gen:catalog-summary -->
| Image | Video | Audio | 3D |
| --- | --- | --- | --- |
| 48 | 74 | 17 | 2 |
<!-- /gen -->

Browse them by what you want to make — [image generation](./models-image-generation.html), [image editing](./models-image-editing.html), [text to video](./models-text-to-video.html), [image to video](./models-image-to-video.html), [audio and speech](./models-audio-and-speech.html), [restore and upscale](./models-restore-and-upscale.html), [utilities](./models-utilities.html) or [3D](./models-3d.html).

## Reading this reference from an agent

Every page here is also served as Markdown at the same path with a `.md` extension, and the whole site is concatenated at [`llms-full.txt`](../llms-full.txt). [Agent-readable surfaces](./agent-surfaces.html) lists all of them.
