xAI (Grok)
Add an xAI API key and use Grok models through Memtro, in chat, agent mode and routing ladders.
xAI's Grok models reach Memtro through xAI's API, which speaks the OpenAI chat format. Add the key once and Grok answers everywhere Memtro calls a model: chat, agent mode, routing ladders, memory extraction and jobs.
Add the key
Sign up at console.x.ai. xAI's getting started tutorial says to load the account with credits before using the API, then create a key on the API Keys page.
On Dashboard → Providers pick xAI (Grok), paste the key and choose who it is for: Personal (only you), Shared with your organisation, or one team. Which of these you are offered depends on your permissions. Work done for the organisation or a team, such as its jobs and its connections' syncs, spends only shared and team keys, never a member's personal one; your own personal jobs and personal connections can use your personal key.
Saving does not send a test request. Memtro stores the key encrypted, never shows it again, and asks xAI which models it can reach, so a good key comes back as Added xai key (personal). with the number of models it found after it. If the listing fails, the key is still saved and the form says why, for a key xAI refuses: Saved. Listing models failed: xai 401. Check the key, then use Refresh models. Refresh models beside the key asks again.
Memtro calls xAI at https://api.x.ai/v1. Leave the optional base URL empty: on hosted Memtro an override is refused, even one naming that same address, with Model endpoint host "api.x.ai" is not allowlisted.
Model ids
| Id | What it is |
|---|---|
xai/<model> | One model through your key. grok/<model> and bare ids starting grok- are read the same way. |
auto/xai | Routed by difficulty within xAI. See model routing. |
xAI's model names change often, so this page names none: the model list beside the key shows the Grok text models your key can reach (image, vision and embedding models are left out of it). Memtro's default xAI ladder names three Grok models chosen when it was written. If they are not in your list, choose your own models per level on the Routing page before relying on auto/xai. A named model is used only where an administrator has opened model choice there; otherwise it is answered as memtro (see cost control).
What is different about xAI in Memtro
- No reasoning setting. Memtro passes no thinking or effort setting to xAI: a
reasoning_efforton the request, and agent mode's request for deeper thinking, have no effect here. - No embeddings. An xAI key does not embed memories. Memory uses an OpenAI or Google key your organisation holds, or Memtro's own embedding model.
- More than one key. Your own key is tried first, then your team's, then the organisation's; within each, the order set on the Providers page, or Spread the load. A rate-limited or exhausted key hands over to the next before routing moves down the ladder. See several keys for one provider.
- Usage in tokens. Each request is recorded with the input and output tokens xAI reports. Allowances are set in tokens, and Memtro does not price them: xAI's console is where the bill is.
Your data at xAI
As of November 2026, xAI's security FAQ says it never trains on your API inputs or outputs without your explicit permission, and that requests and responses are stored on its servers, encrypted at rest, for 30 days for auditing and then deleted automatically. Zero data retention is available, in which case they are never written to disk. Bear in mind that a request through Memtro usually carries your organisation's memory with it. See privacy for what erasure in Memtro cannot reach.
What this is not
This is the API, billed by xAI against the credits on the account that owns the key.