Pytxo

Providers & BYOK

Providers & BYOK

Pytxo separates two forms of access that are often confused:

  1. Vendor-owned agent sessions — Codex CLI, Claude Code, Cursor Agent, OpenCode, Gemini CLI, or Aider authenticate with their own vendor flow.
  2. Direct inference credentials — OpenAI, Anthropic, DeepSeek, OpenRouter, local Ollama / LM Studio, and other providers use BYOK routing.

Pytxo never asks for a ChatGPT or Claude password, copies a vendor token store, or returns account identity and token values to the Desktop webview.

Agent subscription sessions

Desktop Agents checks whether supported agent CLIs are installed and whether their non-billable local status probe reports a usable session. When a session is missing, Sign in launches the CLI's fixed official login command from a host-safe directory.

Product accessPytxo integration
ChatGPT plan with Codex accessInstall Codex CLI and use its official session
Claude plan with Claude Code accessInstall Claude Code and use its official session
CursorInstall Cursor Agent and follow Cursor's own authentication flow
OpenCode / Gemini CLI / AiderInstall the CLI and configure its supported provider flow

These sessions remain owned by the vendor CLI. Pytxo does not log users out or silently exchange them for API billing.

Direct providers

Use direct provider APIs, a single OpenRouter key, local Ollama / LM Studio, or custom OpenAI-compatible endpoints without storing secrets in pytxo.toml.

Check configured providers

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

Desktop: Setup → Providers shows the same status and names the environment variable to configure. Set it in the operating-system environment, restart Desktop, and refresh the panel. The UI receives only boolean readiness metadata, 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 keep their own session and environment contracts. Before a child starts, Pytxo rebuilds its environment from an allowlist and injects only the provider route selected for that agent. Unrelated parent-process secrets are excluded from both PTY and subprocess execution.

See also: Models CLI, pytxo.toml.