---
title: "Grok (xAI): Chat completions against xAI Grok models (grok-4.7, grok-4.3, grok-4.20-0309-non-reasoning, grok-build-0.1; BYOK supported)."
method: POST
path: "/api/v1/x/grok/chat"
tags: ["Crypto API (aggregator)"]
---

# Grok (xAI): Chat completions against xAI Grok models (grok-4.7, grok-4.3, grok-4.20-0309-non-reasoning, grok-build-0.1; BYOK supported).

`POST /api/v1/x/grok/chat`

## Request

- Base URL: `https://three.ws`
- URL: `https://three.ws/api/v1/x/grok/chat`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in header `Authorization`

Chat completions against xAI Grok models (grok-4.7, grok-4.3, grok-4.20-0309-non-reasoning, grok-build-0.1; BYOK supported). Billing lanes, in order: x402 pay-per-call ($0.005 USDC via HTTP 402, no credentials) — or send your own upstream key via BYOK, or authenticate with a three.ws API key / OAuth session / browser session for the plan lane.

## Request body

- object: model: Grok model id, e.g. "grok-4.7" (required); messages: array of {role, content} (required); …: any other OpenAI chat-completions parameter is forwarded

## Response `200`

Normalized upstream response, wrapped as { data, _meta }

## Other responses

- `400`: Missing or invalid parameter
- `402`: Payment Required (x402) — no credentials and free quota (if any) exhausted
- `404`: Unknown provider/endpoint pair
- `429`: Rate limited

---

[API](https://skmtc.dev/three/apis/three-ws-api.md) · [All operations](https://skmtc.dev/three/apis/three-ws-api/llms.txt) · [OpenAPI document](https://skmtc.dev/three/apis/three-ws-api/revisions/dbc5e3a81b79?raw)
