v27

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-01304498.9 KB
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

namestring required

Name for the MaaSSubscription resource

descriptionstring

Optional description providing context about the subscription

displayNamestring

Optional display name for the subscription

priorityinteger

Subscription priority (higher = higher priority)

createAuthPolicyboolean

Whether to also create a MaaSAuthPolicy for this subscription

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"
    }
  }
}