Discover/docs.x.ai API
live

docs.x.ai APIdocs.x.ai

Retrieve current pricing details for all xAI Grok models and services, including rates for chat, image/video generation, voice capabilities, tools, batch processing, and storage options. Compare costs across different xAI offerings to find the most suitable plan for your needs.

Endpoints
2
Updated
3h ago
Try it

No input parameters required.

api.parse.bot/scraper/aa5ce901-2eef-4452-97a6-2dd2d8cee956/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/aa5ce901-2eef-4452-97a6-2dd2d8cee956/get_pricing' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 2 totalclick to expand

Get all xAI model and service pricing information. Returns pricing for Chat API, Imagine API (image/video), Voice API, Tools, Batch API comparisons, and Files & Collections storage costs. All prices are in USD.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "chat_api": "array of chat model pricing objects with model name, context window, input/cached/output token costs per 1M tokens",
    "batch_api": "array comparing real-time vs batch API features",
    "voice_api": "array of voice mode pricing (realtime, TTS, STT)",
    "imagine_api": "array of image/video generation model pricing with per-resolution output costs",
    "tools_pricing": "array of server-side tool invocation costs per 1k calls",
    "files_and_collections": "object with storage and download rate arrays"
  },
  "sample": {
    "chat_api": [
      {
        "model": "grok-build-0.1",
        "context": "256k",
        "input_per_1m_tokens": "$1.00",
        "output_per_1m_tokens": "$2.00",
        "cached_input_per_1m_tokens": "$0.20"
      },
      {
        "model": "grok-4.3",
        "context": "1M",
        "input_per_1m_tokens": "$1.25",
        "output_per_1m_tokens": "$2.50",
        "cached_input_per_1m_tokens": "$0.20"
      }
    ],
    "batch_api": [
      {
        "feature": "Token pricing",
        "batch_api": "20%-50% off standard rates",
        "realtime_api": "Standard rates"
      }
    ],
    "voice_api": [
      {
        "cost": "$0.05/ min ($3.00/ hr)",
        "mode": "Realtime"
      }
    ],
    "imagine_api": [
      {
        "model": "grok-imagine-image-quality",
        "media_input": "$0.01 / img",
        "resolutions": [
          {
            "output": "$0.05 / img",
            "resolution": "1K"
          },
          {
            "output": "$0.07 / img",
            "resolution": "2K"
          }
        ]
      }
    ],
    "tools_pricing": [
      {
        "tool": "Web Search",
        "tool_name": "web_search",
        "description": "Search the internet and browse web pages",
        "cost_per_1k_calls": "$5/ 1k calls"
      }
    ],
    "files_and_collections": {
      "storage": [
        {
          "rate": "$0.025 / GiB / day",
          "resource": "File storage"
        }
      ],
      "downloads": [
        {
          "rate": "$0.20 / GiB downloaded",
          "resource": "File downloads"
        }
      ]
    }
  }
}

About the docs.x.ai API

The docs.x.ai API on Parse exposes 2 endpoints for the publicly available data on docs.x.ai. Calls return JSON over HTTPS and are billed per successful response.

Pin a release with the API-Snapshot-Version header so canonical updates don't silently change your contract.