Skip to content

API reference

The Mango Inference API is OpenAI-compatible and also exposes an Anthropic Messages API-compatible endpoint. This section is the authoritative source for endpoints, parameters, and values; guides link here rather than repeating option lists.

Base URL

https://api.mangoboost.io/v1

Anthropic-ecosystem tools usually want the host without the /v1 suffix, because their clients append the path themselves. See Claude Code for an example.

Authentication

All requests require an API key. The same generated static key is used everywhere; how you send it depends on which endpoint you call:

Endpoint family Header
OpenAI-compatible (/v1/models, /v1/chat/completions) Authorization: Bearer <your-api-key>
Anthropic-compatible (/v1/messages) x-api-key: <your-api-key>

A missing, malformed, or unknown key returns HTTP 401. See Reliability and error handling for the error body shapes.

Endpoints

Endpoint Description
GET /v1/models List the models your key can call.
POST /v1/chat/completions Generate a chat completion (OpenAI-compatible).
POST /v1/messages Generate a message (Anthropic Messages API-compatible).
POST /v1/messages/count_tokens Count tokens for a Messages request (Anthropic-compatible).

These are the whole public surface today. Any other /v1/... path (/v1/embeddings, /v1/completions, /v1/responses, /v1/files, and the rest of the OpenAI and Anthropic surface) returns 404. The one Anthropic-side exception is POST /v1/messages/count_tokens, which is served alongside /v1/messages. See OpenAI compatibility for what that means in practice.

Response headers

Every API response carries two identifiers. Quote them when reporting a problem through Platform support. They are how the team finds your request.

Header Meaning
x-request-id Identifier for the individual request.
x-trace-id Identifier for the request's trace through the platform.

See also