# Connect xAI so you can see what Grok says about you

> To get an xAI API key, sign in at console.x.ai, load your team with prepaid credit, then create a key on the API Keys page. Paste it into Surfacedd's xAI card to track Grok. Every xAI response reports its exact billed cost in ticks, where one US dollar is 10 billion ticks, and Surfacedd records that figure.

Source: https://surfacedd.com/docs/api-keys/xai · Updated 2026-11-19

Your xAI key lets Surfacedd ask Grok your prompts with xAI's web search tool, and store the answer, the pages it cited and every other URL its search touched. Surfacedd uses web search only: xAI's separate X Search tool, which searches posts on X and bills per post, stays off, so Grok's results compare cleanly with the other web-grounded engines. 

## Create the key

1. Sign up or sign in at [console.x.ai](https://console.x.ai).
2. Load your team with prepaid credit in the console's billing section. xAI's quickstart says to "load it with credits to start using the API".
3. Open the [API Keys page](https://console.x.ai/team/default/api-keys) and create a key.
4. Copy it; store it somewhere safe if you'll need it again.

## Set a spend limit

Because the API runs on prepaid credit, the balance you load is your ceiling. Keep it modest while you try Grok out. Surfacedd estimates each run before it starts and can pause schedules at an in-app budget for xAI alone, so you can cap Grok separately from the other engines. 

## Paste and test

Paste the key into the xAI card in onboarding or **Settings › API keys**. The free check lists the models your key can use; after it passes, the key is saved to your system keychain and shown only by its last four characters. The optional **Test search** runs one grounded answer and shows its exact cost, reported by xAI. 

![API keys settings with the xAI card Connected for Grok answers, showing its per-answer estimate and the last four characters of the key](https://surfacedd.com/shots/app/settings-keys-light.png "Sample workspace, fictional brand")
## What it costs here

xAI bills each web search call plus tokens, and every response carries `usage.cost_in_usd_ticks`: the actual billed amount for that request, after discounts, including every tool call in the answer. One US dollar is 10,000,000,000 ticks; Surfacedd divides and records the result. 

| Model | Tier | Input per 1M tokens | Output per 1M tokens | Per 1,000 searches | Est. per answer |
|---|---|---|---|---|---|
| Grok 4.3 (default) | cheap | $1.25 | $2.50 | $5.00 | $0.0201 |
| Grok 4.20 (non-reasoning) | cheap | $1.25 | $2.50 | $5.00 | $0.0201 |
| Grok 4.7 | flagship | $2.00 | $6.00 | $5.00 | $0.0310 |

Estimates assume about 10,300 input and 900 output tokens and 1 search per answer, at xAI's list prices on 2026-11-23 (UTC), price table 2026-11-13.1.

On the default model (Grok 4.3) one answer costs about $0.0201 by our estimate. Grok can run more than one search per answer, so the reported cost afterwards is the number to trust. 

## Before your first Grok report

- **Start small.** Try Grok on ten to twenty prompts for a few weekly runs and compare its shortlist with ChatGPT's and Perplexity's on the by-engine view. If it names the same brands, it adds little; if it differs, it's showing you sources the others don't weigh.
- **Write locations into prompts.** xAI's web search takes no location, so "best accountant in Leeds" works where "best accountant" with a Leeds market doesn't.
- **Watch searches per answer.** Grok can search more than once per answer. The reported cost tells you what that does to your bill after the first run, and the estimate calibrates from it.

## Troubleshooting

| What you see | What it means | What to do |
|---|---|---|
| Invalid | xAI rejected the key (401) | Re-enter it or create a new key |
| Billing needed | No credit on the team (402/403) | Add credit in the xAI console |
| Rate limited | Too many requests at once | Surfacedd retries with backoff; lower xAI's parallel requests if it persists |
| Model unavailable | The chosen Grok model isn't available to you | Pick another model from the list |
| Location not applied | xAI's web search takes no location | Nothing to fix; every Grok answer is labelled this way |

## Notes specific to Grok

- Grok puts numbered `[[1]](url)` links into answers by default. Surfacedd switches them off and removes any that remain, so answers read like the other engines'.
- xAI's citation titles are the citation numbers, not page titles; Surfacedd fetches real titles separately.
- xAI lists every URL its search touched, including ones it judged irrelevant. Surfacedd keeps those as "read but not cited".

## Related docs

- [Track Grok](/track/grok)
- [Bring your own key](/bring-your-own-key)
- [Cost per prompt](/docs/costs/cost-per-prompt)
- [Provider errors](/docs/troubleshooting/provider-errors)

## Sources

- [xAI: Quickstart (console, API keys, credits)](https://docs.x.ai/developers/quickstart), checked 2026-11-19
- [xAI: Cost tracking](https://docs.x.ai/developers/cost-tracking), checked 2026-11-19
- [xAI: Citations](https://docs.x.ai/developers/tools/citations), checked 2026-11-19
- [xAI: Pricing](https://docs.x.ai/developers/pricing), checked 2026-11-19
