Grok API
Grok (xAI) API Setup
Connect your xAI API key to use Grok models for content generation. Grok 4.6 is the current flagship — same xAI key you already use, no extra setup.
What is Grok?
Grok is developed by xAI. In Cuppa it is used for:
- Long-running agent work — research, audits, multi-step briefs
- Knowledge-heavy articles — pillar posts, technical explainers, long outlines
- Compare Models — run Grok against GPT, Claude, and Gemini on the same keyword
- Image generation — Grok Imagine (same key)
Available Models
| Model | ID | Context | Best For | Notes |
|---|---|---|---|---|
| Grok 4.6 | grok-4.6 | 500k | Flagship. Agents, long briefs, first drafts that hold a thread | Marked NEW in the model picker |
| Grok 4.5 | grok-4.5 | 500k | Previous flagship | Same 6 pricing as 4.6 |
| Grok 4.3 | grok-4.3 | 1M | Large-context instruction following | Cheaper per token |
Grok 4.5 and 4.3 stay in the picker. Switch back in one click if 4.6 is not the winner on your content.
List the live catalog with GET /v1/meta/models or MCP list_models.
Step 1: Create an xAI Account
- Go to x.ai/api
- Click API Platform (top right)
- Sign up or log in
Step 2: Get Your API Key
- In the xAI console, go to API Keys
- Click Create API Key
- Name it “Cuppa”
- Copy the key
Your key looks like: xai-xxxxxxxxxxxxxxxxxxxx
Step 3: Add Key to Cuppa
- Go to Team Settings → API Keys
- Find the Grok section
- Paste your API key
- Click Save
If Grok is already connected, you do not need a new key for 4.6.
Using Grok in Cuppa
Once connected, Grok 4.6 appears in every text model selector (Articles, Agent Chat, Editor, Workbench, Compare Models, Content Planner, Social, Bulk, Programmatic):
- Open any generation flow
- Click the model selector
- Choose Grok 4.6 (marked NEW)
- Generate as usual
Via API / CLI / MCP, pass model: "grok-4.6".
Grok Imagine (images)
The same xAI API key unlocks Grok Imagine for image generation (grok-imagine-image-quality). It appears in every image model picker — Creative Studio, articles, social posts, Creative Lab, and the API.
Grok Imagine is strong at photorealistic output, text/logo rendering, and prompt adherence. List available image models with GET /v1/meta/image_models or MCP list_image_models.
When to Use Grok 4.6
Good for:
- Agent Chat + Workbench — multi-step research, audits, briefs
- Pillar posts and technical explainers — holds a thread across sections
- Compare Models — Grok 4.6 vs GPT-5.6 Sol vs Claude on the same keyword
- Bulk / planner runs — same rate as 4.5, so an upgrade at no extra cost if 4.5 was already your default
Consider other models for:
- Cheapest bulk drafts — GPT-5 Mini or Claude Haiku
- Maximum context — Grok 4.3 (1M) or GPT-5.6 / Claude 5 (1M+)
Cost
Prices are USD per 1M tokens (xAI, verified 2026-08-12):
| Model | Input | Output |
|---|---|---|
| Grok 4.6 | $2 | $6 |
| Grok 4.5 | $2 | $6 |
| Grok 4.3 | $1.25 | $2.50 |
Typical article cost: $0.01–0.10 depending on length and research.
Troubleshooting
”Invalid API key”
- Verify you copied the full key
- Check the key exists in xAI console
- Create a new key if needed
”Model not available”
- Confirm the Grok key is saved in Team Settings → API Keys
- Check xAI status for outages
- Refresh the model list (
GET /v1/meta/models)
“Rate limit exceeded”
- xAI has usage limits on new accounts
- Wait a few minutes and retry
- Check your usage in xAI console
FAQ
Do I need X (Twitter) Premium for Grok API?
No. X Premium gives you access to Grok in the X app. The API is separate.
Do I need a new API key for Grok 4.6?
No. Same xAI key. Open any model selector and pick Grok 4.6.
Is Grok better than GPT or Claude?
Depends on the brief. Use Compare Models on a real keyword rather than guessing. Grok 4.6 is built for long-running agents and knowledge work; Claude still tends to win on some long-form voice; GPT is the default for Cuppa internals.
Can I use Grok for all my content?
Yes for generation. Keep OpenAI connected — Cuppa still uses it for some internal features (outlines, metadata).
Related Docs
- OpenAI API Setup — Required for all users
- Anthropic API Setup — Add Claude models
- Image Generation — Grok Imagine