Pytxo

Providers & BYOK

Providers & BYOK

Pytxo ships a multi-provider registry for bring-your-own-key (BYOK) runs. Use direct provider APIs, a single OpenRouter key, local Ollama / LM Studio, or custom OpenAI-compatible endpoints — without storing secrets in pytxo.toml or Desktop.

Check configured providers

pytxo providers              # registry + whether each API key env is set (boolean only)
pytxo providers --json       # includes base URLs when known

Desktop: Settings → Providers shows the same status (never key values).

Fast path: OpenRouter

One key unlocks hundreds of models for generic OpenAI-compat CLIs:

export OPENROUTER_API_KEY=sk-or-...
pytxo models search claude --provider openrouter

Environment variables

ProviderAPI key envOpenAI-compat base (generic CLI)
AnthropicANTHROPIC_API_KEY- (native Claude adapters)
OpenAIOPENAI_API_KEYhttps://api.openai.com/v1
GoogleGOOGLE_API_KEY-
DeepSeekDEEPSEEK_API_KEYhttps://api.deepseek.com/v1
GroqGROQ_API_KEYhttps://api.groq.com/openai/v1
MistralMISTRAL_API_KEYhttps://api.mistral.ai/v1
OpenRouterOPENROUTER_API_KEYhttps://openrouter.ai/api/v1
TogetherTOGETHER_API_KEYhttps://api.together.xyz/v1
FireworksFIREWORKS_API_KEYFireworks inference API
CohereCOHERE_API_KEYhttps://api.cohere.com/compatibility/v1
xAIXAI_API_KEYhttps://api.x.ai/v1
CerebrasCEREBRAS_API_KEYhttps://api.cerebras.ai/v1
SambaNovaSAMBANOVA_API_KEYhttps://api.sambanova.ai/v1
HyperbolicHYPERBOLIC_API_KEYhttps://api.hyperbolic.xyz/v1
PerplexityPERPLEXITY_API_KEYhttps://api.perplexity.ai
NVIDIA NIMNVIDIA_API_KEYhttps://integrate.api.nvidia.com/v1
Ollama(none)http://127.0.0.1:11434/v1
LM Studio(none)http://127.0.0.1:1234/v1
AzureAZURE_OPENAI_API_KEYfrom AZURE_OPENAI_ENDPOINT

For Azure, set both the key and AZURE_OPENAI_ENDPOINT (resource root or full .../openai/v1 URL).

Ultra managed mode strips registered BYOK keys from child environments.

Custom providers (~/.pytxo/providers.json)

Add OpenAI-compatible endpoints without waiting for a Pytxo release:

{
  "providers": [
    {
      "id": "my-proxy",
      "display_name": "My proxy",
      "api_key_env": "MY_PROXY_API_KEY",
      "openai_base_url": "https://llm.example.com/v1",
      "models_url": "https://llm.example.com/v1/models",
      "openai_compatible": true
    }
  ]
}

Then route an agent with provider = "my-proxy" and cli_adapter = "generic".

pytxo.toml agent routing

[[agent]]
name = "builder"
model = "deepseek-chat"
provider = "deepseek"
cli_adapter = "generic"
api_key_env = "DEEPSEEK_API_KEY"   # optional override

OpenRouter gateway:

[[agent]]
name = "router"
model = "anthropic/claude-3.5-sonnet"
provider = "openrouter"
cli_adapter = "generic"

Native agent CLIs (Claude Code, Antigravity, etc.) keep their own env contracts; generic --cmd shells benefit most from OpenAI-compat injection.

See also: Models CLI, pytxo.toml.

On this page