Skip to content

Warp Agent CLI > Context & customization

Models and usage in the Warp Agent CLI

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

Choose models in the Warp Agent CLI, bring your own API key, and track credit usage and per-response cost.

The Warp Agent CLI gives you the same model options as the Warp app: pick the model that powers your conversations, bring your own provider API keys, route requests through custom model routers, and see what every response costs as you work.

Run /model to open the model picker. You can also click the model name in the footer to open the same picker.

Models that your plan or your team’s settings don’t allow appear disabled in the picker.

Your choice is saved as the base model of your active profile, so it persists across sessions. See permissions and profiles for how profiles work in the CLI, and Model choice for the full list of supported models and how Warp’s Auto models pick one for you.

The CLI supports Bring Your Own API Key (BYOK) for OpenAI, Anthropic, and Google models, and can connect an X Premium or SuperGrok subscription for Grok models. When you select a model covered by one of your keys, requests are billed through your provider account and don’t consume your Warp credits.

Run /api-keys to open the key management menu. It lists each provider with its connection state, plus a Warp credit fallback toggle:

  • Set a key - Press Enter on OpenAI, Anthropic, or Google and enter the key. Input is masked, so the key never appears in your transcript or shell history, and it’s saved to your device’s secure storage. Warp does not store provider keys on its servers.
  • Replace or clear a key - On a connected provider, Enter loads the stored key (still masked) for editing, and saving an empty field clears it. Ctrl+X clears the highlighted provider’s key from the list.
  • Connect X Premium or SuperGrok - Press Enter on the subscription row and the CLI opens your browser to sign in to your xAI account; Ctrl+X disconnects it.
  • Warp credit fallback - Press Enter to toggle whether a request that fails through your key is retried with Warp credits; see failover and fallback behavior.

You can also store or clear keys outside a session with the --set-provider-api-key and --clear-provider-api-key flags; see the Warp Agent CLI reference. X Premium/SuperGrok connections can only be managed through /api-keys.

Custom routers appear in the /model picker alongside individual models. Select one and each prompt resolves to a concrete model using the routing logic you defined.

The CLI loads the same router definitions as the Warp app: YAML files in ~/.warp/custom_model_routers/, plus any team-synced routers your admin shares. Authoring a router as a file documents the file format.

The CLI shows usage at two levels: a running total for the conversation, and a per-response breakdown.

  • Conversation total - Once a conversation has reported any usage, the footer shows its accumulated credits (for example, 2.5 credits). Click the entry to switch between credits and the equivalent provider cost in dollars; the choice persists across sessions.
  • Per-response details - Run /cost to toggle a summary row under the latest response showing how long it took and how many credits it spent (for example, 12s • 1.2 credits). The summary appears once the response finishes.

Credits are Warp’s unit of usage for agent requests. For what credits cover and how plans differ, see Credits.