OpenMeter Plans API

Product catalog plans for subscriptions.

OpenAPI Specification

openmeter-plans-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: OpenMeter Billing Plans API
  description: OpenMeter is open-source usage metering and billing for AI and API products. Ingest usage as CloudEvents, define meters that aggregate those events, query usage, manage subjects and customers, gate access with entitlements (metered, boolean, and static), features and grants, react to usage with notifications, and drive billing, plans, and subscriptions with Stripe integration. This is a faithful, representative subset of the real OpenMeter Cloud API (https://openmeter.cloud/api/v1) for API Evangelist catalog purposes; see the canonical spec at https://github.com/openmeterio/openmeter for the full surface.
  termsOfService: https://openmeter.io/terms
  contact:
    name: OpenMeter Support
    url: https://openmeter.io
    email: support@openmeter.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.0.0
servers:
- url: https://openmeter.cloud
  description: OpenMeter Cloud
- url: http://localhost:8888
  description: Self-hosted (open source, default)
security:
- BearerAuth: []
tags:
- name: Plans
  description: Product catalog plans for subscriptions.
paths:
  /api/v1/plans:
    get:
      operationId: listPlans
      tags:
      - Plans
      summary: List plans
      responses:
        '200':
          description: List of plans.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Plan'
    post:
      operationId: createPlan
      tags:
      - Plans
      summary: Create plan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Plan'
      responses:
        '201':
          description: Plan created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan'
components:
  schemas:
    Plan:
      type: object
      required:
      - key
      - name
      properties:
        id:
          type: string
        key:
          type: string
        name:
          type: string
        currency:
          type: string
          example: USD
        phases:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              name:
                type: string
              rateCards:
                type: array
                items:
                  type: object
                  additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: OpenMeter Cloud API token supplied as a Bearer token.