Layero Usage API

The usage API from Layero — 4 operation(s) for usage.

GitHub OpenAPI

Operations 5

GET /organizations/{slug}/usage Organization Usage #
GET /organizations/{slug}/usage/enforcement Enforcement Status #
PUT /organizations/{slug}/usage/extra Set Extra Usage #
GET /organizations/{slug}/overage Organization Overage #
PUT /organizations/{slug}/overage Put Organization Overage #

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/layero-ru:layero-ru-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

layero-ru-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layero Usage API
  version: 0.1.0
tags:
- name: Usage
paths:
  /organizations/{slug}/usage:
    get:
      tags:
      - Usage
      summary: Organization Usage
      operationId: organization_usage_organizations__slug__usage_get
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: To
      - name: split
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          description: 'Код показателя: вернуть его дневные ряды по проектам'
          title: Split
        description: 'Код показателя: вернуть его дневные ряды по проектам'
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /organizations/{slug}/usage/enforcement:
    get:
      tags:
      - Usage
      summary: Enforcement Status
      operationId: enforcement_status_organizations__slug__usage_enforcement_get
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageEnforcementOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /organizations/{slug}/usage/extra:
    put:
      tags:
      - Usage
      summary: Set Extra Usage
      description: Разрешить дополнительное потребление пилоту; не согласие на автосписание.
      operationId: set_extra_usage_organizations__slug__usage_extra_put
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtraUsageIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageEnforcementOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /organizations/{slug}/overage:
    get:
      tags:
      - Usage
      summary: Organization Overage
      description: 'Перерасход организации: идущий период и прошлые (до 12).'
      operationId: organization_overage_organizations__slug__overage_get
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationOverageOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Usage
      summary: Put Organization Overage
      description: 'Настройки дополнительного потребления: включить, лимит, что на лимите.


        Только владелец аккаунта организации — он платит. Включить можно на

        оплаченном Pro с привязанным способом оплаты (409 с причиной словами). Включение и смена лимита — согласие на автосписание до суммы

        лимита в месяц, выключение — отказ; оба в журнале согласий (LEGAL-13),

        в одной транзакции с записью.'
      operationId: put_organization_overage_organizations__slug__overage_put
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverageSettingsIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationOverageOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UsageProjectSeriesOut:
      properties:
        project_id:
          type: string
          title: Project Id
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        points:
          items:
            $ref: '#/components/schemas/UsagePoint'
          type: array
          title: Points
      type: object
      required:
      - project_id
      - slug
      - name
      - points
      title: UsageProjectSeriesOut
      description: Дневной ряд одного показателя у одного проекта — для графика «По проектам».
    ExtraUsageIn:
      properties:
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
      - enabled
      title: ExtraUsageIn
    UsagePeriodOut:
      properties:
        start:
          type: string
          format: date
          title: Start
        end:
          type: string
          format: date
          title: End
        anchor:
          type: string
          title: Anchor
        days_left:
          type: integer
          title: Days Left
      type: object
      required:
      - start
      - end
      - anchor
      - days_left
      title: UsagePeriodOut
      description: 'Расчётный период — окно, внутри которого копятся лимиты (модель

        Vercel/Supabase, решение владельца 24.09.2026). `start` включительно,

        `end` исключительно; `anchor` говорит, от чего отсчёт: `subscription` —

        от начала текущего периода подписки (оплата открывает новый период),

        `organization` — от дня создания организации, когда подписки нет.'
    OverageSettingsIn:
      properties:
        enabled:
          type: boolean
          title: Enabled
        cap_kopecks:
          type: integer
          maximum: 100000000.0
          minimum: 10000.0
          title: Cap Kopecks
        on_limit:
          type: string
          title: On Limit
      type: object
      required:
      - enabled
      - cap_kopecks
      - on_limit
      title: OverageSettingsIn
    UsageSplitOut:
      properties:
        code:
          type: string
          title: Code
        projects:
          items:
            $ref: '#/components/schemas/UsageProjectSeriesOut'
          type: array
          title: Projects
      type: object
      required:
      - code
      - projects
      title: UsageSplitOut
      description: 'Показатель `code` по проектам за окно. Что не разложилось по проектам

        (Data API без адреса сайта), — разница с рядом организации в `metrics`.'
    RuntimeMeasurementOut:
      properties:
        known_gap_count:
          type: integer
          title: Known Gap Count
        unverified_minutes:
          type: number
          title: Unverified Minutes
      type: object
      required:
      - known_gap_count
      - unverified_minutes
      title: RuntimeMeasurementOut
      description: 'Known runtime measurement issues, not a certificate of completeness.


        Gap durations are intentionally absent: wall-clock jumps are not elapsed

        execution time. Unverified minutes are diagnostic, not a charge estimate.'
    UsagePoint:
      properties:
        day:
          type: string
          format: date
          title: Day
        value:
          type: number
          title: Value
      type: object
      required:
      - day
      - value
      title: UsagePoint
    OrganizationOverageOut:
      properties:
        shadow:
          type: boolean
          title: Shadow
        threshold_kopecks:
          type: integer
          title: Threshold Kopecks
        min_final_kopecks:
          type: integer
          title: Min Final Kopecks
        settings:
          $ref: '#/components/schemas/OverageSettingsOut'
        current:
          anyOf:
          - $ref: '#/components/schemas/OverageStatementOut'
          - type: 'null'
        history:
          items:
            $ref: '#/components/schemas/OverageStatementOut'
          type: array
          title: History
      type: object
      required:
      - shadow
      - threshold_kopecks
      - min_final_kopecks
      - settings
      - current
      - history
      title: OrganizationOverageOut
    UsageMetricOut:
      properties:
        code:
          type: string
          title: Code
        unit:
          type: string
          title: Unit
        kind:
          type: string
          title: Kind
        total:
          type: number
          title: Total
        points:
          items:
            $ref: '#/components/schemas/UsagePoint'
          type: array
          title: Points
      type: object
      required:
      - code
      - unit
      - kind
      - total
      - points
      title: UsageMetricOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    OverageOut:
      properties:
        price_kopecks:
          type: integer
          title: Price Kopecks
        per:
          type: number
          title: Per
      type: object
      required:
      - price_kopecks
      - per
      title: OverageOut
      description: '`price_kopecks` за `per` единиц показателя сверх лимита.'
    OverageChargeOut:
      properties:
        seq:
          type: integer
          title: Seq
        reason:
          type: string
          title: Reason
        status:
          type: string
          title: Status
        covered_through:
          type: string
          format: date
          title: Covered Through
        amount_kopecks:
          type: integer
          title: Amount Kopecks
        due_at:
          type: string
          format: date-time
          title: Due At
        lines:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Lines
      type: object
      required:
      - seq
      - reason
      - status
      - covered_through
      - amount_kopecks
      - due_at
      - lines
      title: OverageChargeOut
    UsageEnforcementOut:
      properties:
        enabled:
          type: boolean
          title: Enabled
        metrics:
          items:
            $ref: '#/components/schemas/UsageQuotaState'
          type: array
          title: Metrics
        plan:
          anyOf:
          - type: string
          - type: 'null'
          title: Plan
        extra_enabled:
          type: boolean
          title: Extra Enabled
          default: false
        card_bound:
          type: boolean
          title: Card Bound
          default: false
        can_enable_extra:
          type: boolean
          title: Can Enable Extra
          default: false
        charging_enabled:
          type: boolean
          title: Charging Enabled
          default: false
        can_manage:
          type: boolean
          title: Can Manage
          default: false
      type: object
      required:
      - enabled
      - metrics
      title: UsageEnforcementOut
    UsageOut:
      properties:
        from_day:
          type: string
          format: date
          title: From Day
        to_day:
          type: string
          format: date
          title: To Day
        period:
          $ref: '#/components/schemas/UsagePeriodOut'
        plan:
          type: string
          title: Plan
        limits:
          additionalProperties:
            type: number
          type: object
          title: Limits
        overage:
          additionalProperties:
            $ref: '#/components/schemas/OverageOut'
          type: object
          title: Overage
        period_totals:
          additionalProperties:
            type: number
          type: object
          title: Period Totals
        period_runtime_measurement:
          $ref: '#/components/schemas/RuntimeMeasurementOut'
        window_runtime_measurement:
          $ref: '#/components/schemas/RuntimeMeasurementOut'
        metrics:
          items:
            $ref: '#/components/schemas/UsageMetricOut'
          type: array
          title: Metrics
        projects:
          items:
            $ref: '#/components/schemas/UsageProjectOut'
          type: array
          title: Projects
        split:
          anyOf:
          - $ref: '#/components/schemas/UsageSplitOut'
          - type: 'null'
        databases:
          items:
            $ref: '#/components/schemas/UsageDatabaseOut'
          type: array
          title: Databases
      type: object
      required:
      - from_day
      - to_day
      - period
      - plan
      - limits
      - overage
      - period_totals
      - period_runtime_measurement
      - window_runtime_measurement
      - metrics
      - projects
      - databases
      title: UsageOut
    OverageSettingsOut:
      properties:
        enabled:
          type: boolean
          title: Enabled
        cap_kopecks:
          type: integer
          title: Cap Kopecks
        on_limit:
          type: string
          title: On Limit
      type: object
      required:
      - enabled
      - cap_kopecks
      - on_limit
      title: OverageSettingsOut
      description: 'Настройки владельца. Нет строки в базе — умолчания: выключено, 1 000 ₽, пауза.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OverageLineOut:
      properties:
        metric:
          type: string
          title: Metric
        title:
          type: string
          title: Title
        included:
          type: number
          title: Included
        price_kopecks:
          type: integer
          title: Price Kopecks
        per:
          type: number
          title: Per
        used_estimate:
          type: number
          title: Used Estimate
        used_sealed:
          type: number
          title: Used Sealed
        accrued_estimate_kopecks:
          type: integer
          title: Accrued Estimate Kopecks
        accrued_sealed_kopecks:
          type: integer
          title: Accrued Sealed Kopecks
        billed_kopecks:
          type: integer
          title: Billed Kopecks
      type: object
      required:
      - metric
      - title
      - included
      - price_kopecks
      - per
      - used_estimate
      - used_sealed
      - accrued_estimate_kopecks
      - accrued_sealed_kopecks
      - billed_kopecks
      title: OverageLineOut
    UsageProjectOut:
      properties:
        project_id:
          type: string
          title: Project Id
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        favicon_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Favicon Url
        totals:
          additionalProperties:
            type: number
          type: object
          title: Totals
        preview_envs:
          type: integer
          title: Preview Envs
          default: 0
        preview_limit:
          type: integer
          title: Preview Limit
          default: 0
      type: object
      required:
      - project_id
      - slug
      - name
      - totals
      title: UsageProjectOut
    UsageQuotaState:
      properties:
        metric:
          type: string
          title: Metric
        period_start:
          type: string
          format: date
          title: Period Start
        period_end:
          type: string
          format: date
          title: Period End
        plan:
          type: string
          title: Plan
        used:
          type: number
          title: Used
        quota:
          type: number
          title: Quota
        state:
          type: string
          title: State
        action:
          type: string
          title: Action
        reason:
          type: string
          title: Reason
        forecast_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Forecast At
        forecast_reason:
          type: string
          title: Forecast Reason
        forecast_sample_days:
          type: integer
          title: Forecast Sample Days
        measured_at:
          type: string
          format: date-time
          title: Measured At
      type: object
      required:
      - metric
      - period_start
      - period_end
      - plan
      - used
      - quota
      - state
      - action
      - reason
      - forecast_at
      - forecast_reason
      - forecast_sample_days
      - measured_at
      title: UsageQuotaState
    OverageStatementOut:
      properties:
        period_start:
          type: string
          format: date
          title: Period Start
        period_end:
          type: string
          format: date
          title: Period End
        status:
          type: string
          title: Status
        shadow:
          type: boolean
          title: Shadow
        cap_kopecks:
          type: integer
          title: Cap Kopecks
        accrued_estimate_kopecks:
          type: integer
          title: Accrued Estimate Kopecks
        accrued_sealed_kopecks:
          type: integer
          title: Accrued Sealed Kopecks
        billable_kopecks:
          type: integer
          title: Billable Kopecks
        billed_kopecks:
          type: integer
          title: Billed Kopecks
        forecast_kopecks:
          anyOf:
          - type: integer
          - type: 'null'
          title: Forecast Kopecks
        sealed_through:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Sealed Through
        summary_at:
          type: string
          format: date-time
          title: Summary At
        final_due_at:
          type: string
          format: date-time
          title: Final Due At
        lines:
          items:
            $ref: '#/components/schemas/OverageLineOut'
          type: array
          title: Lines
        charges:
          items:
            $ref: '#/components/schemas/OverageChargeOut'
          type: array
          title: Charges
      type: object
      required:
      - period_start
      - period_end
      - status
      - shadow
      - cap_kopecks
      - accrued_estimate_kopecks
      - accrued_sealed_kopecks
      - billable_kopecks
      - billed_kopecks
      - forecast_kopecks
      - sealed_through
      - summary_at
      - final_due_at
      - lines
      - charges
      title: OverageStatementOut
      description: Период организации. `period_end` — исключительно (день продления).
    UsageDatabaseOut:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        status:
          type: string
          title: Status
        dedicated:
          type: boolean
          title: Dedicated
        api_enabled:
          type: boolean
          title: Api Enabled
        size_bytes:
          anyOf:
          - type: number
          - type: 'null'
          title: Size Bytes
        quota_bytes:
          anyOf:
          - type: number
          - type: 'null'
          title: Quota Bytes
        connections_peak:
          anyOf:
          - type: integer
          - type: 'null'
          title: Connections Peak
        measured_day:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Measured Day
        dataapi_calls:
          type: number
          title: Dataapi Calls
        dataapi_bytes:
          type: number
          title: Dataapi Bytes
      type: object
      required:
      - id
      - name
      - slug
      - status
      - dedicated
      - api_enabled
      - size_bytes
      - quota_bytes
      - connections_peak
      - measured_day
      - dataapi_calls
      - dataapi_bytes
      title: UsageDatabaseOut