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/modelsGET /v1/catalog— public verified capability catalogGET /v1/models/{model}GET /v1/balanceGET /v1/realtime— WebSocket upgrade with querymodel
OpenAI-compatible¶
POST /v1/chat/completions— JSON and SSE streamingPOST /v1/completions— string prompt, regular JSONPOST /v1/responses— JSON and SSE streamingPOST /v1/responses/compact— JSON and SSE streamingPOST /v1/embeddings— JSONPOST /v1/rerank— JSONPOST /v1/moderations— JSONPOST /v1/images/generations— JSON, body up to 1 MiBPOST /v1/images/edits— multipart, body up to 25 MiBPOST /v1/images/variations— multipart, body up to 25 MiBPOST /v1/audio/speech— JSON, body up to 1 MiB, binary response possiblePOST /v1/audio/transcriptions— multipart, body up to 25 MiBPOST /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 streamingPOST /v1/messages/count_tokens— preflight token count, no charge
Gemini-compatible¶
Discovery:
GET /v1beta/modelsGET /v1beta/openai/models
Actions use POST /v1beta/models/{model}:{action}:
generateContent— JSON generationstreamGenerateContent— SSE generation ending in[DONE]countTokens— JSON token count without a chargeembedContent— one JSON embedding requestbatchEmbedContents— 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:
generateContentorstreamGenerateContent; - embeddings, reranking and moderation: their dedicated JSON routes;
- media: the matching images/audio route;
- Realtime:
GET /v1/realtime.