Grok API at 80% Off: Use xAI's Grok 2 via aiapi.cheap
Try xAI's Grok 2 without a Twitter / X Premium subscription or separate xAI account. Hit Grok via OpenAI SDK through aiapi.cheap at 80% off. Setup in 60 seconds.
The Honest Take on Grok
Grok has a personality. Whether you like it or not, it's distinct from Claude's careful tone, GPT's neutral helpfulness, or Gemini's research-paper voice. Grok will riff with you. For some apps that's the whole reason to pick it.
But signing up directly with xAI means another account, another credit card, another billing dashboard. And xAI's API tier pricing isn't always the friendliest.
aiapi.cheap lets you hit Grok 2 through the OpenAI-compatible endpoint with one sk-aic-* key. Same SDK as you'd use for Claude or GPT, just swap the model name.
The Setup
from openai import OpenAI
client = OpenAI(
api_key="sk-aic-YOUR_API_KEY",
base_url="https://aiapi.cheap/api/proxy/v1",
)
resp = client.chat.completions.create(
model="grok-2",
messages=[{"role": "user", "content": "Tell me a joke about LLMs."}],
)
print(resp.choices[0].message.content)Done. The proxy translates OpenAI ChatCompletions to Grok's native format and back.
Models Available
| Model | Best For | Pro Plan Pricing (input / output per 1M tokens) |
|---|---|---|
| grok-2 | Conversational, real-time data flavor, casual tone | $0.40 / $2.00 |
Official xAI Grok 2 is $2.00/$10.00 per 1M tokens. Pro plan is 80% off.
When to Pick Grok
For production code review, refactoring, or careful long-form writing, Claude or GPT are usually safer picks. Grok shines when you want a model with character.
Streaming
Standard SSE pattern works:
stream = client.chat.completions.create(
model="grok-2",
messages=[{"role": "user", "content": "Stream me your hot take on TypeScript."}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)Node.js Example
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AIAPI_KEY!,
baseURL: "https://aiapi.cheap/api/proxy/v1",
});
const resp = await client.chat.completions.create({
model: "grok-2",
messages: [
{ role: "system", content: "You're a snarky DevOps engineer." },
{ role: "user", content: "Why did Kubernetes win?" },
],
});
console.log(resp.choices[0].message.content);Voice / Tone Comparison
If you ask the same question to all 5 vendors, you'll get 5 different vibes. Grok leans casual, Claude leans careful, GPT leans neutral, Gemini leans factual, DeepSeek leans terse. The fact that you can swap them with one line of code is the actual point of multi-vendor.
Example: "Should I learn Rust?"
Different tools for different jobs.
Common Mistakes
Pricing Math (Real Workload)
A chatbot doing 10,000 requests/day on Grok 2 (500 input, 1K output tokens):
For a small consumer-facing chatbot that's the difference between burning runway and surviving.
Next Steps
One key. Five vendors. Pick whichever voice fits the task.