How to Use the Grok2API Chat Completions Endpoint
Send a POST request to /v1/chat/completions with an Authorization header and a JSON body containing the model field to receive OpenAI-compatible chat responses from Grok.
The chenyme/grok2api repository implements an OpenAI-compatible API layer for Grok models. This guide covers the Grok2API Chat Completions endpoint implementation, request validation, and practical integration examples based on the actual Go
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
Share the following with your agent to get started:
curl -s "https://instagit.com/install.md" Works with
Claude
Codex
Cursor
VS Code
OpenClaw
Any MCP Client
Maintain an open-source project? Get it listed too →