ScaledThought Billing API

The Billing API from ScaledThought — 7 operation(s) for billing.

GitHub OpenAPI

Operations 7

GET /v1/billing Credit balance, auto-reload settings, pending top-ups, recent ledger #
POST /v1/billing/topup Buy credits ($10 to $2,000, default $20; at most $2,000 per rolling 24 h)… #
GET /v1/billing/topups/{id} Top-up status: pending, paid, expired, failed or canceled #
POST /v1/billing/auto-reload/setup Turn auto-reload on without buying anything: returns an approval_url where your… #
PATCH /v1/billing/auto-reload Disable auto-reload or lower its limits #
GET /v1/billing/transactions The account's credit ledger, newest first #
POST /v1/billing/upgrade Removed: monthly-cap billing was replaced by prepaid 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/scaledthought-com:scaledthought-com-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

scaledthought-com-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ScaledThought control plane Billing API
  version: 0.1.0
  description: Accounts, keys, budgets, usage, prepaid credits (human-approved top-ups), files, batches and models. Inference is OpenAI-compatible at the base_url returned by signup.
servers:
- url: https://api.us.scaledthought.com
  description: us region
tags:
- name: Billing
paths:
  /v1/billing:
    get:
      operationId: getBilling
      summary: Credit balance, auto-reload settings, pending top-ups, recent ledger
      security:
      - apiKey: []
      responses:
        '200':
          description: Billing status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingStatus'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/topup:
    post:
      operationId: createTopup
      summary: Buy credits ($10 to $2,000, default $20; at most $2,000 per rolling 24 h)…
      description: 'Nothing is charged until the human pays. Credits are added only when the payment is confirmed (poll GET /v1/billing/topups/{id}); amount_usd there is what the human chose. On the funding page they can change the amount and turn on auto-reload (recommended); optional auto_reload terms here are pre-selected there (monthly_limit_usd is optional: no monthly limit by default). They accept the Terms of Service and the Credits & Refunds policy at checkout, and we email them a receipt.'
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TopupInput'
      responses:
        '201':
          description: Top-up created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopupCreated'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Too many unpaid approval links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/topups/{id}:
    get:
      operationId: getTopup
      summary: 'Top-up status: pending, paid, expired, failed or canceled'
      security:
      - apiKey: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Top-up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Topup'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/auto-reload/setup:
    post:
      operationId: createAutoReloadSetup
      summary: 'Turn auto-reload on without buying anything: returns an approval_url where your…'
      description: 'Body (all optional): threshold_usd (default 5), amount_usd (default 20), monthly_limit_usd (default: none). The human can change them on the page, accepts the Terms and saves a card (Stripe Checkout, setup mode). Nothing is charged. Poll GET /v1/billing/topups/{id}: kind card_setup, status paid once auto-reload is on.'
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoReloadSetupInput'
      responses:
        '201':
          description: Auto-reload setup link created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopupCreated'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Too many unpaid approval links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/auto-reload:
    patch:
      operationId: updateAutoReload
      summary: Disable auto-reload or lower its limits
      description: 'Enabling it or raising the threshold, amount or monthly limit returns 403 approval_required: create an auto-reload setup link (POST /v1/billing/auto-reload/setup) instead, so the human approves them.'
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAutoReloadInput'
      responses:
        '200':
          description: Auto-reload settings
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: approval_required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/transactions:
    get:
      operationId: listCreditTransactions
      summary: The account's credit ledger, newest first
      security:
      - apiKey: []
      parameters:
      - name: cursor
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: Transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsPage'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired (code key_expired) API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '421':
          description: Key belongs to another region
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
  /v1/billing/upgrade:
    post:
      operationId: upgradeBilling
      deprecated: true
      summary: 'Removed: monthly-cap billing was replaced by prepaid credits.'
      security:
      - apiKey: []
      responses:
        '410':
          description: gone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Billing
components:
  schemas:
    TransactionsPage:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        object:
          type: string
          const: list
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              kind:
                type: string
                enum:
                - purchase
                - auto_reload
                - grant
                - usage
                - batch
                - fine_tune
                - refund
                - adjustment
                - dispute_hold
                - dispute_release
                - video
                - promo
                - promo_expire
                - trial
                - trial_expire
                - review
                - internal_grant
                - customer_grant
              amount_usd:
                type: number
              amount_micros:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              balance_after_usd:
                type: number
              created_at:
                type: string
              topup_id:
                type:
                - string
                - 'null'
              request_id:
                type:
                - string
                - 'null'
              batch_id:
                type:
                - string
                - 'null'
              fine_tune_job_id:
                type:
                - string
                - 'null'
              reason:
                type:
                - string
                - 'null'
            required:
            - id
            - kind
            - amount_usd
            - amount_micros
            - balance_after_usd
            - created_at
            - topup_id
            - request_id
            - batch_id
            - fine_tune_job_id
            - reason
            additionalProperties: false
        next_cursor:
          type:
          - string
          - 'null'
      required:
      - object
      - data
      - next_cursor
      additionalProperties: false
    UpdateAutoReloadInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        enabled:
          type: boolean
        threshold_usd:
          type: number
          minimum: 5
          maximum: 2000
        amount_usd:
          type: number
          minimum: 10
          maximum: 2000
        monthly_limit_usd:
          type: number
          exclusiveMinimum: 0
      additionalProperties: false
    TopupCreated:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        topup_id:
          type: string
        kind:
          type: string
          enum:
          - checkout
          - card_setup
        approval_url:
          type: string
        amount_usd:
          type: number
        expires_at:
          type: string
        auto_reload:
          anyOf:
          - type: object
            properties:
              threshold_usd:
                type: number
              amount_usd:
                type: number
              monthly_limit_usd:
                type:
                - number
                - 'null'
            required:
            - threshold_usd
            - amount_usd
            - monthly_limit_usd
            additionalProperties: false
          - type: 'null'
        instructions:
          type: string
        terms_version:
          type: string
        terms_url:
          type: string
        refund_policy_url:
          type: string
      required:
      - topup_id
      - kind
      - approval_url
      - amount_usd
      - expires_at
      - auto_reload
      - instructions
      - terms_version
      - terms_url
      - refund_policy_url
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
              - string
              - 'null'
          required:
          - message
          - type
          - code
      required:
      - error
    AutoReloadSetupInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        threshold_usd:
          default: 5
          type: number
          minimum: 5
          maximum: 2000
        amount_usd:
          default: 20
          type: number
          minimum: 10
          maximum: 2000
        monthly_limit_usd:
          type: number
          exclusiveMinimum: 0
      additionalProperties: false
    TopupInput:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        amount_usd:
          default: 20
          description: USD to add, 10 to 2,000 (default 20; at most 2,000 per account per rolling 24 h, auto-reloads included). The human can change it on the funding page
          type: number
          minimum: 10
          maximum: 2000
        auto_reload:
          description: 'Suggest these auto-reload terms: the funding page shows them ticked. Without it the page offers auto-reload (below 5, add 20), unticked. Only the human turns it on'
          type: object
          properties:
            threshold_usd:
              type: number
              minimum: 5
              maximum: 2000
              description: Reload when the credit balance drops below this (at least 5)
            amount_usd:
              type: number
              minimum: 10
              maximum: 2000
              description: How much each reload buys
            monthly_limit_usd:
              description: 'Optional: most auto-reloads may charge per calendar month (UTC). Default: no monthly limit (loads are still limited to 2,000 per rolling 24 h)'
              type: number
              exclusiveMinimum: 0
          required:
          - threshold_usd
          - amount_usd
          additionalProperties: false
      additionalProperties: false
    Topup:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        topup_id:
          type: string
        kind:
          type: string
          enum:
          - checkout
          - auto_reload
          - card_setup
        status:
          type: string
          enum:
          - pending
          - paid
          - expired
          - failed
          - canceled
        amount_usd:
          type: number
        approval_url:
          type:
          - string
          - 'null'
        expires_at:
          type:
          - string
          - 'null'
        created_at:
          type: string
        completed_at:
          type:
          - string
          - 'null'
        failure_code:
          type:
          - string
          - 'null'
        auto_reload:
          anyOf:
          - type: object
            properties:
              threshold_usd:
                type: number
              amount_usd:
                type: number
              monthly_limit_usd:
                type:
                - number
                - 'null'
            required:
            - threshold_usd
            - amount_usd
            - monthly_limit_usd
            additionalProperties: false
          - type: 'null'
      required:
      - topup_id
      - kind
      - status
      - amount_usd
      - approval_url
      - expires_at
      - created_at
      - completed_at
      - failure_code
      - auto_reload
      additionalProperties: false
    BillingStatus:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        balance_usd:
          type: number
        auto_reload:
          type: object
          properties:
            enabled:
              type: boolean
            threshold_usd:
              type:
              - number
              - 'null'
            amount_usd:
              type:
              - number
              - 'null'
            monthly_limit_usd:
              type:
              - number
              - 'null'
            used_this_month_usd:
              type: number
            disabled_reason:
              type:
              - string
              - 'null'
          required:
          - enabled
          - threshold_usd
          - amount_usd
          - monthly_limit_usd
          - used_this_month_usd
          - disabled_reason
          additionalProperties: false
        pending_topups:
          type: array
          items:
            type: object
            properties:
              topup_id:
                type: string
              kind:
                type: string
                enum:
                - checkout
                - auto_reload
                - card_setup
              status:
                type: string
                enum:
                - pending
                - paid
                - expired
                - failed
                - canceled
              amount_usd:
                type: number
              approval_url:
                type:
                - string
                - 'null'
              expires_at:
                type:
                - string
                - 'null'
              created_at:
                type: string
              completed_at:
                type:
                - string
                - 'null'
              failure_code:
                type:
                - string
                - 'null'
              auto_reload:
                anyOf:
                - type: object
                  properties:
                    threshold_usd:
                      type: number
                    amount_usd:
                      type: number
                    monthly_limit_usd:
                      type:
                      - number
                      - 'null'
                  required:
                  - threshold_usd
                  - amount_usd
                  - monthly_limit_usd
                  additionalProperties: false
                - type: 'null'
            required:
            - topup_id
            - kind
            - status
            - amount_usd
            - approval_url
            - expires_at
            - created_at
            - completed_at
            - failure_code
            - auto_reload
            additionalProperties: false
        recent_transactions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              kind:
                type: string
                enum:
                - purchase
                - auto_reload
                - grant
                - usage
                - batch
                - fine_tune
                - refund
                - adjustment
                - dispute_hold
                - dispute_release
                - video
                - promo
                - promo_expire
                - trial
                - trial_expire
                - review
                - internal_grant
                - customer_grant
              amount_usd:
                type: number
              amount_micros:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              balance_after_usd:
                type: number
              created_at:
                type: string
              topup_id:
                type:
                - string
                - 'null'
              request_id:
                type:
                - string
                - 'null'
              batch_id:
                type:
                - string
                - 'null'
              fine_tune_job_id:
                type:
                - string
                - 'null'
              reason:
                type:
                - string
                - 'null'
            required:
            - id
            - kind
            - amount_usd
            - amount_micros
            - balance_after_usd
            - created_at
            - topup_id
            - request_id
            - batch_id
            - fine_tune_job_id
            - reason
            additionalProperties: false
      required:
      - balance_usd
      - auto_reload
      - pending_topups
      - recent_transactions
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: st_{region}_{env}_… key
    anthropicApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: st_{region}_{env}_… key