This service provides an OpenAI-compatible API interface for Grok AI models, connecting to the official Grok API.
/v1/models - Get available models/v1/chat/completions - Chat completion API (OpenAI-compatible)Authentication requires a special format with both bearer token and auth token from Grok:
Authorization: Bearer YOUR_BEARER_TOKEN,YOUR_AUTH_TOKENYou can obtain these tokens by logging into Grok and extracting them from your browser's network requests. Both tokens are required for the API to work properly.
POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer YOUR_BEARER_TOKEN,YOUR_AUTH_TOKEN
{
"model": "grok-3",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
],
"stream": true
}The API maintains conversation history for each session. You can include a conversation_id in your requests to continue an existing conversation.
If no conversation ID is provided, a new one will be generated automatically.