Skip to content

List MaaS Models

GET /api/v1/models

GET /maas/api/v1/models

Lists available large language models in OpenAI-compatible format. Incoming HTTP headers on this request are forwarded to the upstream MaaS API unchanged (aside from Content-Type and Authorization, which the BFF sets for the outbound call). Callers may send headers understood by maas-api (for example X-MaaS-Return-All-Models).

Authorization

Responses

Status Description Response body
200 OK

List of models

object

application/json

401 Unauthorized

Unauthorized

None
500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

200 OK response body

Property Type Required Description
data ModelListResponse Yes

Example request

curl -X GET "/maas/api/v1/models" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "data": {
    "object": "list",
    "data": [
      {
        "created": 1672531200,
        "id": "llama-2-7b-chat",
        "object": "model",
        "owned_by": "model-namespace",
        "ready": true,
        "url": "https://api.example.com/v1/models/llama-2-7b-chat"
      },
      {
        "created": 1672531200,
        "id": "mistral-7b-instruct",
        "object": "model",
        "owned_by": "model-namespace",
        "ready": true,
        "url": "https://api.example.com/v1/models/mistral-7b-instruct"
      },
      {
        "created": 1672531200,
        "id": "granite-8b-code-instruct",
        "object": "model",
        "owned_by": "model-namespace",
        "ready": false
      },
      {
        "created": 1672531200,
        "id": "llama-3-8b-instruct",
        "object": "model",
        "owned_by": "model-namespace",
        "ready": true,
        "url": "https://api.example.com/v1/models/llama-3-8b-instruct"
      }
    ]
  }
}