xAI through Squiid

Grok models with an OpenAI-compatible API and live search. xAI is next up on Squiid, being built now.

Next up Instant Instant access. A usage-metered API that works the moment you add it to your dashboard.

What xAI is

xAI's API exposes the Grok models for chat, reasoning, vision and function calling. The request and response shapes are compatible with the OpenAI format, so most client libraries work by changing a base URL and a model name, and xAI adds features of its own such as live search that pulls in current web and X results as part of a completion.

In a vibe-coded product Grok usually earns a place as a second opinion model or as the one you point at anything that needs to be current: news summaries, social monitoring, trend digests. Teams that already wrote their code against the OpenAI client find it the cheapest provider to add, because nothing about the call site has to change except configuration, which is exactly the situation where an extra API key gets committed by accident.

Why connect it through Squiid

Squiid removes that risk by holding the xAI key itself. Calls go to https://api.squiid.io/v1/xai/... with Authorization: Bearer $SQUIID_API_KEY, and because the gateway keeps the OpenAI-compatible shape, an existing OpenAI SDK client only needs its base URL pointed at the gateway (gateway convention). Spend is metered per model against prepaid credits at xAI's published rates, live search requests are metered on the same balance, and the total appears on one monthly Squiid invoice with your other services. Model names, streaming and tool definitions pass through unchanged, so an existing router that already switches between providers gains Grok without new code. The dashboard separates token spend from search spend so you can see which half of a Grok bill is growing.

  • One account, one key, one bill, one dashboard. xAI sits beside every other service your project uses, on the same invoice and the same credit balance.
  • Key custody. Squiid holds the xAI credentials. Your code carries SQUIID_API_KEY, so XAI_API_KEY, XAI_BASE_URL never land in a repository, a preview deployment or an agent’s context.
  • Metering you can see. Every call is counted per service and per day, so you know what xAI costs before the month ends.
  • Pause on zero. When prepaid credits run out the gateway stops authorizing usage instead of running up a bill you did not fund.
  • One rotation. Rotating the Squiid key cuts off every agent, worker and deployment at once, with no provider key to hunt down.

What you get

  • Grok chat, reasoning and vision models
  • OpenAI-compatible request format through the gateway
  • Live search requests metered on the same balance
  • One key shared with your other model providers
  • xAI list pricing, no markup

How to connect xAI

One variable replaces the provider credentials this service would normally need. Requests go to the gateway and the official SDKs work by pointing their base URL at it (gateway convention).

# .env
# replaces XAI_API_KEY, XAI_BASE_URL
SQUIID_API_KEY=sq_live_xxxxxxxxxxxxxxxxxxxxxxxx

# every request: https://api.squiid.io/v1/xai/...
# header:       Authorization: Bearer $SQUIID_API_KEY
01

Add it in your dashboard

Open the Squiid catalog, add xAI and fund credits. Access is instant and metered per request.

02

Put the one key in your env

Add SQUIID_API_KEY to .env and delete XAI_API_KEY, XAI_BASE_URL. Nothing else from xAI needs to exist in your project.

03

Point your agent at it

Claude Code, Cursor and Codex read the same variable and call https://api.squiid.io/v1/xai/. Coding agents normally reuse the OpenAI client already in the project, swapping the base URL and model string to reach Grok.

Pricing through Squiid

xAI charges per input and output token by model, with separate charges for live search requests, at the provider's listed price. Squiid passes that through at par: one dollar of prepaid credit is one dollar of xAI usage, with no markup and no per-request margin.

xAI has no subscription attached on Squiid today. If a plan is required for a feature you need, it passes through at the provider’s listed price with no Squiid fee.

Squiid adds no markup to provider prices. There is a free plan at $0 a month with a 15% fee when you top up credits, Solo at $19.97 a month with a top-up fee that starts at 8% and falls to 3.5% as your spend grows, Team from $29.97 a seat a month with the same ladder one point lower, and Custom with a rate of 3% or less. Credits are prepaid, so xAI usage stops when the balance reaches zero rather than producing an invoice you did not fund. Auto top-up with a cap keeps production running without handing anyone an open-ended card.

If you leave

Nothing to move: xAI is usage-metered, so leaving means creating your own xAI key and pointing the client at it. Squiid never owns your code, your schema or your domain, and the gateway speaks xAI's own API, so the client change is a base URL. The handover page lists what happens for every provider in the catalogue.

Works with every coding agent

xAI through Squiid is just an HTTP call with a bearer token, so every agentic coding tool can use it with the single key already in your environment:

Vibe coding a feature on xAI usually means asking for it in plain language and letting the agent write the integration. Because the key is Squiid’s rather than the provider’s, it can do that without ever holding a credential that could be leaked, logged or committed.

Related services

Questions people ask

Can I use the OpenAI SDK to call Grok through Squiid?

Yes. xAI's API keeps the OpenAI request shape, so pointing the OpenAI client's base URL at the Squiid gateway path for xAI and setting a Grok model name is enough.

Is Grok on Squiid the same as a Grok subscription on X?

No. Squiid connects the xAI developer API that your application calls and bills per token. A consumer Grok subscription is a separate product.

Does live search cost extra?

xAI charges separately for live search requests at its listed price. That charge is metered against your Squiid credits with no markup.

Can Grok and Claude Code work together?

Yes. Claude Code writes the integration and your app calls Grok at runtime through the same SQUIID_API_KEY, so no xAI key is needed in the repository.

What does rolling out mean for xAI?

Provisioning is being finished and accounts are being connected in batches. You can sign up now and will be notified when xAI flips to live.

Connect xAI with one key.

xAI serves the Grok model family over an API that is deliberately compatible with the OpenAI request format, including a live search mode. Through Squiid it is metered per token at xAI's list price.