Skip to content

Supported endpoints

The public AI surface below is available only when the endpoint family and model are visible to the authenticated key. Use API reference for request examples and the full error contract.

Discovery and account

  • GET /v1/models
  • GET /v1/catalog — public verified capability catalog
  • GET /v1/models/{model}
  • GET /v1/balance
  • GET /v1/realtime — WebSocket upgrade with query model

OpenAI-compatible

  • POST /v1/chat/completions — JSON and SSE streaming
  • POST /v1/completions — string prompt, regular JSON
  • POST /v1/responses — JSON and SSE streaming
  • POST /v1/responses/compact — JSON and SSE streaming
  • POST /v1/embeddings — JSON
  • POST /v1/rerank — JSON
  • POST /v1/moderations — JSON
  • POST /v1/images/generations — JSON, body up to 1 MiB
  • POST /v1/images/edits — multipart, body up to 25 MiB
  • POST /v1/images/variations — multipart, body up to 25 MiB
  • POST /v1/audio/speech — JSON, body up to 1 MiB, binary response possible
  • POST /v1/audio/transcriptions — multipart, body up to 25 MiB
  • POST /v1/audio/translations — multipart, body up to 25 MiB

POST /v1/completions rejects batch and token-id prompts with unsupported_prompt_shape. Streaming is not available for completions, embeddings, rerank or moderations.

Anthropic-compatible

  • POST /v1/messages — JSON and SSE streaming
  • POST /v1/messages/count_tokens — preflight token count, no charge

Gemini-compatible

Discovery:

  • GET /v1beta/models
  • GET /v1beta/openai/models

Actions use POST /v1beta/models/{model}:{action}:

  • generateContent — JSON generation
  • streamGenerateContent — SSE generation ending in [DONE]
  • countTokens — JSON token count without a charge
  • embedContent — one JSON embedding request
  • batchEmbedContents — a JSON array of embedding requests

Gemini aliases are filtered by the same key-specific model catalog as GET /v1/models. The path model and body model must agree when both are sent.

Common behaviour

Authenticate with Authorization: Bearer <key>, x-api-key or api-key. Gemini discovery also accepts x-goog-api-key and the key query parameter. Send x-request-id to correlate a request with support; it is returned in the response header and local error envelope.

Use an explicit output limit where the protocol provides one: max_tokens, max_completion_tokens or max_output_tokens. Nexus does not invent a limit from the request body.

For a successful measured response, usage may be charged once. If usage is missing or contradictory, that request remains uncharged and is not charged later automatically. A compatible fixed-price media response is charged only once after a successful response.

Choosing an endpoint

  • Claude Code: POST /v1/messages;
  • Codex and response clients: POST /v1/responses;
  • generic OpenAI clients: POST /v1/chat/completions;
  • Gemini clients: generateContent or streamGenerateContent;
  • embeddings, reranking and moderation: their dedicated JSON routes;
  • media: the matching images/audio route;
  • Realtime: GET /v1/realtime.