xAI Grok API gateway details

xAI's official Grok API; ideal as a candidate to test apps needing Grok's text, vision, and real-time information.

Small amounts
Trial first

Overview

xAI's official Grok API; ideal as a candidate to test apps needing Grok's text, vision, and real-time information.

Best for: For developers wanting to include Grok in multi-model evaluations or needing xAI's native capabilities.

Availability and latency

Current status
Test yourself
Latency reference
Depends on your deployment
/models check
See the platform docs
Last verified
Not verified yet
Status notes
Test plain responses, streaming, error codes, and rate limits yourself before launch.

Supported models

Grok

Pricing and multipliers

Pricing mode
Official list price, pay-as-you-go; prices, rate limits, and available models per the xAI docs.
Price tags
Standard price, Pay-as-you-go
Free quota
Refer to the official console.

Payment methods

Credit card

How to call the API

Usually you create an API key in the platform console, then replace the SDK's baseURL, model name, and auth details per the docs. Test streaming, function calling, error codes, and rate limits before launch.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AI_GATEWAY_API_KEY,
  baseURL: "see the platform docs"
});

const response = await client.chat.completions.create({
  model: "Grok",
  messages: [{ role: "user", content: "Test one call through an AI gateway." }]
});

Pros

  • Supported models: Grok.
  • Capabilities: OpenAI-compatible, Streaming, Image generation.
  • Documentation completeness: High; editorial stability score 4.3 / 5.

Cons

  • Models, region, and API policy change fast; recheck rate limits, price, and data terms before launch.
  • Third-party relay pricing, models, and availability can change, so re-check them periodically.

Alternatives

OpenRouter

Details
Aggregator

A multi-model routing platform for developers; switch models by changing the base_url with the OpenAI SDK, ideal for teams comparing the quality and price of many models at once.

Models
OpenAI, Claude, Gemini, DeepSeek, Grok, Qwen and more
Payment
Credit card, Stripe, Free trial
Price
Billed per model and provider; some models offer free routing or free quota.

Vercel AI Gateway

Details
Cloud vendorHigh stability

Vercel's official AI Gateway, emphasizing unified model calls, failover, caching, and observability; ideal for apps already deployed on Vercel.

Models
OpenAI, Claude, Gemini, DeepSeek, Grok, Qwen and more
Payment
Credit card, Free trial
Price
Settled via your Vercel account and model usage; the docs stress the gateway itself adds no markup.

302.AI

Details
Aggregator

A tool and API aggregation platform covering text, image, video, and audio AI capabilities; ideal for individuals and small teams wanting one-stop access to many models.

Models
OpenAI, Claude, Gemini, DeepSeek, Grok, Qwen and more
Payment
Credit card, Free trial
Price
Billed per tool or model usage; the site lists separate prices per model.

OhMyGPT

Details
AggregatorPrepaidLow cost

A common API relay service among Chinese users; the site highlights aggregation of OpenAI, Claude, and Gemini plus multiple top-up methods.

Models
OpenAI, Claude, Gemini, DeepSeek, Grok, Qwen and more
Payment
Alipay, WeChat, USDT, PayPal, Stripe, Free trial
Price
Pay-as-you-go after top-up; the site lists per-model token prices.

FAQ

Is xAI Grok API compatible with the OpenAI API?
This entry is marked as supporting the OpenAI-compatible format, but the exact base_url, model names, and parameters still follow the official docs.
Is xAI Grok API ready for production?
Run a small-traffic load test, rate-limit test, and error-code test first, and confirm the billing rules; keep a backup provider for important workloads.

Risk

Risk notice

This site only organizes information about AI API relay services; it makes no guarantee about third-party platforms' stability, price, data security, or availability. Judge the risk yourself before use, and avoid uploading sensitive data, personal privacy, trade secrets, or core API keys to unknown platforms.