The Moon AI developer API gives your own programs access to the models in the catalog. It follows the OpenAI API format: an OpenAI SDK works as is, once you change the base URL and the key.
At a glanceLink to the At a glance section
| Property | Value |
|---|---|
| Base URL | https:// |
| Authentication | Authorization: or x-api-key: |
| Format | The OpenAI API format (JSON, SSE streaming, {"error": error envelope) |
| Billing | Pay as you go, from the workspace wallet, topped up by card with an invoice |
| Unit | The wallet counts in credits; the portal shows amounts in euros |
| Personal data | Moon Blur masks the data it detects in the text before sending to the model, and puts it back in the response |
| Retention | Moon AI does not keep the content of your requests, only their billing metadata |
The wallet is separate from your subscription. Some plans include API credit every month: see Costs and wallet and the plans.
EndpointsLink to the Endpoints section
| Method | Path | Purpose | Reference |
|---|---|---|---|
POST | / | Response from a chat model, streamed or not | Chat completions |
GET | /v1/models | Model catalog with prices in credits | Models |
POST | / | Image generation | Images |
POST | / | Image editing from one or more images | Images |
POST | /v1/videos | Start a video (background job) | Videos |
GET | / | Check on a video | Videos |
GET | / | Download a finished video | Videos |
GET | /v1/videos | List your videos | Videos |
POST | / | Read a text aloud | Audio |
POST | / | Transcribe an audio file | Audio |
POST | / | Vectors (embeddings) for one or more texts | Embeddings |
POST | /v1/ocr | Text from a PDF or an image, read on our servers in France | OCR |
GET | /v1/credits | Balance of the workspace wallet | Balance and cost |
GET | / | Cost and tokens of a past request | Balance and cost |
Any other URL returns 404 with the code unknown_url: for example, the Anthropic-format Messages API, the Responses API, or retrieving a single model (GET /).
The portalLink to the The portal section
The portal is in “Settings” › “Developer API”, in the “Tools” group (open the portal), and the CtrlK search opens it too. The account menu only shows it during a top-up offer. It is reserved for the workspace owner and admins; a member sees “Reserved for owners and admins”.
| Tab | What you do there |
|---|---|
| “Overview” | Balance, spend and requests this month, auto top-up, recent requests, quickstart with the base URL |
| “Usage” | Spend, requests and tokens per day, most used models, “Request log” (metadata only) |
| “API keys” | Create, configure, replace and revoke keys |
| “Billing” | Top up, set up auto top-up, “Credit history”, “Invoices” |
| “Models” | Catalog you can filter by type, prices in euros, ID to copy |
| “Limits” | Workspace spend caps, rate limit per key, per-key spend caps |
The portal works on the active workspace. If you switch workspaces in another tab, it asks you to reload the page before you do anything else.
Where to startLink to the Where to start section
- Quickstart: a key, an SDK, a first call.
- Authentication: keys, their settings and the headers.
- Chat completions: the full reference for
POST /.v1/ chat/ completions - Costs and wallet, Errors and Limits: holds, error codes, caps and retries, worth knowing before you go to production.
- Privacy: what Moon AI keeps, what Moon Blur masks and what model providers see.
In this section
Getting started
- QuickstartCreate a key, fund the workspace wallet, install the OpenAI SDK and send your first request to the Moon AI API, step by step.
- AuthenticationSend an sk-moon key, create one, restrict it (expiration, spend cap, IP allowlist, Moon Blur), replace or revoke it, and the headers the API uses.
Reference
- ChatReference for POST /v1/chat/completions: parameters, messages, response, SSE streaming and chunk format, tools, images, output length and errors.
- ModelsReference for GET /v1/models: the models your key can call, with their type, their endpoints, their prices in credits and what each one accepts.
- ImagesReference for POST /v1/images/generations and POST /v1/images/edits: create and edit images in the OpenAI format, with sizes, formats, limits and costs.
- VideosReference for POST /v1/videos and the GET /v1/videos routes: start a video, poll the job, download it and list your videos, with timeouts and costs.
- AudioReference for POST /v1/audio/speech, which reads a text aloud, and POST /v1/audio/transcriptions, which transcribes a recording, in the OpenAI format.
- EmbeddingsReference for POST /v1/embeddings: turn texts into vectors in the OpenAI format, for semantic search or clustering, with Moon Blur applied to the text.
- OCRReference for POST /v1/ocr: extract the text of a PDF or an image with moon-ocr-1, which runs on our servers in France and sends nothing to a provider.
- Balance and costReference for GET /v1/credits, which returns the balance of the workspace wallet, and GET /v1/generation, which returns the final cost and tokens of a request.
How it works
- CostsHow you pay for the API: a workspace wallet counted in credits, a hold then the actual cost of each request, top-ups, auto top-up and invoices.
- ErrorsThe API error format, which follows OpenAI’s, the full list of codes with their status and what to do about each, and how to read errors with the SDKs.
- LimitsRate limits per key, concurrent requests, sizes, timeouts and spend caps of the developer API, and how to retry a request without paying for it twice.
- PrivacyWhat Moon AI keeps from an API request, what Moon Blur masks before sending to the model, and what the model providers receive and see.