LLM Broker Account & payment API

The Account & payment API from LLM Broker — 7 operation(s) for account & payment.

GitHub OpenAPI

Operations 9

POST /api/v1/broker/accounts Buy an account via API (no login) #
GET /api/v1/broker/accounts/{session_id} Poll purchase status / collect the key #
GET /api/v1/broker/billing Billing status #
PATCH /api/v1/broker/billing Change billing mode or amount #
DELETE /api/v1/broker/card Remove card #
POST /api/v1/broker/card Add or replace card #
GET /api/v1/broker/currencies Currencies you can see prices in and pay with #
GET /api/v1/broker/models Market models (for model and routing) #
GET /api/v1/broker/recommend Recommend a model for a task (free, no key) #

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/llm-broker-net:llm-broker-net-account-payment-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

llm-broker-net-account-payment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'One OpenAI-compatible key for our own models and the market; each request is routed to the cheapest offer that meets its `routing` criteria. The `/v1/...` prefix is an alias of `/api/v1/...`. Docs: https://llm-broker.net/llms.txt'
  title: LLM Broker Account & payment API
  version: 1.0.0
servers:
- url: https://api.llm-broker.net
  variables: {}
security: []
tags:
- name: Account & payment
paths:
  /api/v1/broker/accounts:
    post:
      callbacks: {}
      description: 'Creates a Stripe checkout (card only). Enter the card, then poll status_url: the key appears exactly once. No free credit — money before key. 10 purchases per IP and hour. Same API on llm-broker.net and astrioncore.app. Agents with a Stripe Shared Payment Token pass `shared_payment_token` (+ accept_terms, email) and get the key in the 201 response — no browser.'
      operationId: AstrionWeb.BrokerApiController.create_account
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrokerCreateAccountRequest'
        description: Purchase choice
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerCreateAccountResponse'
          description: Checkout created — or, with shared_payment_token, the paid key (api_key, shown once)
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Invalid choice, level, token or missing terms
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Shared payment token unusable or payment failed
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Level not available today, or token already used
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Rate limited, or card limit (payment refunded)
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Payment provider unavailable
      security: []
      summary: Buy an account via API (no login)
      tags:
      - Account & payment
  /api/v1/broker/accounts/{session_id}:
    get:
      callbacks: {}
      description: 202 while payment is open, 200 with the key exactly once, then 410.
      operationId: AstrionWeb.BrokerApiController.account
      parameters:
      - description: from POST /api/v1/broker/accounts
        in: path
        name: session_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerAccountKey'
          description: Key (exactly once)
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerAccountPending'
          description: Payment pending
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Unknown session
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Already collected
      security: []
      summary: Poll purchase status / collect the key
      tags:
      - Account & payment
  /api/v1/broker/billing:
    get:
      callbacks: {}
      description: Balance, monthly spend, card, top-up rule. With the ast_sk_ key of the broker account.
      operationId: AstrionWeb.BrokerApiController.billing
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerBillingStatus'
          description: Status
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Not a broker key
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Not a broker account
      security:
      - apiKeyAuth: []
      summary: Billing status
      tags:
      - Account & payment
    patch:
      callbacks: {}
      description: topup with amount 10/25/50 or monthly with limit 50/100/250. Requires a card on file. monthly → topup needs a settled balance; one monthly credit limit per card.
      operationId: AstrionWeb.BrokerApiController.update_billing
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrokerUpdateBillingRequest'
        description: New choice
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerBillingStatus'
          description: New status
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Invalid choice
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: No card, outstanding balance, or card limit taken
      security:
      - apiKeyAuth: []
      summary: Change billing mode or amount
      tags:
      - Account & payment
  /api/v1/broker/card:
    delete:
      callbacks: {}
      operationId: AstrionWeb.BrokerApiController.card_delete
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerBillingStatus'
          description: New status
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Not a broker key
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Outstanding balance
      security:
      - apiKeyAuth: []
      summary: Remove card
      tags:
      - Account & payment
    post:
      callbacks: {}
      description: Returns a Stripe setup link; only Stripe sees the card number.
      operationId: AstrionWeb.BrokerApiController.card_create
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerCardSetup'
          description: Setup link
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Not a broker key
      security:
      - apiKeyAuth: []
      summary: Add or replace card
      tags:
      - Account & payment
  /api/v1/broker/currencies:
    get:
      callbacks: {}
      description: 'Every currency Stripe accepts for us that has a fresh daily rate, with the allowed top-up amounts and monthly limits in that currency (whole units). Rates: ECB euro reference rates; other currencies ExchangeRate-API (https://www.exchangerate-api.com). Internal ledger stays in CHF. No key needed.'
      operationId: AstrionWeb.BrokerApiController.currencies
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: Currencies
      security: []
      summary: Currencies you can see prices in and pay with
      tags:
      - Account & payment
  /api/v1/broker/models:
    get:
      callbacks: {}
      description: Every model you can name in `model` on POST /api/v1/chat/completions, served by the cheapest eligible provider without harness. Price = customer price in CHF per 1M tokens (incl. our margin); scores = our own measurements per category (0..1, only where measured) — the basis for `routing.min_score`. No key needed.
      operationId: AstrionWeb.BrokerApiController.models
      parameters:
      - description: 'Price currency (ISO 4217, default USD): any code from GET /api/v1/broker/currencies — converted at the daily rate (ECB, else ExchangeRate-API); internal ledger stays in CHF'
        in: query
        name: currency
        required: false
        schema:
          type: string
      - description: 'Model type: chat (default, LLM), image (POST /api/v1/images/generations), speech (POST /api/v1/audio/speech), transcription (POST /api/v1/audio/transcriptions), video (POST /api/v1/videos). Media rows carry exactly one price: per_image, per_1k_characters, per_minute or per_second; own products have own: true'
        in: query
        name: type
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerMarketModels'
          description: Market models
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Unknown currency or type
      security: []
      summary: Market models (for model and routing)
      tags:
      - Account & payment
  /api/v1/broker/recommend:
    get:
      callbacks: {}
      description: 'Picks from the published catalog — our own benchmark scores and list prices: best = highest score in the category, best_value = score per output price, plus alternatives and a ready `routing` object for POST /api/v1/chat/completions. Only measured models are recommended. No key needed.'
      operationId: AstrionWeb.BrokerApiController.recommend
      parameters:
      - description: coding, reasoning, math, …
        in: query
        name: category
        required: true
        schema:
          type: string
      - description: Max output price per 1M tokens, in currency
        in: query
        name: max_price_per_mtok
        required: false
        schema:
          type: number
      - description: 0..1
        in: query
        name: min_score
        required: false
        schema:
          type: number
      - description: ch, eu, us, asia, global
        in: query
        name: region
        required: false
        schema:
          type: string
      - description: Comma-separated, e.g. tools,vision
        in: query
        name: capabilities
        required: false
        schema:
          type: string
      - description: ISO 4217, default USD
        in: query
        name: currency
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerRecommendation'
          description: Recommendation
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: Unknown category
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerError'
          description: No measured model within these limits
      security: []
      summary: Recommend a model for a task (free, no key)
      tags:
      - Account & payment
components:
  schemas:
    BrokerAccountKey:
      properties:
        api_key:
          description: ast_sk_… — shown exactly once. Use with base_url and model taylor (OpenAI-compatible).
          type: string
        base_url:
          format: uri
          type: string
        billing:
          enum:
          - topup
          - monthly
          type: string
        category:
          description: null = no default level
          type:
          - string
          - 'null'
        level:
          description: null = no default level
          type:
          - string
          - 'null'
        model:
          example: taylor
          type: string
        note:
          type: string
      required:
      - api_key
      - base_url
      - model
      title: BrokerAccountKey
      type: object
    BrokerCreateAccountResponse:
      properties:
        checkout_url:
          description: Stripe checkout (card only) — a human or an agent with a browser enters the card.
          format: uri
          type: string
        note:
          type: string
        session_id:
          description: Secret — whoever knows it collects the key. Do not log.
          type: string
        status_url:
          format: uri
          type: string
      required:
      - checkout_url
      - session_id
      - status_url
      title: BrokerCreateAccountResponse
      type: object
    BrokerCreateAccountRequest:
      example:
        amount: 25
        billing: topup
        category: coding
        level: strong
      properties:
        accept_terms:
          description: 'Required with shared_payment_token: you accept https://llm-broker.net/terms.'
          type: boolean
        amount:
          description: Top-up in `currency` (default CHF) — required when billing=topup. Credited in CHF at the ECB daily rate of the checkout.
          enum:
          - 10
          - 25
          - 50
          type: integer
        billing:
          description: topup = prepaid credit (requires amount), monthly = monthly invoice (requires limit). Omit billing entirely for a topup of the smallest amount of the currency.
          enum:
          - topup
          - monthly
          type: string
        category:
          description: Optional default of the key (with level). Omit both to choose per request with routing.
          enum:
          - coding
          - reasoning
          - math
          - instruction_following
          type: string
        currency:
          default: USD
          description: Payment currency (default USD). The card is charged in it; your balance is kept in CHF (ECB daily rate).
          enum:
          - USD
          - EUR
          - CHF
          - GBP
          - JPY
          - CNY
          - AED
          - AFN
          - ALL
          - AMD
          - ANG
          - AOA
          - ARS
          - AUD
          - AWG
          - AZN
          - BAM
          - BBD
          - BDT
          - BIF
          - BMD
          - BND
          - BOB
          - BRL
          - BSD
          - BWP
          - BYN
          - BZD
          - CAD
          - CDF
          - CLP
          - COP
          - CRC
          - CVE
          - CZK
          - DJF
          - DKK
          - DOP
          - DZD
          - EGP
          - ETB
          - FJD
          - FKP
          - GEL
          - GIP
          - GMD
          - GNF
          - GTQ
          - GYD
          - HKD
          - HNL
          - HTG
          - HUF
          - IDR
          - ILS
          - INR
          - ISK
          - JMD
          - KES
          - KGS
          - KHR
          - KMF
          - KRW
          - KYD
          - KZT
          - LAK
          - LBP
          - LKR
          - LRD
          - LSL
          - MAD
          - MDL
          - MGA
          - MKD
          - MMK
          - MNT
          - MOP
          - MUR
          - MVR
          - MWK
          - MXN
          - MYR
          - MZN
          - NAD
          - NGN
          - NIO
          - NOK
          - NPR
          - NZD
          - PAB
          - PEN
          - PGK
          - PHP
          - PKR
          - PLN
          - PYG
          - QAR
          - RON
          - RSD
          - RUB
          - RWF
          - SAR
          - SBD
          - SCR
          - SEK
          - SGD
          - SHP
          - SLE
          - SOS
          - SRD
          - SZL
          - THB
          - TJS
          - TOP
          - TRY
          - TTD
          - TWD
          - TZS
          - UAH
          - UGX
          - UYU
          - UZS
          - VND
          - VUV
          - WST
          - XAF
          - XCD
          - XCG
          - XOF
          - XPF
          - YER
          - ZAR
          - ZMW
          type: string
        email:
          description: 'Required with shared_payment_token: the responsible person or company.'
          format: email
          type: string
        level:
          description: Optional default level of the key (with category); every request can override it with routing.level or routing.min_score. Only one of category/level ⇒ 400.
          enum:
          - solid
          - strong
          - top
          - best
          type: string
        limit:
          description: Monthly limit in `currency` (default CHF) — required when billing=monthly.
          enum:
          - 50
          - 100
          - 250
          type: integer
        shared_payment_token:
          description: 'Stripe Shared Payment Token (spt_…) issued to LLM Broker by your agent platform: pays the topup without a browser and returns the key immediately (201). Needs accept_terms and email. Topup only; one token pays once; at most 3 accounts per card per day.'
          type: string
      title: BrokerCreateAccountRequest
      type: object
    BrokerCardSetup:
      properties:
        session_id:
          type: string
        setup_url:
          format: uri
          type: string
      required:
      - setup_url
      title: BrokerCardSetup
      type: object
    BrokerRecommendation:
      properties:
        alternatives:
          items:
            type: object
          type: array
        basis:
          type: string
        best:
          description: Highest measured score in the category
          type: object
        best_value:
          description: Highest score per output price
          type: object
        category:
          type: string
        chat_arguments:
          description: Use as-is in POST /api/v1/chat/completions
          type: object
        currency:
          type: string
        routing:
          description: Let the broker pick per request with these limits
          type: object
      required:
      - category
      - best
      - best_value
      - routing
      title: BrokerRecommendation
      type: object
    BrokerError:
      properties:
        error:
          properties:
            code:
              example: invalid_request
              type: string
            message:
              type: string
            param:
              description: The offending field, if any
              type:
              - string
              - 'null'
            request_id:
              description: Quote it when contacting support
              type:
              - string
              - 'null'
            type:
              description: invalid_request_error | authentication_error | rate_limit_error | server_error …
              example: invalid_request_error
              type: string
          required:
          - message
          - type
          - code
          type: object
      required:
      - error
      title: BrokerError
      type: object
    BrokerMarketModels:
      properties:
        categories:
          items:
            type: string
          type: array
        data:
          items:
            $ref: '#/components/schemas/BrokerMarketModel'
          type: array
        object:
          example: list
          type: string
      required:
      - data
      title: BrokerMarketModels
      type: object
    BrokerAccountPending:
      properties:
        status:
          enum:
          - pending
          type: string
      required:
      - status
      title: BrokerAccountPending
      type: object
    BrokerUpdateBillingRequest:
      properties:
        amount:
          enum:
          - 10
          - 25
          - 50
          type: integer
        billing:
          enum:
          - topup
          - monthly
          type: string
        limit:
          enum:
          - 50
          - 100
          - 250
          type: integer
      required:
      - billing
      title: BrokerUpdateBillingRequest
      type: object
    BrokerMarketModel:
      properties:
        capabilities:
          description: Supported by at least one provider
          items:
            type: string
          type: array
        context:
          description: Largest context window (tokens)
          type:
          - integer
          - 'null'
        id:
          description: Use as model on chat/completions (type chat), images/generations (image), audio/speech (speech) or audio/transcriptions (transcription), videos (video)
          type: string
        name:
          type: string
        own:
          description: 'Media rows: our own product (iris, quill)'
          type: boolean
        price:
          description: 'Cheapest customer price. Chat: input/output per 1M tokens. Media: exactly one of per_image, per_1k_characters, per_minute, per_second (video, default resolution; billed: actual cost)'
          properties:
            currency:
              type: string
            input:
              type: string
            output:
              type: string
            per:
              type: string
            per_1k_characters:
              type: string
            per_image:
              type: string
            per_minute:
              type: string
            per_second:
              type: string
          type: object
        providers:
          type: integer
        regions:
          items:
            type: string
          type: array
        scores:
          additionalProperties:
            type: number
          description: Our own measurement per category, 0..1 (absent = not measured)
          type: object
        throughput:
          description: tokens/s (best provider)
          type:
          - number
          - 'null'
        type:
          description: Only on media rows (`?type=`); chat rows omit it
          enum:
          - image
          - speech
          - transcription
          - video
          type: string
        vendor:
          type: string
      required:
      - id
      - price
      - regions
      - providers
      title: BrokerMarketModel
      type: object
    BrokerBillingStatus:
      properties:
        balance_chf:
          type: string
        billed_until:
          format: date
          type:
          - string
          - 'null'
        billing:
          enum:
          - topup
          - monthly
          type: string
        blocked_reason:
          type:
          - string
          - 'null'
        card:
          properties:
            brand:
              type: string
            expires:
              type: string
            last4:
              type: string
          type:
          - object
          - 'null'
        card_setup_pending:
          type: boolean
        credit_limit_chf:
          type: string
        month_spent_chf:
          type: string
        topup:
          description: Only for billing=topup, otherwise false.
          oneOf:
          - type: boolean
          - properties:
              amount_chf:
                type:
                - string
                - 'null'
              enabled:
                type: boolean
              threshold_chf:
                type:
                - string
                - 'null'
            type: object
      title: BrokerBillingStatus
      type: object
  securitySchemes:
    apiKeyAuth:
      description: 'API key as Bearer token: customer keys `ast_sk_…` (account page or POST /api/v1/broker/accounts); internal/CLI keys `acore_…` (legacy `mgpt_…` still accepted)'
      in: header
      name: Authorization
      type: apiKey
    bearerAuth:
      bearerFormat: JWT
      description: JWT access token obtained via POST /auth/login
      scheme: bearer
      type: http