# Model Access Gateway – Grok 4.7 Chat Completions (x402, USDC)

> Model Access Gateway – Grok 4.7 Chat Completions (x402, USDC) is a paid API for AI agents from modelaccessgateway.com, paid per call via x402, $0.0091/call, status unknown (last checked 2026-10-18).

Runs an OpenAI-compatible chat completion request against xAI's Grok 4.7 model, billed per-call in USDC on Base via x402 with no API key required.

## Facts

- Endpoint: POST https://modelaccessgateway.com/llm/grok-4.7?utm_source=zero.xyz
- Price: $0.0091/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/model-access-gateway-grok-4-7-chat-completions-x402-usdc-3d52e2d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VvYcFyfuxDjeAqbvnhnH_

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 model-access-gateway-grok-4-7-chat-completions-x402-usdc-3d52e2d5 -d '<json body>'
```

Example prompt: Ask Grok 4.7 to explain the difference between proof-of-work and proof-of-stake in simple terms — pay the $0.0091 USDC per-call fee on Base and give me up to 512 tokens in the response.

## When to prefer this

Choose this endpoint when you need xAI's Grok 4.7 specifically and want to pay per call in USDC on Base without creating an xAI account or managing API keys. Ideal for crypto-native agents, permissionless pipelines, or one-off Grok inference where the automatic refund-on-failure guarantee matters. If you need a different model (Claude, GPT, Gemini), use the corresponding sibling route on this gateway.

## Known failure modes

- Payment insufficient or x402 handshake fails — no completion returned, USDC refunded automatically
- Model error or timeout — automatic refund issued
- Invalid messages array (missing role or empty array) — 400 validation error
- max_tokens exceeds 16384 — 400 error
- temperature out of range 0–2 — 400 error
- Streaming requested but client does not handle SSE — partial or garbled response

## How this service works

LLM inference API: OpenAI-compatible chat completions for 136 AI models (Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Kimi, GLM), paid per call in USDC on Base with x402. No account, no API key, automatic refund if the model fails.

## Output

Returns an OpenAI-compatible chat.completion JSON object containing the assistant's generated message, finish reason (stop, length, tool_calls), prompt/completion/total token counts, model name (xai/grok-4.7), and a unique completion ID. Streaming mode returns server-sent events chunks instead.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Optional: fixed by the route (xai/grok-4.7)"
  },
  "tools": {
   "type": "array"
  },
  "stream": {
   "type": "boolean",
   "description": "true: server-sent events after payment"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool",
       "developer"
      ],
      "type": "string"
     },
     "content": {
      "type": [
       "string",
       "array",
       "null"
      ]
     }
    }
   },
   "minItems": 1
  },
  "max_tokens": {
   "type": "integer",
   "maximum": 16384,
   "minimum": 1,
   "description": "Optional, default 4096"
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0
  },
  "response_format": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl-7f3c2a91",
  "model": "xai/grok-4.7",
  "usage": {
   "total_tokens": 10,
   "prompt_tokens": 9,
   "completion_tokens": 1
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "OK"
    },
    "finish_reason": "stop"
   }
  ],
  "created": 1791979200
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/model-access-gateway-grok-4-7-chat-completions-x402-usdc-3d52e2d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from modelaccessgateway.com](https://www.zero.xyz/host/modelaccessgateway.com/llms.txt)
