xAI (Grok)

xAI's Grok models are supported for chat completions. xAI uses the OpenAI request format natively, so requests pass through TokenSense with no translation step at all.

Connect xAI to TokenSense

Step 1: Go to your dashboard → Settings → Providers → add your xAI API key.

Step 2: Point your workflow at your TokenSense endpoint and use any grok- model name. TokenSense recognises the prefix and routes automatically.

Step 3: Authenticate with your TokenSense API key. Costs appear in your dashboard within seconds, attributed to the workflow that made the call.

Supported models

All pricing is per 1 million tokens (USD).

ModelInput (per 1M)Output (per 1M)
grok-4.7$2.00$6.00

Grok 4.7 uses $4 input and $12 output per million tokens at 200,000 input tokens or more. Cached input increases from $0.50 to $1.00 at that threshold. When xAI reports a total in cost ticks, TokenSense uses that provider total. Multi-agent Responses models are outside the implemented Chat path. See xAI's model guide.

Older aliases and historical costs

xAI redirects several retired Grok 4, 4.1 Fast, Grok 3, and Code Fast slugs to newer models. Their original rates do not describe new calls through those aliases. Prefer a current native ID and verify the billed model. TokenSense retains historical rows and uses provider-reported cost ticks when available. See xAI's retirement and redirect notice.

Using xAI in your workflows

n8n: Select a grok- model in the TokenSense node.

Make / Zapier: Use an HTTP module pointed at your TokenSense endpoint. See the Make & Zapier guide.

Custom code: Point your OpenAI client's base URL at your TokenSense endpoint and set a grok- model name. See the API reference.

Related