Skip to content

Model queries ​

Model queries are used to confirm models that are currently available for API Key. Before accessing the list of models, it is recommended to call API to avoid using an unusable model name in request body.

Query Model List ​

http
GET /v1/models
bash
curl https://moonnexai.com/v1/models \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Query individual models ​

http
GET /v1/models/{modelid}
bash
curl https://moonnexai.com/v1/models/gpt-5.6-terra \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Example response ​

json
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5.6-terra",
      "object": "model",
      "owned_by": "moonnexai"
    }
  ]
}

The response's id is the value to use for model in a request.

Use recommendations ​

  • Keep the model name in the access configuration, rather than hard-coding to multiple business modules.
  • When the model is not available, query the model list and API Key permissions.
  • Video, image, music, etc. also require a view of the corresponding model matrix, confirming input, aspect ratio, duration and task queries.

Relevant Pages ​