SPB Git forge

spb/doc-api

Public
2commits 1branches 0releases
15.7 MBsize
maindefault branch
13 days agolast push
Python 88.3% TypeScript 7.6% Shell 4.1%
3.7 KB

# xAI (Grok) API — atlas navigation

Status: provider added 2026-09-18/19; catalogue, pricing, rate limits, deprecations, management/account endpoints, auth/headers/errors, SDKs and gRPC surface LIVE_VERIFIED/DOCUMENTED by the models agent; other areas are written by their own agents (links below are stable even if a page is not present yet).
Sources: https://docs.x.ai/developers/** (182 pages, sources/xai/pages/**, retrieved 2026-09-19), OpenAPI sources/xai/openapi/openapi.json (38 paths), xai-sdk 1.19.0, live probes logged in reports/live-requests.jsonl (provider: xai).
Last verified: 2026-09-18.

# Essentials

Item Value
Base URL https://api.x.ai/v1 (US-only: https://us.api.x.ai/v1, grok-4.6, ×1.1; undocumented eu-west-1.api.x.ai serves grok-4.3; mTLS mtls.api.x.ai; gRPC api.x.ai:443)
Auth Authorization: Bearer xai-… — no version/beta headers
Management API https://management-api.x.ai with a separate Management key (ACCOUNT_RESTRICTED for this atlas)
Cheapest text model grok-4.3 ($1.25 / $2.50 per 1M; reasoning_effort: none → no reasoning tokens); recommended model grok-4.6 ($2 / $6)
Live catalogue 12 ids (GET /v1/models, 2026-09-19): 7 language, 3 image, 2 video
Exact cost usage.cost_in_usd_ticks (1 USD = 10^10 ticks) on every inference response

# Pages

# Models, pricing, limits, lifecycle (this agent)

# Text inference (other agents)

# Tools

# Files, collections, media, voice

# Cross-provider

# Scripts

  • scripts/discover_xai_models.py — re-run catalogue discovery (/v1/models + typed lists) with diff.
  • scripts/gen_xai_fragments.py — rebuild models / pricing / rate-limit fragments from the raws + documented facts.
  • source scripts/lib.sh; xai GET /v1/models · python3 scripts/live.py xai GET /v1/me.