Skip to content Chat

Grok API

7 Grok models on one OpenAI-compatible API and one prepaid balance, billed per use at the official price.

Get API Key All 7 Grok models

Official price

$2.00 / $6.00 per 1M input / output tokens

Grok 4.7

Grok models and prices 7

ModelContextPriceDiscount
Grok 4.7x-ai/grok-4.7500K$2.00 / $6.00 per 1M tokens—
Grok 4.6x-ai/grok-4.6500K$2.00 / $6.00 per 1M tokens—
Grok 4.5x-ai/grok-4.5500K$2.00 / $6.00 per 1M tokens—
Grok Build 0.1x-ai/grok-build-0.1256K$1.00 / $2.00 per 1M tokens—
Grok 4.3x-ai/grok-4.31M$1.25 / $2.50 per 1M tokens—
Grok 4.20 Multi-Agentx-ai/grok-4.20-multi-agent2M$1.25 / $2.50 per 1M tokens—
Grok 4.20x-ai/grok-4.202M$1.25 / $2.50 per 1M tokens—

Prices as of November 5, 2026. Official price: the model maker's list price. Tier 1–3: OceanToken's standing discounts by cumulative top-up, not limited-time offers.

Call the Grok API

Any OpenAI-compatible SDK works: set the base URL to https://api.oceantoken.ai/v1, use your OceanToken key and the model id as written.

Python
from openai import OpenAI
# Your API Key from the OceanToken console
client = OpenAI(base_url="https://api.oceantoken.ai/v1",
                api_key="YOUR_API_KEY")
reply = client.chat.completions.create(
    model="x-ai/grok-4.7",
    messages=[{"role": "user", "content": "Hello"}])
print(reply.choices[0].message.content)

Why use Grok on OceanToken

  • One API key and one prepaid balance for nearly 500 models from 73 publishers.
  • OpenAI-compatible: change the base URL and the key, and keep your code.
  • Prepaid, with no subscription and no platform fee. Each API key can have its own spending limit.

Grok compared

Grok 4.6 vs GPT-6 Sol · Grok 4.6 vs Claude Sonnet 5.5 · DeepSeek V4.1 Flash vs Grok 4.7 · DeepSeek V4.1 Flash vs Grok 4.6 · DeepSeek V4.1 Flash vs Grok 4.5 · DeepSeek V4.1 Flash vs Grok Build 0.1 · DeepSeek V4 Pro vs Grok 4.7 · DeepSeek V4 Pro vs Grok 4.6 · All comparisons

Cheaper alternatives to Grok 4.7 · Cheaper alternatives to Grok 4.6 · Cheaper alternatives to Grok 4.5

Frequently asked questions

How much does the Grok API cost?

On OceanToken Grok 4.7 costs $2.00 / $6.00 per 1M tokens. The lowest-priced Grok model is Grok Build 0.1, at $1.00 / $2.00 per 1M tokens. Every model is billed per use from a prepaid balance, with no subscription.

Are these the official Grok models?

Yes. You call each model by its own name and get that model. Every model page shows the official price next to ours before you call it.

How do I call the Grok API?

Create an API key in the OceanToken console, set the base URL to https://api.oceantoken.ai/v1 and use the model id, for example x-ai/grok-4.7. The OpenAI SDKs and any OpenAI-compatible client work.

Do I need a subscription to use Grok?

No. You add credits by card, and each request is billed at the model’s price. Purchased credits are valid for 12 months.

Get API Key All models

Other model APIs

Kimi API · MiniMax API · Claude API · GPT API · Gemini API · Mistral API · Llama API · Gemma API · Nemotron API · Hunyuan API · Seed API · Sonar API · Command API · Nova API · Veo API · Kling API · Wan API · Hailuo API · Nano Banana API · Seedream API · GPT Image API · FLUX API · Qwen Image API · Grok Imagine API · Recraft API · MAI Image API · Whisper API · Voyage API