Become a 10x Brand Engineer with Cuppa AI See Who's Hiring

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

ModelIDContextBest ForNotes
Grok 4.6grok-4.6500kFlagship. Agents, long briefs, first drafts that hold a threadMarked NEW in the model picker
Grok 4.5grok-4.5500kPrevious flagshipSame 2/2 / 6 pricing as 4.6
Grok 4.3grok-4.31MLarge-context instruction followingCheaper 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

  1. Go to x.ai/api
  2. Click API Platform (top right)
  3. Sign up or log in

Step 2: Get Your API Key

  1. In the xAI console, go to API Keys
  2. Click Create API Key
  3. Name it “Cuppa”
  4. Copy the key

Your key looks like: xai-xxxxxxxxxxxxxxxxxxxx


Step 3: Add Key to Cuppa

  1. Go to Team SettingsAPI Keys
  2. Find the Grok section
  3. Paste your API key
  4. 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):

  1. Open any generation flow
  2. Click the model selector
  3. Choose Grok 4.6 (marked NEW)
  4. 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):

ModelInputOutput
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).