Skip to Content

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-ai
GET https://api.hao.ai/x-ai/v1/models GET https://api.hao.ai/x-ai/v1/models/{model_id}

List available Grok models

Terminal
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:

Terminal
curl https://api.hao.ai/x-ai/v1/models/grok-4.5 \ -H "Authorization: Bearer $HAOAI_API_KEY"

Current model catalog

Model IDContext windowInput
x-ai/grok-4.5500,000 tokensText and image
x-ai/grok-composer-2.5-fast200,000 tokensText only

Use these canonical IDs in SpaceXAI Chat Completions or SpaceXAI Responses requests.