Skip to content

Create a MaaSModelRef

POST /api/v1/maasmodel

POST /maas/api/v1/maasmodel

Creates a new MaaSModelRef Kubernetes custom resource. K8s calls: POST /k8s/v1/maasmodelref

Authorization

Request body

Required.

Content type: application/json

Schema: CreateMaaSModelRefRequest

Example:

{
  "name": "granite-3-8b-instruct",
  "namespace": "maas-models",
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "endpointOverride": ""
}

Responses

Status Description Response body
201 Created

MaaSModelRef created successfully

MaaSModelRefSummary

application/json

400 Bad Request

Bad Request. Missing or invalid fields.

ErrorResponse

application/json

401 Unauthorized

Unauthorized

None
409 Conflict

MaaSModelRef already exists

ErrorResponse

application/json

500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

Example request

curl -X POST "/maas/api/v1/maasmodel" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "granite-3-8b-instruct",
  "namespace": "maas-models",
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "endpointOverride": ""
}'

Example response

201 Created, application/json

{
  "name": "granite-3-8b-instruct",
  "namespace": "maas-models",
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "phase": "Pending",
  "endpoint": ""
}