Skip to content

Model configurations

A model configuration binds an LLM provider to the configurations that screen its traffic, see Model configuration. Provider secrets are write-only: reads return them masked as ********, and sending ******** back keeps the stored value. Every call needs a Configuration management (admin) key, see the Configuration API. The body is a ModelConfig. The examples set the address and the key once:

export MATVIS_URL="https://<your-matvis-host>"
export MATVIS_API_KEY="<your-admin-api-key>"
export CONFIG_UUID="<configuration-uuid>"

List

GET /api/v1/config/model

Returns every model configuration under data. Narrow the list with ?name=.

curl "$MATVIS_URL/api/v1/config/model" -H "Authorization: $MATVIS_API_KEY"

Create

POST /api/v1/config/model

Creates a model configuration and returns it under data, with its uuid. Send the complete configuration; fields you leave out take their defaults.

curl -X POST "$MATVIS_URL/api/v1/config/model" \
  -H "Authorization: $MATVIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "name": "gpt-4o-prod",
  "provider": "openai",
  "config": {
    "api_key": "sk-...",
    "chat_model": "gpt-4o"
  }
}
EOF
curl -X POST "$MATVIS_URL/api/v1/config/model" \
  -H "Authorization: $MATVIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "name": "azure-gpt4o",
  "provider": "azureopenai",
  "config": {
    "azure_service_endpoint": "https://my-resource.openai.azure.com",
    "api_key": "...",
    "chat_deployment_name": "gpt-4o",
    "chat_model_token_limit": 128000,
    "model_type": "default"
  }
}
EOF
curl -X POST "$MATVIS_URL/api/v1/config/model" \
  -H "Authorization: $MATVIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "name": "claude-prod",
  "provider": "anthropic",
  "config": {
    "api_key": "sk-ant-...",
    "chat_model": "claude-sonnet-5"
  }
}
EOF
curl -X POST "$MATVIS_URL/api/v1/config/model" \
  -H "Authorization: $MATVIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "name": "ollama-local",
  "provider": "ollama",
  "config": {
    "url": "http://ollama:11434",
    "model": "llama3.1"
  }
}
EOF

Get

GET /api/v1/config/model/{uuid}

Returns one model configuration under data. GET a configuration to see its full shape.

curl "$MATVIS_URL/api/v1/config/model/$CONFIG_UUID" -H "Authorization: $MATVIS_API_KEY"

Replace

PUT /api/v1/config/model/{uuid}

Replaces the model configuration with the body you send, the same shape as on create. Fields you leave out take their defaults, so send the complete configuration: GET it, change it, PUT it back. The change takes effect on the next request.

Delete

DELETE /api/v1/config/model/{uuid}

Deletes the model configuration.

curl -X DELETE "$MATVIS_URL/api/v1/config/model/$CONFIG_UUID" -H "Authorization: $MATVIS_API_KEY"

Responses

See the status codes every Configuration API call shares.