OpenMeter Meters API

Define meters that aggregate events and query usage.

Operations 6

GET /api/v1/meters List meters #
POST /api/v1/meters Create meter #
GET /api/v1/meters/{meterIdOrSlug} Get meter #
DELETE /api/v1/meters/{meterIdOrSlug} Delete meter #
GET /api/v1/meters/{meterIdOrSlug}/query Query meter #
GET /api/v1/meters/{meterIdOrSlug}/subjects List meter subjects #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openmeter-meters-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openmeter-meters-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenMeter Meters API
  description: OpenMeter is open-source usage metering and billing for AI and API products.
  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: Meters
  description: Define meters that aggregate events and query usage.
paths:
  /api/v1/meters:
    get:
      operationId: listMeters
      tags:
      - Meters
      summary: List meters
      responses:
        '200':
          description: List of meters.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Meter'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createMeter
      tags:
      - Meters
      summary: Create meter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Meter'
      responses:
        '201':
          description: Meter created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Meter'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/meters/{meterIdOrSlug}:
    parameters:
    - name: meterIdOrSlug
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getMeter
      tags:
      - Meters
      summary: Get meter
      responses:
        '200':
          description: A meter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Meter'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteMeter
      tags:
      - Meters
      summary: Delete meter
      responses:
        '204':
          description: Meter deleted.
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/meters/{meterIdOrSlug}/query:
    get:
      operationId: queryMeter
      tags:
      - Meters
      summary: Query meter
      description: Queries usage for a meter, optionally grouped by subject and time window.
      parameters:
      - name: meterIdOrSlug
        in: path
        required: true
        schema:
          type: string
      - name: from
        in: query
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        schema:
          type: string
          format: date-time
      - name: windowSize
        in: query
        schema:
          type: string
          enum:
          - MINUTE
          - HOUR
          - DAY
      - name: subject
        in: query
        schema:
          type: array
          items:
            type: string
      - name: groupBy
        in: query
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Meter query result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeterQueryResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/meters/{meterIdOrSlug}/subjects:
    get:
      operationId: listMeterSubjects
      tags:
      - Meters
      summary: List meter subjects
      parameters:
      - name: meterIdOrSlug
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Subjects that have reported usage to the meter.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
components:
  responses:
    Unauthorized:
      description: Authentication is required or the token is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Problem'
  schemas:
    Problem:
      type: object
      description: RFC 7807 problem details.
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
    MeterQueryResult:
      type: object
      properties:
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        windowSize:
          type: string
          enum:
          - MINUTE
          - HOUR
          - DAY
        data:
          type: array
          items:
            type: object
            properties:
              value:
                type: number
              windowStart:
                type: string
                format: date-time
              windowEnd:
                type: string
                format: date-time
              subject:
                type: string
              groupBy:
                type: object
                additionalProperties:
                  type: string
    Meter:
      type: object
      required:
      - slug
      - eventType
      - aggregation
      properties:
        id:
          type: string
        slug:
          type: string
          description: Unique, URL-friendly identifier for the meter.
          example: api_requests
        name:
          type: string
        description:
          type: string
        eventType:
          type: string
          description: The CloudEvent type this meter aggregates.
          example: api-calls
        aggregation:
          type: string
          enum:
          - SUM
          - COUNT
          - UNIQUE_COUNT
          - AVG
          - MIN
          - MAX
        valueProperty:
          type: string
          description: JSONPath into event data for the metered value (not needed for COUNT).
          example: $.tokens
        groupBy:
          type: object
          additionalProperties:
            type: string
          description: Named JSONPath expressions to group usage by.
          example:
            method: $.method
            path: $.path
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: OpenMeter Cloud API token supplied as a Bearer token.