Which API should you use with Grok Build?

For Grok Build with more than Grok models, the best API is a cost-optimized custom model: add [model.standardcompute] to ~/.grok/config.toml with base_url https://api.stdcmpt.com/v1, api_backend = "chat_completions" and env_key = "STANDARDCOMPUTE_API_KEY", and Standard Compute's router sends each step to the cheapest model that can do it (Claude Fable 5.1 or GPT-6 Astra only when it counts), on a plan from $19 a month with a $19 compute budget. Signing in with an xAI account runs Grok's own models; The X Subscription's paid tiers ($8 to $200 a month) include a weekly pool for first-party Grok usage, and an XAI_API_KEY bills per token. Grok Build itself is open source (Apache 2.0).

Guide updated 2026-10-15. Check each provider's current terms below.
Get your API key$0.25 trial for eligible new accounts, no card. Plans from $19/mo.

Grok Build not responding? Is Grok down? Live xAI API and Grok Build status

Light or occasional use
If Grok models are all you want and your work fits the weekly pool, an X Subscription plan you already pay for is the simplest bill. For occasional headless runs, an xAI API key billed per token will likely cost less.
Daily use, cost-optimized
When Grok Build runs long sessions with parallel subagents and you want Claude, GPT or open models next to Grok, a Standard Compute custom model sends each step to the cheapest model that can do it, and for every model we vet providers for price, uptime and speed, with automatic fallback. Opt-in Europe or US Compliance rules apply per key, team or company, and we don't train on your prompts or store them. The bill stays at the monthly plan price: requests stop with HTTP 402 when the compute budget is used, with nothing billed on top.

API and subscription options for Grok Build

OptionPriceWhat you get
The X Subscription (xAI)$0 / $8 / $30 / $100 / $200 per moGrok, Cursor and X in one plan. Paid tiers include a weekly pool for eligible first-party usage across Grok and Cursor surfaces (Premium 4x, Super 15x and Ultra 50x of Plus); usage beyond it is paid from prepaid credits. xAI does not list a separate Grok Build quota. Source: docs.x.ai
Standard Compute (us)From $19/moSmart routing sends each request to the cheapest model that can do it, or pin any model by its exact ID. Standard Compute starts at $19/month with a $19 monthly compute budget. Requests stop when that budget is exhausted until renewal or a plan change; there are no automatic overage charges. Requests are not slowed as the budget is used. It is a fixed bill with a finite allowance.
xAI APIPay-as-you-goGrok models billed per token with an XAI_API_KEY, which Grok Build uses when there is no browser login, as in CI and headless runs. Grok models only. Source: docs.x.ai
OpenRouterPay-as-you-goChoose models and providers through one API. Usage-based pricing can suit light or bursty work; estimate long agent sessions and review current fees and limits. Source: openrouter.ai

Prices and allowances can change. Grok Build's custom model fields, credential order and environment variables come from xAI's Grok Build overview, settings reference and enterprise docs; The X Subscription prices from xAI's pricing doc, all read on October 15, 2026. Grok Build: getting started · Grok Build: settings reference · The X Subscription pricing · Grok Build repo. Spot an error? Tell us.

Add Standard Compute as a Grok Build custom model

~/.grok/config.toml
[model.standardcompute]
model = "standardcompute"
base_url = "https://api.stdcmpt.com/v1"
name = "Standard Compute (routed)"
env_key = "STANDARDCOMPUTE_API_KEY"
api_backend = "chat_completions"
context_window = 200000

[model.sc-sonnet]
model = "anthropic/claude-sonnet-5.5"
base_url = "https://api.stdcmpt.com/v1"
name = "Claude Sonnet 5.5 (Standard Compute)"
env_key = "STANDARDCOMPUTE_API_KEY"
api_backend = "chat_completions"

[models]
default = "standardcompute"

Export STANDARDCOMPUTE_API_KEY, run grok inspect to check the config loaded, then start grok. Switch with /model sc-sonnet in the TUI or grok -m sc-sonnet. On Windows the file is %USERPROFILE%\.grok\config.toml.

Grok Build questions

Do I have to log out of my xAI account to use a custom model in Grok Build?
No, not when the model has its own key. Grok Build resolves credentials per model in this order: model.api_key, then model.env_key, then the active session token, then XAI_API_KEY. A [model.standardcompute] entry with env_key = "STANDARDCOMPUTE_API_KEY" therefore uses your Standard Compute key even while you are signed in, and Grok models keep using your xAI login.
Which api_backend should I use for a gateway in Grok Build?
The protocol the gateway serves. Custom models accept chat_completions, responses or messages (OpenAI-compatible or Anthropic Messages). Standard Compute serves Chat Completions and Responses at https://api.stdcmpt.com/v1; chat_completions is the safe default. GROK_MODELS_BASE_URL is a different mechanism: it points Grok Build's whole model list at {base}/models instead of adding one model.
Does Grok Build's web search work on a custom model?
The web_search tool runs on its own model, set with [models] web_search or GROK_WEB_SEARCH_MODEL, separate from your chat model. supports_backend_search marks whether an endpoint supports Grok-hosted server-side search tools; leave it off for a third-party endpoint such as Standard Compute.
Grok Build keeps eating my weekly usage with parallel subagents. What's the best API to plug into Grok Build so I stop hitting the limit?
One without a weekly window, set as the model your subagents use. Add [model.standardcompute] to ~/.grok/config.toml, make it the default under [models], and pin subagents to a model under [subagents.models] (the docs show entries per subagent, such as explore and plan; run grok inspect to confirm what loaded). [subagents] sampling_limit caps concurrent in-flight subagent calls (it defaults to 32). On Standard Compute the only limit is one monthly compute budget (from $19 a month with a $19 compute budget) plus 300 to 2,000 requests a minute per key depending on the plan: parallel subagents spend the budget faster, and at 100% new requests stop with HTTP 402, with nothing billed on top. The model standardcompute sends each step to the cheapest model that can do it.
Is there an LLM API for Grok Build with EU data rules, so no requests go to providers outside Europe?
Yes, with a Europe Compliance rule on the Standard Compute key in your [model.standardcompute] entry, set for that key, a team or the whole company. Requests then run only at approved provider endpoints in Europe, with zero data retention and no training required at the provider, and a request that cannot be served there fails with HTTP 400 instead of going elsewhere. Claude Opus 5.5, Claude Sonnet 5.5 and GPT-5.6 have European endpoints; Grok 4.3 does not, so under the rule it is skipped. Two limits: Grok models you reach through your xAI login or XAI_API_KEY, including a Grok model behind the web_search tool, go to xAI and are not covered by the rule; and the rule sets where inference runs, while our gateway and its upstream router can process traffic outside the EU. We don't train on your prompts or store them.
Can Grok Build use models other than Grok, such as Claude and open models, at a fixed monthly price?
Yes: Grok Build accepts custom models in ~/.grok/config.toml, so one [model.standardcompute] entry with base_url https://api.stdcmpt.com/v1 and api_backend = "chat_completions" gives it Claude, GPT and open-weight models such as DeepSeek and GLM on one key, on a plan from $19 a month with a $19 compute budget where requests stop with HTTP 402 at the budget instead of billing more.

Try one task before choosing a plan

  1. Check the API format and model configuration supported by your installed Grok Build version.
  2. Run a small task on a clean branch and review the result, elapsed time and compute used.
  3. Estimate your actual monthly workload before selecting a larger allowance.
Get your API keyGrok Build setup guide →Compare compute budgets →

Record your own results with the workload CSV and report template. These are blank templates, not published benchmark results.

Disclosure: this guide is maintained by Standard Compute, one of the options above. Choose based on task quality, supported features and total cost for your workload. Light usage may cost less on a usage-based API; sustained workloads need enough allowance on any subscription.

All flat-rate plans compared →The cheapest-tokens math →Plan compute for your team →