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",
    "reason": "Reconciled",
    "status": "True",
    "conditionType": "Ready",
    "lastTransitionTime": "2026-01-01T00:00:00Z",
    "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",
    "reason": "Reconciled",
    "status": "True",
    "conditionType": "Ready",
    "lastTransitionTime": "2026-01-01T00:00:00Z",
    "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"
    }
  }
}

Changes

Changed in 9 of the 33 revisions of this API.2321

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • removed the request property //

      request-property-removed

    • removed the optional property /// from the response with the status

      response-optional-property-removed

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

  • 1428a3203bfb111See the full diff
    • the response property became optional for the status

      response-property-became-optional

    • removed the request property

      request-property-removed

    • added the new optional request property

      new-optional-request-property

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 41 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog