Grok via the Gatelum gateway
Grok API: get a key and call Grok models
Grok API in Gatelum lets you call Grok models built by xAI through the Gatelum gateway. Since the protocol matches the OpenAI API, swapping the base URL and key in the client you already use is enough to reach Grok, and the same Gatelum key covers the whole catalog.
An xAI console account isn't needed: a Gatelum account, a prepaid US-dollar balance and a key are all it takes — top up with a code and pay in rubles. Below are the Grok versions currently enabled in the catalog, their prices, the key setup and a code sample.
The Gatelum gateway is how Grok models reach you. This is not an official Grok page — Gatelum is an independent OpenAI-compatible gateway, with its own key, balance and prices.
Grok models on Gatelum and their prices
The x-ai/ models from the Gatelum catalog are listed here, with prices per million input and output tokens. Calling a model means putting its Model ID into the model field.
| Model and Model ID | Type | Input, per 1M tokens | Output, per 1M tokens |
|---|---|---|---|
Grok 4.7x-ai/grok-4.7 | Conversation | $0.1270 | $0.3800 |
Grok 4.6x-ai/grok-4.6 | Conversation | $0.1600 | $0.4500 |
Grok 4.5x-ai/grok-4.5 | Conversation | $0.2540 | $0.7610 |
Grok 4.3x-ai/grok-4.3 | Conversation | $0.3690 | $0.7350 |
Grok Build 0.1x-ai/grok-build-0.1 | Conversation | $0.1860 | $0.4030 |
Grok Imagine Image 2.0x-ai/grok-imagine-image-2.0 | Picture | $0.0630 per unit | |
Grok Imagine Imagex-ai/grok-imagine-image | Picture | $0.0540 per unit | |
All prices and the balance are in US dollars. There are no ruble prices in the interface.
How to get a Grok API key
Sign up
Create an Gatelum account with your email — it takes about a minute.
Top up with a code
Once you redeem a top-up code from the store in your dashboard, the amount appears on your prepaid balance immediately.
Create a key
Create an glt_… API key in your dashboard. It works with Grok models and the rest of the catalog straight away, and you can put a spending cap on it.
Grok API request example
Because the gateway speaks the OpenAI API, three steps are enough: put https://gatelum.com/v1 in the base URL, attach your Gatelum key and take a Model ID from the table. x-ai/grok-4.7 is used in the example.
curl --silent --show-error --fail-with-body \
--header 'Authorization: Bearer glt_YOUR_KEY' \
'https://gatelum.com/v1/chat/completions' \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Hi! Tell me about yourself in two sentences."
}
]
}
JSONGrok API pricing and payment
Since Grok versions vary in both price and capabilities, compare them in the table and test them on your own prompts before you commit. Each request is billed on its actual input and output tokens, with no monthly fee.
- The balance is prepaid: you add funds before sending requests, with no subscription or monthly fee.
- Top-ups are made in rubles using a code, which you redeem in your dashboard.
- Charges cover actual usage only, at the rates listed in the table; each request is visible in your history.
To see what your workload would cost, try the cost calculator.
Grok API FAQ
How do I get a Grok API key?
Create a Gatelum account, top up with a code and generate a key in the dashboard. One glt_… key covers x-ai/grok-… Model IDs and the whole rest of the catalog, so no xAI key is needed.
Is this the official xAI API?
No. Gatelum is a standalone gateway, not an xAI service. Grok requests pass through Gatelum using our key, balance and prices; xAI is named only as the developer of the models.
Which Grok versions are available?
The answer is every version shown in the table on this page. Since the catalog keeps evolving, that table tracks the current lineup; to switch versions, change the Model ID.
What does the Grok API cost?
Per-million-token rates for input and output sit in the table and the Gatelum catalog. Nothing but actual consumption is billed, and the cost calculator turns that into a quick budget estimate.
How do I pay for Grok from Russia?
It comes out of your prepaid Gatelum balance. Buy a top-up code with rubles and redeem it in the dashboard; the funds are ready for Grok and any other model right away.
What code do I need to call Grok?
Just a regular OpenAI client: Gatelum's address with /v1 as the base URL, your Gatelum key as the key, and a Grok Model ID from the table as model. Ready-made curl and Python samples appear above on this page.
Start using Grok through Gatelum
In a few minutes you can sign up, redeem a top-up code and send your first request to Grok. The same key also unlocks every other model in the catalog.