Search documentation

Search the Fumadocs-backed documentation index.

Model providers

Configure how AX Cloud routes model requests: Fiveonefour's AI gateway by default, or bring your own key for select models and agents.

By default, AX Cloud runs send model requests through Fiveonefour's AI gateway. No provider setup is required; each call deducts Usage Credits for the tokens used.

You can optionally integrate your own LLM provider by bringing your own key (BYOK). When you configure BYOK, you choose exactly which provider AX Cloud routes requests to during runs, and that traffic is billed by your provider instead of Usage Credits.

Supported agents

BYOK is available for Claude Code and Codex. Cursor is not supported; Cursor runs always use Fiveonefour's AI gateway.

AgentModels you can attach to a BYOK provider
Claude CodeAnthropic models from the provider picker
CodexOpenAI models from the provider picker
CursorNot supported

Configure BYOK

Each BYOK provider needs:

FieldDescription
Base URLPublic http:// or https:// endpoint requests are sent to. Loopback and private hosts are not allowed.
API keyCredential for that endpoint. Stored write-only; you cannot view it again after save.
Selected modelsModels this provider may serve. At least one is required. Requests for unselected models stay on Fiveonefour's AI gateway.
PriorityOrder among providers that match the requested model. Lower runs first. See Routing priority.

Only users with admin permissions can manage providers. To add or edit your provider settings you can either:

  1. Go to the Integrations → LLM Providers page in the web app.
  2. Use the AX CLI directly, via ax llm-provider:

Pick the tab for your endpoint. Use Custom gateway when traffic goes through a public endpoint your org hosts (OpenAI- and/or Anthropic-compatible), not straight to Anthropic or OpenAI.

Prompt
Drive Anthropic BYOK setup with `ax llm-provider`. You assemble; I only run create (and optional test) in my terminal to paste the API key at the CLI prompt.
Security (hard):- Never ask for, read, print, or expand the provider API key (including env vars).- Never put the key in flags, chat, files, YAML, org secrets, or host .env.- Never run `ax llm-provider create` or `test` yourself; I run them in my terminal and paste the key only at the CLI prompt.
Do in one turn when possible:1. `ax auth status` (or `AX_API_KEY` for CLI auth: Fiveonefour token, not the Anthropic key). Confirm org admin.2. `ax llm-provider list` if useful (avoid duplicates).3. Emit a ready-to-run create command. Defaults unless I already overrode: name `Prod Anthropic`, URL `https://api.anthropic.com`, models `anthropic/claude-sonnet-4-6` + `anthropic/claude-opus-4-8`. Note I can reply with overrides.4. Tell me to run it in my terminal (key only at the CLI prompt). Optional first: `ax llm-provider test --base-url https://api.anthropic.com`.5. When I say it succeeded, `ax llm-provider list` and confirm.
```bashax llm-provider create "Prod Anthropic" \  --base-url https://api.anthropic.com \  --model anthropic/claude-sonnet-4-6 \  --model anthropic/claude-opus-4-8```
Claude Code only for Anthropic BYOK. Cursor cannot use BYOK.

You must have at least one provider enabled in your org at all times. After you add your first BYOK provider, you can disable the Fiveonefour AI gateway if you want to.

Routing priority

When a run is executed, AX Cloud collects every provider that can serve the model that is requested for that run. It then tries to send the request to the provider with the lowest priority number first. If that attempt fails in a way that allows fallback (auth, rate limit, timeout, or server error), the proxy tries the next provider in order.

You can re-order providers, including the Fiveonefour AI gateway (if enabled), anytime with ax llm-provider reorder <PROVIDER_ID>... (first listed becomes priority 0; --gateway-priority <n> ranks the gateway on the same scale).

If you misconfigure a BYOK provider, AX Cloud will try its best effort to complete your experiment run without silently falling back to Fiveonefour's AI gateway. It will:

  1. Skip the misconfigured BYOK provider (private URL, bad path, etc.).
  2. Try a later BYOK provider for that same model, if you have one.
  3. Not fall back to Fiveonefour's AI gateway for that request (so you don’t silently burn Usage Credits).
  4. Return a 502 with something like BYOK provider is misconfigured.

On Codex runs, the provider that answers the first successful request is pinned for the rest of that run. Codex replays encrypted reasoning only that OpenAI account can decrypt, so AX Cloud will not switch providers mid-run.

Troubleshooting

There is no per-request "serving provider" inspector. Confirm routing from configuration (ax llm-provider list), connection tests (ax llm-provider test --base-url <URL>), and billing attribution (Usage or ax credit spend --include-byok).

SymptomWhat to do
Expected BYOK but still billed on 514Confirm the model is selected on the provider, priority puts BYOK ahead of the gateway, and the provider accepted the request.
No route / request fails with no candidatesEnable the gateway or add a matching BYOK model; check keys and endpoint reachability.
Connection / public URL rejectedUse a public HTTP(S) URL; re-test after URL or key changes.
Cursor never hits BYOKExpected. Use managed model access or a host CURSOR_API_KEY.
Codex run keeps using one provider even though another is configuredExpected. OpenAI Responses sessions pin the provider that served the run's first request. Fix that provider or start a new run to re-pin.
Gateway won't disable / last provider won't deleteAdd a BYOK provider before disabling the gateway; re-enable the gateway before deleting the last provider.

Claude Code compatibility

Some Anthropic-compatible gateways reject the experimental beta headers Claude Code sends, which can fail Claude Code runs. On Integrations → LLM Providers, turn on the org toggle that sets:

CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1"

When on, AX Cloud injects that env var into AX Cloud sandboxes where Claude Code runs (ax experiment run) so those beta headers are disabled.