# Grok-4 Fast LLM via x402 Gateway

> Grok-4 Fast LLM via x402 Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.004000/call, status unknown (last checked 2026-09-15).

Runs inference on xAI's Grok-4 Fast model with a 2M token context window, optimized for large document processing at low cost

## Facts

- Endpoint: POST https://x402-gateway-production.up.railway.app/api/llm/grok-4-fast
- Price: $0.004000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-f5e3f601
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_co0Xef1eS7gT0gjlAtCd0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-gateway-production-up-railway-app-f5e3f601 -d '<json body>'
```

Example prompt: Use Grok-4 Fast to summarize this 500-page legal contract — I need the key obligations, deadlines, and risk clauses highlighted in plain English.

## When to prefer this

Choose this endpoint when you need to process very large documents (up to 2M tokens) at low cost, and speed matters more than maximum capability. Ideal for summarization, extraction, or reasoning over long-context inputs where Grok-4 Fast's cost-performance tradeoff is favorable over premium models like GPT-4o or Claude Opus.

## Known failure modes

- Prompt exceeds 2M token context window — request rejected with context length error
- Invalid or missing API credentials — 401 unauthorized
- Payment failure via x402 protocol — 402 payment required
- Model overload or rate limit — 429 too many requests
- Malformed request body — 400 bad request

## How this service works

xAI's fast model — 2M context window at very low cost, great for large document processing

## Output

A text completion or chat response generated by xAI's Grok-4 Fast model, supporting up to 2 million tokens of context, returned as a JSON payload with the model's output text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "messages"
     ],
     "properties": {
      "messages": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "role",
         "content"
        ],
        "properties": {
         "role": {
          "type": "string",
          "example": "user"
         },
         "content": {
          "type": "string",
          "example": "Hello"
         }
        },
        "additionalProperties": false
       },
       "example": [
        {
         "role": "user",
         "content": "Hello"
        }
       ],
       "minItems": 1,
       "description": "Array of message objects with role and content"
      },
      "max_tokens": {
       "type": "number",
       "default": 1024,
       "example": 1024,
       "description": "Maximum tokens to generate"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-f5e3f601/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
