Plith Billing API

Credit balance and Stripe checkout

GitHub OpenAPI

Operations 2

GET /api/billing/balance Returns the current credit balance for the authenticated organization #
POST /api/billing/checkout Creates a Stripe Checkout session for purchasing credits #

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/plith-ai:plith-ai-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. 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

plith-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plith Ai Billing API
  version: 1.0.0
  contact:
    email: support@plith.ai
    url: https://plith.ai/docs
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: 'Operations tagged Billing across 2 of this provider''s published API definitions: openapi.json, plith-ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://plith.ai
  description: Production
security: []
tags:
- name: Billing
  description: Credit balance and Stripe checkout
paths:
  /api/billing/balance:
    get:
      summary: Returns the current credit balance for the authenticated organization
      operationId: billingBalance
      tags:
      - Billing
      description: 'Auth: Required (x-api-key). Cost: Free. Full request and response contract: https://plith.ai/docs/api-reference'
      responses:
        '200':
          description: Current credit balance
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance:
                    type: integer
                    description: Current credit balance.
                  org_id:
                    type: string
                    format: uuid
                  request_id:
                    type: string
                  credits_used:
                    type: integer
                    example: 0
                  credits_remaining:
                    type: integer
                    description: Same as balance.
                  fallback_behavior:
                    type: string
                    example: none
        '401':
          $ref: '#/components/responses/401'
        '500':
          $ref: '#/components/responses/500'
      security:
      - ApiKeyAuth: []
      x-plith-reference-synced: true
    servers:
    - url: https://plith.ai
      description: Production
  /api/billing/checkout:
    post:
      summary: Creates a Stripe Checkout session for purchasing credits
      operationId: billingCheckout
      security:
      - ApiKeyAuth: []
      tags:
      - Billing
      description: 'Auth: Required (x-api-key). Cost: Free. Full request and response contract: https://plith.ai/docs/api-reference'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Exactly one of pack or custom_amount. The org is the API key's org.
              oneOf:
              - type: object
                required:
                - pack
                additionalProperties: false
                properties:
                  pack:
                    type: integer
                    enum:
                    - 10
                    - 25
                    - 100
                    - 250
                    description: USD price of the pack. 1,000 credits per dollar.
              - type: object
                required:
                - custom_amount
                additionalProperties: false
                properties:
                  custom_amount:
                    type: integer
                    minimum: 5
                    maximum: 10000
                    description: USD amount, 5 to 10,000. 1,000 credits per dollar.
      responses:
        '200':
          description: Stripe Checkout session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: Stripe Checkout URL. Redirect the user here to complete payment.
        '400':
          description: Missing org_id or invalid pack value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/401'
        '503':
          description: Billing not configured (Stripe keys missing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-plith-reference-synced: true
    servers:
    - url: https://plith.ai
      description: Production
components:
  responses:
    '401':
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - error
      - message
      - request_id
      - status
      properties:
        error:
          type: string
          example: invalid_request
        message:
          type: string
          example: task_description is required.
        request_id:
          type: string
        status:
          type: integer
          example: 400
        fix:
          type: string
          nullable: true
        docs:
          type: string
          format: uri
        support:
          type: string
          example: support@plith.ai
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Optional for MCP read-only tools. Required for tools that write data or cost credits. Get one free: curl -X POST https://plith.ai/api/keys'
x-refined-from:
- openapi.json
- plith-ai-openapi.json