Grok Beta
2 min read
Grok, by xAI, connects in two ways: with your subscription or with an API key. Each one is a different connection type, and both are created in Settings > Models > Grok.
| Connection type | What you pay |
|---|---|
| Subscription | Your X plan (Plus, Premium, Super, Ultra) or SuperGrok, with its weekly usage pool. |
| API key | Every token, from your xAI account credit. |
Connect your subscription
Create the connection
In Kujira, click Add connection under Grok, pick the Subscription type, give it a name that says which account it belongs to, and click Connect from the browser.
Authorize Kujira at xAI
Kujira shows you a code. Click Open xAI, sign in with the account that has the plan, and confirm the code. Once you're done, the connection saves itself.
Connect an API key
Create the key
In the xAI console, create an API key. The account needs credit: without it, xAI rejects every request and your agents don't answer. API usage doesn't come out of your plan's pool: it's paid separately.
Save it as a connection
In Kujira, click Add connection under Grok, pick the API key type, give it a name, paste the key, and save. Use the Test button on the connection to check that xAI accepts it.
Turn on an agent
In the agent, open Settings > Model, pick the Grok connection under Connection or leave Inherit from the organization, then select a Grok model. The change applies on its next reply, with no restart.
What to expect
- Grok models have a context window of between 256,000 and one million tokens depending on the model (one million on Grok 4.3 and 4.20), so a conversation takes a long time to compact.
- With the subscription there's no per-token cost: your plan sets the limit, and the pool refreshes every week. If you run out, xAI stops answering until it refreshes.
- With an API key, what Grok reasons before answering is billed as output, and Kujira adds it to the agent's usage. The cost you see in Kujira is an estimate using xAI's published rates; the final figure is the one in your xAI console.
- With an API key, once a request reaches 200,000 input tokens, xAI bills the whole request at double the rate, and Kujira doesn't account for that: in a very long conversation the cost it shows can end up below the real one.