# How to Use the Grok2API Chat Completions Endpoint

> Learn to use the Grok2API Chat Completions endpoint. Send POST requests to get OpenAI-compatible chat responses from Grok's powerful models.

- Repository: [Chenyme/grok2api](https://github.com/chenyme/grok2api)
- Tags: how-to-guide
- Published: 2026-07-16

---

**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