Supported Endpoints¶
Summary¶
Nexus supports eight public endpoints:
GET /v1/modelsGET /v1/balancePOST /v1/chat/completionsPOST /v1/completionsPOST /v1/messagesPOST /v1/messages/count_tokensPOST /v1/responsesPOST /v1/responses/compact
GET /v1/models¶
Returns the models available to your key.
Use this endpoint before configuring a client or when switching models.
GET /v1/balance¶
Returns the current balance for the API key used in the request.
POST /v1/messages¶
Primary endpoint for Claude Code and Claude-compatible clients.
Supports streaming.
Claude models are available through this endpoint
when they appear for your key in GET /v1/models.
POST /v1/messages/count_tokens¶
Endpoint for pre-counting tokens in Claude-compatible clients.
POST /v1/chat/completions¶
Endpoint for OpenAI-compatible clients that use the chat.completions format.
Use the regular JSON response mode for this endpoint.
Claude models with openai support can also use
this endpoint.
POST /v1/completions¶
Endpoint for OpenAI-compatible clients that use the completions format.
Use the regular JSON response mode for this endpoint.
POST /v1/responses¶
Primary endpoint for Codex and response-compatible clients.
Supports streaming.
POST /v1/responses/compact¶
Endpoint for compact response workflows.
Supports streaming.
Output Token Limit¶
It is better to pass the response limit explicitly:
max_tokensformessages;max_completion_tokensormax_tokensforchat.completions;max_tokensforcompletions;max_output_tokensforresponsesandresponses/compact.
If the limit is not provided, Nexus applies a safe default automatically.