Skip to Content
API ReferenceProviders

Providers

Providers are LLM accounts (API keys or OAuth connections) that agents use to generate responses. Multiple providers can be chained for automatic rate-limit fallback.

Accounts

List accounts

GET /api/providers Authorization: Bearer nxr_...

Create account (API key)

POST /api/providers Authorization: Bearer nxr_... Content-Type: application/json { "provider_type": "openai", "name": "OpenAI – Production", "token": "sk-...", "model": "gpt-4o" }
FieldTypeDescription
provider_typestringProvider key (see /api/providers/catalog)
namestringDisplay name
tokenstringAPI key
modelstring?Default model override
base_urlstring?Custom endpoint (for self-hosted or proxy)

Update account

PATCH /api/providers/{provider_id} Authorization: Bearer nxr_... Content-Type: application/json { "name": "OpenAI – Backup", "token": "sk-new..." }

Delete account

DELETE /api/providers/{provider_id} Authorization: Bearer nxr_...

Soft-delete. Use /purge for permanent deletion.

DELETE /api/providers/{provider_id}/purge Authorization: Bearer nxr_...

Restore account

PATCH /api/providers/{provider_id}/restore Authorization: Bearer nxr_...

OAuth accounts

Some providers (Claude, Gemini, Codex) authenticate via CLI OAuth. Initiate the flow:

POST /api/providers/auth/start Authorization: Bearer nxr_... Content-Type: application/json { "provider": "claude", "account_name": "Claude – Personal" }

Complete with the code from the OAuth callback:

POST /api/providers/auth/{provider}/complete/{account_name} Authorization: Bearer nxr_... Content-Type: application/json { "code": "oauth-code" }

OAuth providers (Claude, Gemini, Codex) run the model inside their respective CLI processes. Full agentic features — sub-agent coordination, provider chaining, and token tracking — require an API key provider.

Provider catalog

List all supported provider types with their required fields:

GET /api/providers/catalog Authorization: Bearer nxr_...

Response:

The catalog includes CLI/OAuth providers (claude, gemini, codex) and ~25 API providers. A truncated sample:

[ { "key": "claude", "name": "Claude (Anthropic)", "auth_type": "oauth", "models": ["claude-opus-4-8", "claude-sonnet-4-6", "claude-haiku-4-5"], "supports_streaming": true }, { "key": "gemini-api", "name": "Google Gemini", "auth_type": "api_key", "models": ["gemini-2.0-flash", "gemini-2.0-flash-lite", "gemini-1.5-pro"], "supports_streaming": true }, { "key": "openai", "name": "OpenAI", "auth_type": "api_key", "models": ["gpt-4o", "gpt-4o-mini", "o1", "o3"], "supports_streaming": true }, { "key": "ollama", "name": "Ollama", "auth_type": "none", "models": [], "supports_streaming": true }, { "key": "opencode-zen", "name": "OpenCode Zen", "auth_type": "api_key", "models": ["claude-sonnet-4-6", "gpt-4o"], "supports_streaming": true } ]

Other built-in API providers include OpenRouter, Groq, DeepSeek, Mistral, Together, Fireworks, Perplexity, Cohere, xAI, Cerebras, Azure, Bedrock, Vertex AI, and more.

Fallback chains

Chains define a priority-ordered list of providers. When the active provider hits its rate limit, Nexora switches to the next automatically.

List chains

GET /api/providers/chains Authorization: Bearer nxr_...

Create chain

POST /api/providers/chains Authorization: Bearer nxr_... Content-Type: application/json { "name": "Production chain", "providers": ["uuid-anthropic", "uuid-openai", "uuid-groq"] }

providers is an ordered array of provider account IDs.

Update chain

PATCH /api/providers/chains/{chain_id} Authorization: Bearer nxr_... Content-Type: application/json { "providers": ["uuid-anthropic", "uuid-openai"] }

Delete chain

DELETE /api/providers/chains/{chain_id} Authorization: Bearer nxr_...

Assign a chain to an agent via provider_chain_id when creating or updating the agent.