Grok Models API
List models available through the Grok / xAI protocol. The response uses the OpenAI-compatible model-list shape and contains Grok-family models only.
Like every HaoAI Models API, this endpoint requires a HaoAI API key. For
Grok / xAI, send it as Authorization: Bearer <your HAOAI_API_KEY>.
Base URL and endpoints
Protocol root:
https://api.hao.ai/grokGET https://api.hao.ai/grok/v1/models
GET https://api.hao.ai/grok/v1/models/{model_id}List available Grok models
Terminal
curl https://api.hao.ai/grok/v1/models \
-H "Authorization: Bearer $HAOAI_API_KEY"Example response:
{
"object": "list",
"data": [
{
"id": "grok/grok-4.5",
"object": "model",
"created": 0,
"owned_by": "grok"
},
{
"id": "grok/grok-composer-2.5-fast",
"object": "model",
"created": 0,
"owned_by": "grok"
}
]
}Get a model
Use either the canonical ID or the bare Grok model name in the detail path. For example:
Terminal
curl https://api.hao.ai/grok/v1/models/grok-4.5 \
-H "Authorization: Bearer $HAOAI_API_KEY"Current model catalog
| Model ID | Context window | Input |
|---|---|---|
grok/grok-4.5 | 500,000 tokens | Text and image |
grok/grok-composer-2.5-fast | 200,000 tokens | Text only |
Use these canonical IDs in Grok Chat Completions or Grok Responses requests.