Call Grok 4.3 and 4.5 with OpenAI-compatible clients through RunAPI.
Model Reference | Skill Repo | All Models
Configure the official OpenAI SDK or any compatible client with
https://runapi.ai/v1, send grok-4.3 or grok-4.5, and use one RunAPI
balance for chat, Responses, reasoning, function tools, structured output, and
streaming. This skill teaches Claude Code, Codex, Gemini CLI, Cursor, and 50+
agents how to wire Grok requests through RunAPI.
The canonical agent file is skills/grok/SKILL.md.
npx skills add runapi-ai/grok -gOr paste this prompt to your AI agent:
Install the grok skill for me:
1. Clone https://github.com/runapi-ai/grok
2. Copy the skills/grok/ directory into your
user-level skills directory (e.g. ~/.claude/skills/
for Claude Code, ~/.codex/skills/ for Codex).
3. Verify that SKILL.md is present.
4. Confirm the install path when done.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_RUNAPI_TOKEN",
base_url="https://runapi.ai/v1",
)
response = client.chat.completions.create(
model="grok-4.5",
messages=[{"role": "user", "content": "Review this rollout plan."}],
reasoning_effort="high",
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_RUNAPI_TOKEN",
baseURL: "https://runapi.ai/v1",
});
const response = await client.chat.completions.create({
model: "grok-4.5",
messages: [{ role: "user", content: "Review this rollout plan." }],
reasoning_effort: "high",
});
console.log(response.choices[0].message.content);Use Responses with either model id. This example requests strict structured output from Grok 4.3:
response = client.responses.create(
model="grok-4.3",
input="Return the highest rollout risk and its severity.",
reasoning={"effort": "high"},
text={
"format": {
"type": "json_schema",
"name": "rollout_risk",
"strict": True,
"schema": {
"type": "object",
"properties": {
"risk": {"type": "string"},
"severity": {"type": "string", "enum": ["low", "medium", "high"]},
},
"required": ["risk", "severity"],
"additionalProperties": False,
},
}
},
)
print(response.output_text)
print(response.usage)Grok text models are available through RunAPI's OpenAI-compatible Chat
Completions and Responses interfaces, Anthropic-compatible Messages interface,
and Gemini contents interface. RunAPI preserves the exact public model ids
grok-4.3 and grok-4.5 across request protocols; use the protocol already
expected by your application or agent runtime.
Get a RunAPI API Key at https://runapi.ai/api_keys.
| Model ID | Notes |
|---|---|
grok-4.5 |
Chat, coding, reasoning, tools, and structured output |
grok-4.3 |
Reasoning, Responses, function tools, and structured output |
- Grok API on RunAPI: https://runapi.ai/models/grok
- Provider page: https://runapi.ai/providers/xai
- Browse all models: https://runapi.ai/models
- Keep API keys in
OPENAI_API_KEYor a secret manager. - Use the exact model id
grok-4.3orgrok-4.5. - For Responses streams, wait for
response.completed, terminalusage, and[DONE]. - Link to https://runapi.ai/models/grok/4.3 or https://runapi.ai/models/grok/4.5 for pricing.
Licensed under the Apache License, Version 2.0.