subscriptions
Create a new subscription
Creates a new MaaSSubscription and its associated MaaSAuthPolicy. K8s calls: CREATE /k8s/v1/maassubscription, CREATE /k8s/v1/maasauthpolicy
post/api/v1/new-subscription
Request body
Example request
{
"name": "premium-team-sub",
"description": "This subscription is for the premium team",
"displayName": "Premium Team Subscription",
"owner": {
"groups": [
{
"name": "premium-users"
}
]
},
"modelRefs": [
{
"name": "llama-2-7b-chat",
"namespace": "maas-models",
"tokenRateLimits": [
{
"limit": 100000,
"window": "24h"
}
],
"billingRate": {
"perToken": "0.0001"
}
}
],
"tokenMetadata": {
"organizationId": "org-123",
"costCenter": "engineering"
}
}Response
Subscription and auth policy created successfully
Example response
{
"subscription": {
"name": "premium-team-sub",
"displayName": "Premium Team Subscription",
"description": "This subscription is for the premium team",
"namespace": "maas-system",
"phase": "Active",
"statusMessage": "successfully reconciled",
"priority": 10,
"owner": {
"groups": [
{
"name": "premium-users"
}
]
},
"modelRefs": [
{
"name": "llama-2-7b-chat",
"namespace": "maas-models",
"tokenRateLimits": [
{
"limit": 100000,
"window": "24h"
}
],
"billingRate": {
"perToken": "0.0001"
}
}
],
"tokenMetadata": {
"organizationId": "org-123",
"costCenter": "engineering"
}
},
"authPolicy": {
"name": "premium-team-sub-policy",
"namespace": "maas-system",
"displayName": "Premium Team Policy",
"description": "High-priority access policy for the premium team.",
"phase": "Active",
"statusMessage": "successfully reconciled",
"creationTimestamp": "2025-03-01T10:00:00Z",
"modelRefs": [
{
"name": "llama-2-7b-chat",
"namespace": "maas-models"
}
],
"subjects": {
"groups": [
{
"name": "premium-users"
}
]
},
"meteringMetadata": {
"organizationId": "org-123",
"costCenter": "engineering"
}
}
}