LLM 3 min read

xAI Grok API Pricing: Models, Tool Costs, and Monitoring Workflow

Track xAI Grok API pricing with source-backed checks for token rates, tool-call costs, and SERP plus Reader workflows for AI agents.

(Updated: ) 563 words

Quick answer

xAI API pricing should be treated as a live source, not a fixed blog table. As of the current official pricing page, xAI lists Grok 4.5 at $2.00 per million input tokens and $6.00 per million output tokens, with separate paid tool-call prices for features such as web search and code execution. Always re-check the official xAI API page before budgeting production traffic.

What does xAI pricing mean for developers?

xAI pricing combines model token costs with optional tool-call charges. That means a research agent can cost more than its prompt tokens suggest if it triggers web search, X search, code execution, file search, or collection search.

The safest way to estimate cost is to separate three layers:

  • Base model tokens.
  • Server-side tool calls.
  • Your own retrieval or extraction infrastructure.

If you skip the tool-call layer, cost projections for agentic workflows can be badly wrong.

Current xAI cost fields to verify

Cost field Current official value to check
Main model Grok 4.5
Input tokens $2.00 per 1M tokens
Output tokens $6.00 per 1M tokens
Web search tool $5.00 per 1,000 calls
X search tool $5.00 per 1,000 calls
Code execution $5.00 per 1,000 calls
File search $10.00 per 1,000 calls
Collection search $2.50 per 1,000 calls

These values are useful for planning, but they should not be copied into production budget models without a fresh source check.

Why agent workflows need separate web data costs

Grok can call server-side tools, but developers still need predictable data pipelines for SERP monitoring, competitive analysis, and page extraction. If every user query can trigger several paid tool calls, costs become harder to forecast.

SearchCans gives teams a separate, explicit web-data budget:

  • 1 credit for a SERP API request.
  • 2 to 5 credits for a Reader API request, depending on rendering and proxy choices.
  • Pricing from $0.90 per 1K credits on Standard down to $0.56 per 1K credits on Ultimate.
  • 100 free credits for initial testing.

That makes it easier to decide when search and extraction should happen outside the model provider.

import os
import requests

API_KEY = os.environ["SEARCHCANS_API_KEY"]
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

def fetch_pricing_page(url: str) -> str:
    response = requests.post(
        "https://www.searchcans.com/api/v1/url",
        headers=HEADERS,
        json={"s": url, "t": "url", "mode": 1, "w": 5000, "proxy": 0},
        timeout=45,
    )
    response.raise_for_status()
    data = response.json()
    return data.get("markdown") or data.get("content") or ""

print(fetch_pricing_page("https://x.ai/api")[:2000])

How to compare xAI with other model providers

Do not compare only the input-token price. For an agent, compare the full request path:

  1. Prompt and completion token cost.
  2. Tool-call cost.
  3. Retrieval and Reader cost.
  4. Latency under expected concurrency.
  5. Model quality on your own private eval set.

This is where a monitored pricing workflow beats a one-time spreadsheet. If xAI, Anthropic, OpenAI, or Google changes a price, the article and the internal cost model should be updated from the same captured source.

FAQ

Q: Is xAI API pricing only token based?

A: No. Token prices are only one layer. Server-side tools can add per-call charges, so agent workflows need a separate cost model.

Q: When should I use SearchCans with xAI?

A: Use SearchCans when you want explicit control over SERP discovery and page extraction before sending a smaller, cleaner context to the model.

Q: Can I rely on a 2026 pricing article for exact model costs?

A: Not by itself. Use the article as a workflow guide, then verify the current numbers on the official provider page before making budget decisions.

Tags:

LLM Pricing Comparison API Development
SearchCans Team

SearchCans Team

SERP API & Reader API Experts

The SearchCans engineering team builds high-performance search APIs serving developers worldwide. We share practical tutorials, best practices, and insights on SERP data, web scraping, RAG pipelines, and AI integration.

Ready to build with SearchCans?

Test SERP API and Reader API with 100 free credits. No credit card required.