APIGrok / xAI ProtocolChat Completions

Grok Chat Completions

Call Grok models through kineticRouter’s Grok / xAI API family. The Grok / xAI route selects only Grok-family models and upstreams; its text request and response payloads use xAI’s OpenAI-compatible Chat Completions JSON and SSE shape.

This is a Grok / xAI protocol boundary, not an OpenAI-upstream alias. Use your kineticRouter API key—not an xAI OAuth credential—and the Grok endpoint below.

Base URL and endpoint

The protocol root is:

Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

For the official OpenAI SDK, configure this SDK base URL:

Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

The Chat Completions endpoint is:

Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Authentication

Pass your kineticRouter API key as a Bearer token:

Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This page preserves the dedicated Grok request shape as an integration reference. This example is intentionally not copyable in its current display state.

Available models

Use canonical model IDs with the grok/ prefix.

Model IDCurrent use
grok/grok-4.5Default frontier model for general, coding, and agentic work; 500,000-token context window.
grok/grok-composer-2.5-fastText-only coding model for Grok Build workflows; 200,000-token context window. It does not accept image input.

Request examples

Terminal
Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

Streaming

Set stream: true to receive an SSE stream in the xAI-compatible Chat Completions format:

grok_stream.py
Planned example

The dedicated Grok route is planned and its configuration is shown only as a reference. This example is intentionally not copyable in its current display state.

For the xAI-compatible Responses shape, use the Grok Responses API.