Self-host Ready
Run with Docker Compose and keep full control of config and data.
Grokpi Documentation
This page gives a practical setup path, API examples, and operational notes so teams can run Grokpi and connect it to their own products.
Run with Docker Compose and keep full control of config and data.
Use admin auth, API keys, and token pools to separate workloads.
Use familiar endpoints for chat, image, and video generation.
Track requests, token usage, and model behavior from one console.
From project root, run:
docker compose up -d --build curl -s http://127.0.0.1:8080/health
Then open /login, sign in with admin password, create API keys, and start calling /v1/* endpoints.
List available models
curl -s http://127.0.0.1:8080/v1/models \ -H "Authorization: Bearer <YOUR_API_KEY>"
Chat completion
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "grok-3-mini",
"messages": [
{"role":"user","content":"Explain token pools in 3 bullet points."}
]
}'Image generation
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "grok-imagine-1.0",
"messages": [
{"role":"user","content":"A cyberpunk city street at sunrise"}
],
"image_config": {
"aspect_ratio": "16:9"
}
}'Video generation
curl -s http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "grok-imagine-1.0-video",
"messages": [
{"role":"user","content":"A drone shot above rice fields with cinematic light"}
],
"video_config": {
"aspect_ratio": "16:9",
"video_length": 8,
"resolution_name": "480p",
"preset": "normal"
}
}'