Point Claude Code or Codex at the qBraid AI proxy so requests run on your qBraid plan instead of a separate vendor subscription, and switch back whenever you want.

Quick start: qbraid ai connect claude

Usage:

$ qbraid ai [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • connect: Route an agent through the qBraid AI proxy.
  • disconnect: Restore an agent’s previous configuration.
  • status: Show which agents are routed through qBraid.
  • models: List models available on the qBraid proxy.
  • quota: Show remaining qBraid AI quota.
  • token: Print the qBraid credential for agents.

qbraid ai connect

Route an agent through the qBraid AI proxy.

Writes to the agent’s own config — Claude Code’s settings.json, Codex’s config.toml — and records whatever it replaces so qbraid ai disconnect can put it back.

The credential is not written into either config by default. Both agents are pointed at a command that prints a token, so the key stays in your qBraid config and a rotated token is picked up automatically.

Example:

qbraid ai connect claude
qbraid ai connect all --model claude-sonnet-4-6

Usage:

$ qbraid ai connect [OPTIONS] [agent]

Arguments:

  • agent: Agent to configure: claude, codex, or all [default: all]

Options:

  • -m, --model <str>: Model id to pin (see qbraid ai models)
  • --refresh-interval <int>: Seconds between credential refreshes (default: 300)
  • --api-url <str>: Override the qBraid API base URL
  • --plaintext-key: Write the API key into the config instead of using a token command
  • --help: Show this message and exit.

qbraid ai disconnect

Restore an agent’s previous configuration.

Puts back exactly what was there before connecting — including removing settings that weren’t present to begin with.

Example:

qbraid ai disconnect claude

Usage:

$ qbraid ai disconnect [OPTIONS] [agent]

Arguments:

  • agent: Agent to restore: claude, codex, or all [default: all]

Options:

  • --help: Show this message and exit.

qbraid ai status

Show which agents are routed through qBraid.

Pass —check to confirm the credential is actually accepted — useful when a session has started failing and you want to know whether it expired.

Example:

qbraid ai status --check

Usage:

$ qbraid ai status [OPTIONS]

Options:

  • --check: Also verify the credential against the proxy
  • --help: Show this message and exit.

qbraid ai models

List models available on the qBraid proxy.

The proxy matches model ids exactly, so pick one of these when setting --model — an id the proxy doesn’t know is rejected on the first request.

Example:

qbraid ai models

Usage:

$ qbraid ai models [OPTIONS]

Options:

  • --help: Show this message and exit.

qbraid ai quota

Show remaining qBraid AI quota.

Example:

qbraid ai quota

Usage:

$ qbraid ai quota [OPTIONS]

Options:

  • --help: Show this message and exit.

qbraid ai token

Print the qBraid credential for agents.

Hidden because it exists for Claude Code’s apiKeyHelper and Codex’s “ command rather than for people. Prints the credential and nothing else, so the agents can read it from stdout.

Usage:

$ qbraid ai token [OPTIONS]

Options:

  • --help: Show this message and exit.