xAI
Call xAI's Grok API without an X premium account.
grok-2, grok-2-mini, grok-2-vision β xAI's models with realtime knowledge and unfiltered output, through one OpenAI-compatible endpoint.
Latest models as of 2026-05-23
See all models βWhy use JJAPI for this API
No X Premium needed
Direct Grok API access without paying for X Premium+ or applying for the xAI waitlist.
Realtime knowledge
Grok has tighter integration with realtime sources than most LLMs β useful for news, sports, and current events.
OpenAI-compatible
Same SDK signature β switch between Grok and GPT-4o by changing one string.
Higher tolerance
Grok has a more permissive content policy than GPT-4 / Claude for legitimate creative work.
from openai import OpenAI
client = OpenAI(
base_url="https://api.jjapi.net/v1",
api_key="sk-jjapi-...",
)
r = client.chat.completions.create(
model="grok-4", # current as of 2026-05-23
messages=[{"role": "user", "content": "Hi"}],
)
print(r.choices[0].message.content) Frequently asked
Does Grok have realtime web access?
Yes β Grok can access realtime information from X and the broader web during inference. Latency is slightly higher than non-grounded models.
Is Grok cheaper than GPT-4o?
Grok-2 is similar to GPT-4o pricing. Grok-2-mini is ~50% cheaper than GPT-4o-mini for most tasks.
Does function calling work?
Yes β Grok supports OpenAI-style 'tools' parameter with parallel tool calls.