SuperCLI
中文EN

Getting started

Endpoint
https://api.x.ai/v1
Protocol
REST (OpenAI-compatible: point base_url at api.x.ai/v1)
Authentication
API key
Pricing
Pay per token, no monthly fee
SDK
Use the OpenAI SDK as is, with the base URL switched to xAI's

Pay-as-you-go pricing

Pricing page ↗ · Verified 2026-11-05

ModelPriceUnit
grok 4.6Input2USD 1M tokens
grok 4.6Output6USD 1M tokens
grok 4.6Cache read0.5USD 1M tokens
grok 4.5Input2USD 1M tokens

Prices and billing rules follow the official pricing page; this page records a verified snapshot and does not replace your invoice.

FAQ

How do I get started with xAI API?

Issue an API key from the official console, call https://api.x.ai/v1 (REST (OpenAI-compatible: point base_url at api.x.ai/v1)), and authenticate with API key. Billing is Pay per token, no monthly fee. Check rate limits and costs in the official documentation before you start.

How is xAI API ranked?

xAI API has no comparable GitHub metrics and is not ranked by stars; we do not invent numbers.

Does inclusion mean vendor endorsement?

No. SuperCLI is an independent community directory; inclusion means traceable sources and a public review scope, not vendor endorsement. Trademarks and icons belong to their owners.

Inclusion and review scope

Added on Curated by webkubor@webkuborView inclusion record

The added date records entry into this directory, not an upstream release. Inclusion records are not independent installation tests.

Review scope is pending. Inclusion is not security certification or proof of independent installation testing.

Read our inclusion standards →