SpaceXAI Models API
List models available through the SpaceXAI 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
SpaceXAI, send it as Authorization: Bearer <your HAOAI_API_KEY>.
Legacy /grok/... API paths remain directly supported with the same behavior as
/x-ai/..., without redirects. Existing model IDs such as grok/grok-4.5
also remain supported; use x-ai/grok-4.5 for new integrations. Grok names the
model family; SpaceXAI is the provider and API display name.
Base URL and endpoints
Protocol root:
https://api.hao.ai/x-aiGET https://api.hao.ai/x-ai/v1/models
GET https://api.hao.ai/x-ai/v1/models/{model_id}List available Grok models
curl https://api.hao.ai/x-ai/v1/models \
-H "Authorization: Bearer $HAOAI_API_KEY"Example response:
{
"object": "list",
"data": [
{
"id": "grok-4.5",
"object": "model",
"created": 0,
"owned_by": "x-ai"
},
{
"id": "grok-composer-2.5-fast",
"object": "model",
"created": 0,
"owned_by": "x-ai"
}
]
}Get a model
Use either the canonical ID or the bare Grok model name in the detail path. For example:
curl https://api.hao.ai/x-ai/v1/models/grok-4.5 \
-H "Authorization: Bearer $HAOAI_API_KEY"Current model catalog
| Model ID | Context window | Input |
|---|---|---|
x-ai/grok-4.5 | 500,000 tokens | Text and image |
x-ai/grok-composer-2.5-fast | 200,000 tokens | Text only |
Use these canonical IDs in SpaceXAI Chat Completions or SpaceXAI Responses requests.