tenzro-xyz Billing API

The Billing API from tenzro-xyz — 14 operation(s) for billing.

Operations 16

GET /billing/prices Price table #
GET /billing/tiers Usage tiers #
GET /billing Balance, tier and limits #
GET /billing/usage Usage and cost #
GET /billing/usage.csv Usage export (CSV) #
GET /billing/limits Spend limits #
POST /billing/limits Set the account's spend limit #
POST /billing/keys/{id}/limit Set a key's monthly limit #
GET /billing/auto-reload Automatic top-ups #
POST /billing/auto-reload Set automatic top-ups #
GET /billing/alerts Billing alerts #
GET /billing/receipts Receipts #
GET /billing/receipts/{id} One receipt #
GET /billing/statements Statement months #
GET /billing/statements/{month} Monthly statement #
POST /billing/invoicing Request invoiced billing #

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/tenzro-xyz:tenzro-xyz-billing-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

tenzro-xyz-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tenzro Labs Platform Billing API
  version: 1.0.0
  description: Browse the curated catalogue; manage credits, billing, keys, plans and rentals; place and pay orders; run Datasets, Fieldwork, Voices and Forecasts. Chat, embeddings, images, speech and the model list keep the OpenAI-compatible /v1 paths.
servers:
- url: https://api.tenzro.xyz
security:
- apiKey: []
tags:
- name: Billing
paths:
  /billing/prices:
    get:
      tags:
      - Billing
      summary: Price table
      description: 'Every service and model price in credits, with monthly allowances per plan and the one-time trial.


        No key needed.'
      operationId: getBillingPrices
      x-tenzro-scope: public
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                unit: credits
                services:
                - service: voices.speak
                  group: Voices
                  name: Speech
                  unit: 1k_chars
                  unit_label: 1,000 characters
                  credits_per_unit: 15
                  allowances:
                    free: 10
                    builder: 500
                    scale: 5000
                    trial: 50
                models:
                - model: qwen3.5-4b
                  service: text
                  input_credits_per_mtok: 50
                  output_credits_per_mtok: 300
                  credits_per_request: 0
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/tiers:
    get:
      tags:
      - Billing
      summary: Usage tiers
      description: 'Credits bought in total raise an account''s tier, which raises its requests per minute per key and its monthly spend limit.


        No key needed.'
      operationId: getBillingTiers
      x-tenzro-scope: public
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                data:
                - tier: 1
                  name: Tier 1
                  purchased_credits: 5000
                  rpm: 50
                  monthly_limit_credits: 100000
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing:
    get:
      tags:
      - Billing
      summary: Balance, tier and limits
      description: 'Credits as the main figure, with TNZO and the USD equivalent at the purchase rate; usage tier; this month''s spend against its limit; automatic top-ups.


        Needs a key with the `read` permission.'
      operationId: getBilling
      x-tenzro-scope: read
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                balance:
                  credits: 12500
                  tnzo: 12.5
                  usd: 12.5
                usage_tier:
                  tier: 1
                  name: Tier 1
                  rpm: 50
                  monthly_limit_credits: 100000
                  purchased_credits: 25000
                  next:
                    tier: 2
                    name: Tier 2
                    purchased_credits: 40000
                    rpm: 1000
                    monthly_limit_credits: 500000
                month:
                  spent_credits: 2310.5
                  limit_credits: 100000
                  own_limit_credits: null
                  alert_points:
                  - 50
                  - 80
                  - 100
                auto_reload:
                  enabled: true
                  threshold_credits: 2000
                  amount_usd: 25
                  card: visa ending 4242
                  last_error: null
                invoicing: null
                charging:
                  open: true
                  reason: null
                  starts_at: null
                credits_per_usd: 1000
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/usage:
    get:
      tags:
      - Billing
      summary: Usage and cost
      description: 'Usage grouped by day, service, model, key or agent, with list and charged credits.


        Needs a key with the `read` permission.'
      operationId: getBillingUsage
      x-tenzro-scope: read
      parameters:
      - name: group_by
        in: query
        required: false
        description: day, service, model, key or agent (default day).
        schema:
          type: string
          enum:
          - day
          - service
          - model
          - key
          - agent
      - name: from
        in: query
        required: false
        description: 'First day, YYYY-MM-DD (UTC). Default: the first of this month.'
        schema:
          type: string
      - name: to
        in: query
        required: false
        description: 'Last day, YYYY-MM-DD (UTC), inclusive. Default: today.'
        schema:
          type: string
      - name: month
        in: query
        required: false
        description: A whole month, YYYY-MM, instead of from/to.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                from: '2026-10-01T00:00:00.000Z'
                to: '2026-10-12T00:00:00.000Z'
                group_by: service
                data:
                - key: text
                  label: Text
                  calls: 1204
                  list_credits: 812.4
                  credits: 812.4
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/usage.csv:
    get:
      tags:
      - Billing
      summary: Usage export (CSV)
      description: 'Every usage record in the range as CSV, or one grouping when group_by is set. Optional key and service filters.


        Needs a key with the `read` permission.'
      operationId: getBillingUsageCsv
      x-tenzro-scope: read
      parameters:
      - name: group_by
        in: query
        required: false
        description: Export one grouping instead of every record.
        schema:
          type: string
          enum:
          - day
          - service
          - model
          - key
          - agent
      - name: from
        in: query
        required: false
        description: 'First day, YYYY-MM-DD (UTC). Default: the first of this month.'
        schema:
          type: string
      - name: to
        in: query
        required: false
        description: 'Last day, YYYY-MM-DD (UTC), inclusive. Default: today.'
        schema:
          type: string
      - name: month
        in: query
        required: false
        description: A whole month, YYYY-MM, instead of from/to.
        schema:
          type: string
      - name: key
        in: query
        required: false
        description: Only this key's usage.
        schema:
          type: string
      - name: service
        in: query
        required: false
        description: Only this service.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              example: time_utc,service,model,unit,quantity,key_id,agent_id,from_allowance,from_trial,list_credits,credits,ref
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/limits:
    get:
      tags:
      - Billing
      summary: Spend limits
      description: 'This month''s spend and limit, and each key''s monthly limit.


        Needs a key with the `read` permission.'
      operationId: getBillingLimits
      x-tenzro-scope: read
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                month:
                  spent_credits: 2310.5
                  limit_credits: 100000
                  own_limit_credits: null
                  alert_points:
                  - 50
                  - 80
                  - 100
                usage_tier:
                  tier: 1
                  name: Tier 1
                  rpm: 50
                  monthly_limit_credits: 100000
                  purchased_credits: 25000
                  next:
                    tier: 2
                    name: Tier 2
                    purchased_credits: 40000
                    rpm: 1000
                    monthly_limit_credits: 500000
                keys:
                - key_id: key_...
                  name: Production
                  monthly_limit_credits: 20000
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Billing
      summary: Set the account's spend limit
      description: 'monthly_limit_credits (null for the tier''s limit; never above it), alert_points (percentages), alert_email. Priced calls stop at the limit.


        Needs a key with the `manage` permission.'
      operationId: postBillingLimits
      x-tenzro-scope: manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                monthly_limit_credits:
                  type:
                  - number
                  - 'null'
                alert_points:
                  type: array
                  items:
                    type: integer
                alert_email:
                  type: boolean
            example:
              monthly_limit_credits: 50000
              alert_points:
              - 50
              - 80
              - 100
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                month:
                  spent_credits: 2310.5
                  limit_credits: 100000
                  own_limit_credits: null
                  alert_points:
                  - 50
                  - 80
                  - 100
                usage_tier:
                  tier: 1
                  name: Tier 1
                  rpm: 50
                  monthly_limit_credits: 100000
                  purchased_credits: 25000
                  next:
                    tier: 2
                    name: Tier 2
                    purchased_credits: 40000
                    rpm: 1000
                    monthly_limit_credits: 500000
                keys: []
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/keys/{id}/limit:
    post:
      tags:
      - Billing
      summary: Set a key's monthly limit
      description: 'monthly_limit_credits for one key, or null to remove it. The key''s priced calls stop at its limit.


        Needs a key with the `manage` permission.'
      operationId: postBillingKeysByIdLimit
      x-tenzro-scope: manage
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                monthly_limit_credits:
                  type:
                  - number
                  - 'null'
            example:
              monthly_limit_credits: 20000
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                month:
                  spent_credits: 2310.5
                  limit_credits: 100000
                  own_limit_credits: null
                  alert_points:
                  - 50
                  - 80
                  - 100
                usage_tier:
                  tier: 1
                  name: Tier 1
                  rpm: 50
                  monthly_limit_credits: 100000
                  purchased_credits: 25000
                  next:
                    tier: 2
                    name: Tier 2
                    purchased_credits: 40000
                    rpm: 1000
                    monthly_limit_credits: 500000
                keys:
                - key_id: key_...
                  name: Production
                  monthly_limit_credits: 20000
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/auto-reload:
    get:
      tags:
      - Billing
      summary: Automatic top-ups
      description: Needs a key with the `read` permission.
      operationId: getBillingAutoReload
      x-tenzro-scope: read
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                enabled: true
                threshold_credits: 2000
                amount_usd: 25
                card: visa ending 4242
                last_error: null
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Billing
      summary: Set automatic top-ups
      description: 'enabled, threshold_credits (top up when the balance falls below it) and amount_usd. The card is saved by a person on the Billing page.


        Needs a key with the `manage` permission.'
      operationId: postBillingAutoReload
      x-tenzro-scope: manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                threshold_credits:
                  type: number
                amount_usd:
                  type: integer
            example:
              enabled: true
              threshold_credits: 2000
              amount_usd: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                enabled: true
                threshold_credits: 2000
                amount_usd: 25
                card: visa ending 4242
                last_error: null
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/alerts:
    get:
      tags:
      - Billing
      summary: Billing alerts
      description: 'Spend passing its alert points, limits reached, low balance, automatic top-ups paid or failed.


        Needs a key with the `read` permission.'
      operationId: getBillingAlerts
      x-tenzro-scope: read
      parameters:
      - name: limit
        in: query
        required: false
        description: At most this many (default 50, max 200).
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                data:
                - id: '12'
                  kind: org_spend
                  target: null
                  period: 2026-10
                  point: 80
                  message: This month's spend passed 80% of its 100,000 credits limit.
                  seen: false
                  created_at: '2026-10-11T09:12:00.000Z'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/receipts:
    get:
      tags:
      - Billing
      summary: Receipts
      description: 'One receipt per paid purchase: top-ups, automatic top-ups and plan payments.


        Needs a key with the `read` permission.'
      operationId: getBillingReceipts
      x-tenzro-scope: read
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                data:
                - id: ord_...
                  kind: credits
                  title: Credit top-up · any machine
                  status: paid
                  paid_at: '2026-10-11T09:00:00.000Z'
                  amount:
                    value: 25
                    currency: USD
                    text: $25.00
                  credits: 25000
                  paid_with: Card
                  auto_reload: false
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/receipts/{id}:
    get:
      tags:
      - Billing
      summary: One receipt
      description: Needs a key with the `read` permission.
      operationId: getBillingReceiptsById
      x-tenzro-scope: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                id: ord_...
                kind: credits
                title: Credit top-up · any machine
                status: paid
                paid_at: '2026-10-11T09:00:00.000Z'
                amount:
                  value: 25
                  currency: USD
                  text: $25.00
                credits: 25000
                paid_with: Card
                auto_reload: false
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/statements:
    get:
      tags:
      - Billing
      summary: Statement months
      description: Needs a key with the `read` permission.
      operationId: getBillingStatements
      x-tenzro-scope: read
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                data:
                - month: 2026-10
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/statements/{month}:
    get:
      tags:
      - Billing
      summary: Monthly statement
      description: 'Opening balance, credits bought and granted, usage by service, closing balance and the month''s payments. Add ?format=csv for CSV.


        Needs a key with the `read` permission.'
      operationId: getBillingStatementsByMonth
      x-tenzro-scope: read
      parameters:
      - name: month
        in: path
        required: true
        schema:
          type: string
      - name: format
        in: query
        required: false
        description: csv for a CSV document.
        schema:
          type: string
          enum:
          - json
          - csv
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                month: 2026-10
                opening_credits: 0
                added:
                  purchased_credits: 25000
                  plan_credits: 0
                used_credits: 2310.5
                usage_by_service:
                - service: text
                  name: Text
                  calls: 1204
                  list_credits: 812.4
                  credits: 812.4
                other_usage_credits: 0
                closing_credits: 22689.5
                payments: []
                payments_total_usd: 25
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /billing/invoicing:
    post:
      tags:
      - Billing
      summary: Request invoiced billing
      description: 'For larger customers: asks Tenzro Labs to bill monthly by invoice. A person reviews and approves it.


        Needs a key with the `manage` permission.'
      operationId: postBillingInvoicing
      x-tenzro-scope: manage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
            example:
              note: About 5M credits a month from November.
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                invoicing: requested
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            scope:
              type: string
              description: 'On a 403: the permission the key lacks.'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: A Tenzro Labs API key (tzl_…).
    ingestKey:
      type: http
      scheme: bearer
      description: 'A Fieldwork ingest key (tzi_…): bound to one project and the origins listed on it, able only to run the participant flow. Safe in a browser. Create it with POST /fieldwork/projects/{id}/ingest-keys.'
    serviceAssertion:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'A Tenzro Labs service''s ES256 assertion: header kid = the RFC 7638 thumbprint of a key in the service''s published JWKS; iss = sub = the service; aud = this endpoint; exp at most 60 s after iat; jti used once.'