Create a MaaSModelRef¶
POST /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 |
|
400 Bad Request | Bad Request. Missing or invalid fields. |
|
401 Unauthorized | Unauthorized | None |
409 Conflict | MaaSModelRef already exists |
|
500 Internal Server Error | Internal Server Error |
|
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