provider

xAI Grok

Direct answerA model platform for general generation, reasoning, coding, tool use, realtime voice, and media generation.

Updated · Reviewed

Separate xAI-native capabilities from this site's adapters

xAI provides text reasoning, tools, vision, image, video, and realtime voice around Grok. Direct calls use an xAI Bearer API key; this site uses its own token and guarantees only the listed api_paths. A consumer feature, newly released xAI endpoint, or model does not automatically become a route on this site.

Prefer Responses for new text integrations

xAI recommends the Responses API and labels Chat Completions as legacy; new tools and state features arrive in Responses first. Responses returns typed output items and can continue with previous_response_id. Chat uses messages and choices, normally with history resent by the client. Their responses, tool results, and stream events differ, so migration is not a path-only change.

Make storage an explicit decision

Responses defaults store to true, allowing retrieval or continuation during a limited retention period. Set store: false when the response should not be persisted by xAI, and retain full context in the application; later HTTP calls cannot assume the server can recover that previous_response_id. ZDR is a team-wide policy and disables storage-dependent stateful Responses, Files, Batch, and selected media-output modes. A per-request store: false flag is not a complete ZDR guarantee.

Video is an asynchronous media job

A direct xAI video request first returns request_id; REST clients then poll pending until a terminal done, failed, or expired state. SDKs can poll on the caller's behalf, but still need an interval, total deadline, and cancellation. Default completed-media URLs are ephemeral, so download promptly or use the documented Files storage option for retention. This site's current xAI routes do not list native video; this section describes upstream behavior only.

Errors, limits, cost, and safety

For 401/403, check team, key, and capability permission. For 429, lower concurrency and honor response guidance. Fix parameter or moderation errors, and retry only transient 5xx failures with bounds. Preserve request ID, model, service_tier, usage, and tool sources. Media can be billed per image or video second and text per token, so use the current model page. Keep keys server-side and verify the ZDR response indicator and team data policy for sensitive workloads.

Reviewed provider catalog

Latest models by capability

These are provider-catalog models, not a promise of availability on this site. Confirm callable IDs, endpoints, and pricing in the model marketplace.

Text, reasoning, and code

Image generation and editing

Video generation and editing

Check live availability in the model marketplace

Use cases

  • Reasoning and coding
  • Agentic tool use
  • Realtime voice and media generation

API protocols

  • /v1/responses
  • /v1/chat/completions
  • /v1/images/generations

FAQ

Should a new xAI integration use Responses or Chat Completions?

Prefer /v1/responses. xAI marks Chat Completions as legacy and delivers new capabilities to Responses first. Existing Chat applications can remain, but migration is more than a URL change.

Can previous_response_id continue a chat after store: false?

Repeated HTTP calls cannot rely on server recovery of an unstored response; the application must preserve and resend full context. A persistent WebSocket can continue only while the response remains in that connection's memory cache.

Why does xAI video generation return only a request_id?

Video is asynchronous. Poll with request_id until done, failed, or expired; pending is still processing. The result URL is ephemeral and should be copied promptly.

Does an xAI listing on this site imply support for every official endpoint?

No. This site currently lists only its adapted Responses, Chat Completions, and image routes. Native xAI video, Files, Realtime, and other capabilities still depend on marketplace availability and explicit gateway support.

Official sources

  1. xAI Models and Pricing Official
  2. xAI Responses and Chat Completions Comparison Official
  3. xAI Responses API Reference Official
  4. xAI Video Generation Official
  5. xAI API Security FAQ Official