NewKimi K3.1 Pro is now availableTry it now
GROK API

Grok API

Run xAI Grok 4.6 and Grok 4.5 through one Inference.net API key with OpenAI /v1/chat/completions, /v1/responses, and Anthropic /v1/messages support. Compare live standard and >200K long-context per-token pricing, x-grok-conv-id prompt-cache savings, and 500K-token context windows. Because live Grok models route externally to xAI, they follow xAI's upstream data-handling and retention terms (default Zero Data Retention applies to eligible Inference.net-hosted routes).

  • Live Grok 4.6 and Grok 4.5 pricing with 500K context and 500K max output
  • Prompt caching via x-grok-conv-id (75% savings on Grok 4.6, 85% on Grok 4.5)
  • OpenAI /v1/chat/completions, /v1/responses, and Anthropic /v1/messages support
  • Vision input, tool calling, structured outputs, and configurable reasoning
LIVE CATALOG & PRICING

All live Grok models on Inference.net

Every rate, context limit, and capability below is pulled directly from the live public catalog. Select any model for full specs, live latency benchmarks, and prompt-caching guidance.

ModelContextMax outputInput / 1MCached / 1MOutput / 1MCapabilitiesStart
Grok 4.6grok-4.6
500K500K$2.00$0.50$6.00Vision, Tools, ReasoningUse API
Grok 4.5grok-4.5
500K500K$2.00$0.30$6.00Vision, Tools, ReasoningUse API
QUICKSTART

Call Grok over OpenAI or Anthropic SDKs

Use the top live model ID (grok-4.6) with the standard OpenAI SDK, curl, or Claude Code over native /v1/messages.

QUICKSTARTGet API key
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.inference.net/v1',
  apiKey: process.env.INFERENCE_API_KEY,
})

const completion = await client.chat.completions.create({
  model: 'grok-4.6',
  messages: [{ role: 'user', content: 'Hello' }],
})
CLAUDE CODE & ANTHROPIC /V1/MESSAGES

Point Claude Code or any Anthropic SDK client at Inference.net with zero proxy setup and full prompt-cache support.

export ANTHROPIC_BASE_URL="https://api.inference.net"
export ANTHROPIC_AUTH_TOKEN="$INFERENCE_API_KEY"
export ANTHROPIC_MODEL='grok-4.6'
export ANTHROPIC_DEFAULT_OPUS_MODEL='grok-4.6'
export ANTHROPIC_DEFAULT_SONNET_MODEL='grok-4.6'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='grok-4.6'
export CLAUDE_CODE_SUBAGENT_MODEL='grok-4.6'
export CLAUDE_CODE_MAX_CONTEXT_TOKENS="500000"
claude
COMPARISONS, GUIDES & TOOLS

Benchmark, compare, and model Grok costs

Verify unit economics across prompt-cache hit rates, compare providers, and explore engineering guides for Grok.

MODEL FAMILIES

Explore other open-weight model families

Switch across DeepSeek, Kimi, GLM, and the full catalog with one API key and one OpenAI-compatible client.

FAQ

Frequently asked questions.

Quick answers to help you get started

Inference.net currently serves 2 live Grok models with transparent pay-as-you-go per-token billing. Input rates start at $2.00 per 1M input tokens ($6.00 per 1M output tokens) on Grok 4.6. Prompts exceeding 200K input tokens on Grok 4.6 and Grok 4.5 use the long-context tier ($4.00/1M input, $12.00/1M output, and $1.00/1M cached on Grok 4.6 or $0.60/1M cached on Grok 4.5). Every rate in the comparison table above pulls directly from the live public catalog.

GET STARTED

Start calling Grok in minutes

Create a project API key with Zero Data Retention enabled by default on eligible Inference.net-hosted routes and route requests to grok-4.6 with pay-as-you-go billing.