Agenta Billing API

Subscription, plan, and usage endpoints for workspace billing.

Operations 13

POST /billing/stripe/events/ Handle Events #
POST /billing/stripe/portals/ Create Portal User Route #
POST /billing/stripe/checkouts/ Create Checkout User Route #
POST /billing/stripe/topups/ Create Top Up Checkout User Route #
GET /billing/stripe/topups/packs Fetch Top Up Packs User Route #
GET /billing/stripe/topups/{checkout_session_id} Fetch Top Up Purchase User Route #
GET /billing/plans Fetch Plan User Route #
POST /billing/plans/switch Switch Plans User Route #
GET /billing/subscription Fetch Subscription User Route #
POST /billing/subscription/cancel Cancel Subscription User Route #
GET /billing/usage Fetch Usage User Route #
GET /billing/catalog Fetch Catalog #
GET /billing/pricing Fetch Pricing #

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/agenta:agenta-billing-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

agenta-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agenta Billing API
  description: Agenta API
  contact:
    name: Agenta
    url: https://agenta.ai/
    email: team@agenta.ai
  version: 0.1.0
servers:
- url: /api
- url: https://eu.cloud.agenta.ai/api
security:
- APIKeyHeader: []
tags:
- name: Billing
  description: Subscription, plan, and usage endpoints for workspace billing.
paths:
  /billing/stripe/events/:
    post:
      tags:
      - Billing
      summary: Handle Events
      operationId: handle_events
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/stripe/portals/:
    post:
      tags:
      - Billing
      summary: Create Portal User Route
      operationId: create_portal
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/stripe/checkouts/:
    post:
      tags:
      - Billing
      summary: Create Checkout User Route
      operationId: create_checkout
      parameters:
      - name: plan
        in: query
        required: true
        schema:
          type: string
          title: Plan
      - name: success_url
        in: query
        required: true
        schema:
          type: string
          title: Success Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/stripe/topups/:
    post:
      tags:
      - Billing
      summary: Create Top Up Checkout User Route
      operationId: create_top_up_checkout
      parameters:
      - name: pack
        in: query
        required: true
        schema:
          type: string
          title: Pack
      - name: success_url
        in: query
        required: true
        schema:
          type: string
          title: Success Url
      - name: cancel_url
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cancel Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/stripe/topups/packs:
    get:
      tags:
      - Billing
      summary: Fetch Top Up Packs User Route
      operationId: fetch_top_up_packs
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpPacksResponse'
  /billing/stripe/topups/{checkout_session_id}:
    get:
      tags:
      - Billing
      summary: Fetch Top Up Purchase User Route
      operationId: fetch_top_up_purchase
      parameters:
      - name: checkout_session_id
        in: path
        required: true
        schema:
          type: string
          title: Checkout Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpPurchaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/plans:
    get:
      tags:
      - Billing
      summary: Fetch Plan User Route
      operationId: fetch_plans
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/plans/switch:
    post:
      tags:
      - Billing
      summary: Switch Plans User Route
      operationId: switch_plans
      parameters:
      - name: plan
        in: query
        required: true
        schema:
          type: string
          title: Plan
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /billing/subscription:
    get:
      tags:
      - Billing
      summary: Fetch Subscription User Route
      operationId: fetch_subscription
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/subscription/cancel:
    post:
      tags:
      - Billing
      summary: Cancel Subscription User Route
      operationId: cancel_plan
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/usage:
    get:
      tags:
      - Billing
      summary: Fetch Usage User Route
      operationId: fetch_usage
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /billing/catalog:
    get:
      tags:
      - Billing
      summary: Fetch Catalog
      description: 'Return the effective billing catalog with pricing merged in.


        Each entry carries `title`, `description`, `plan`, `type`, `features`,

        and (when configured) a `price` block sourced from the matching

        `AGENTA_BILLING_PRICING` entry. Pre-joining avoids a client-side

        catalog × pricing merge by slug.'
      operationId: fetch_billing_catalog
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  additionalProperties: true
                  type: object
                type: array
                title: Response Fetch Billing Catalog
  /billing/pricing:
    get:
      tags:
      - Billing
      summary: Fetch Pricing
      description: 'Return the effective pricing map: plan slug -> normalized pricing.


        Includes backend-resolved free/trial fallback markers so clients do

        not need to duplicate billing default rules.'
      operationId: fetch_billing_pricing
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  additionalProperties: true
                  type: object
                type: object
                title: Response Fetch Billing Pricing
components:
  schemas:
    TopUpPurchaseResponse:
      properties:
        credited:
          type: boolean
          title: Credited
        credits:
          anyOf:
          - type: integer
          - type: 'null'
          title: Credits
      type: object
      required:
      - credited
      title: TopUpPurchaseResponse
    TopUpPacksResponse:
      properties:
        status:
          type: string
          enum:
          - available
          - paid_plan_required
          - unavailable
          title: Status
        packs:
          items:
            $ref: '#/components/schemas/TopUpPackResponse'
          type: array
          title: Packs
      type: object
      required:
      - status
      - packs
      title: TopUpPacksResponse
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TopUpPackResponse:
      properties:
        code:
          type: string
          title: Code
        credits:
          type: integer
          title: Credits
        price_cents:
          type: integer
          title: Price Cents
        currency:
          type: string
          const: usd
          title: Currency
          default: usd
        expires_after_days:
          type: integer
          title: Expires After Days
      type: object
      required:
      - code
      - credits
      - price_cents
      - expires_after_days
      title: TopUpPackResponse
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header