Cloud World Model Billing API

The Billing API from Cloud World Model — 3 operation(s) for billing.

GitHub OpenAPI

Operations 3

1 of 3 operations are conformant: apis.io called them with no credentials and the responses matched this contract. Checked 2026-11-12. how this works · status file

POST /billing/x402/settlements/{reconciliationId}/reconcile Reconcile a pending x402 payment settlement #
GET /billing/x402/balance Get x402 credit balance for a wallet address #
GET /billing/x402/transactions Get x402 payment transaction history for a wallet address conformant #

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

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

OpenAPI Specification

cloudworldmodel-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudworldmodel Ai Billing API
  version: 1.0.0
  contact:
    name: Cloud World Model API Support
    url: https://www.cloudworldmodel.ai
    email: api@cloudworldmodel.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: 'Operations tagged Billing across 2 of this provider''s published API definitions: cloudworldmodel-ai-openapi.json, cloudworldmodel-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://www.cloudworldmodel.ai/api
  description: Production
- url: http://localhost:5000/api
  description: Local development
security: []
tags:
- name: Billing
paths:
  /billing/x402/settlements/{reconciliationId}/reconcile:
    x-stability: stable
    post:
      tags:
      - Billing
      summary: Reconcile a pending x402 payment settlement
      description: 'Rechecks a previously pending x402 facilitator settlement using the opaque

        reconciliation handle returned in the original payment-required response.

        The signed payment authorization remains server-side; callers do not resend

        the payment header and no API key or x402 payment is required for this

        recovery request.


        A confirmed settlement returns HTTP 200. If the facilitator still has not

        resolved the payment, the endpoint returns HTTP 202 and the caller may retry

        with the same handle. Invalid or expired handles return HTTP 404, a rejected

        settlement returns HTTP 402, and facilitator query failures return HTTP 502.'
      operationId: reconcileX402Settlement
      security: []
      parameters:
      - name: reconciliationId
        in: path
        required: true
        description: Opaque UUID handle for the pending facilitator settlement.
        schema:
          type: string
          format: uuid
        example: 7f3d5b1e-8a43-4c3f-9c2a-1d6e8b5a4f20
      responses:
        '200':
          description: Settlement confirmed by the facilitator
          content:
            application/json:
              schema:
                type: object
                required:
                - settlement
                properties:
                  settlement:
                    $ref: '#/components/schemas/X402SettlementResolution'
        '202':
          description: Facilitator has not confirmed or rejected the settlement yet
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - reason
                - settlement
                properties:
                  error:
                    type: string
                    example: Payment settlement pending
                  reason:
                    type: string
                    example: The facilitator has not confirmed the payment settlement.
                  settlement:
                    $ref: '#/components/schemas/X402SettlementResolution'
        '402':
          description: Facilitator rejected the settlement
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - reason
                - settlement
                properties:
                  error:
                    type: string
                    example: Payment settlement failed
                  reason:
                    type: string
                    example: The facilitator rejected the payment settlement.
                  settlement:
                    $ref: '#/components/schemas/X402SettlementResolution'
        '404':
          description: Invalid, expired, or unknown reconciliation handle
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Settlement reconciliation not found
        '502':
          description: Facilitator could not be queried
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - reason
                properties:
                  error:
                    type: string
                    example: Payment settlement reconciliation failed
                  reason:
                    type: string
                    example: The facilitator could not be queried.
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
  /billing/x402/balance:
    x-stability: stable
    get:
      tags:
      - Billing
      summary: Get x402 credit balance for a wallet address
      description: 'Returns the current platform-credit balance for the x402 account associated

        with the given wallet address (EVM or Solana).


        x402 callers accumulate credits each time they pay for a metered call.

        Metering deducts credits as calls are processed. Use this endpoint to

        check how many credits remain before sending the next payment.


        This endpoint requires no authentication and is always public.'
      operationId: getX402Balance
      security: []
      parameters:
      - name: address
        in: query
        required: true
        schema:
          type: string
          pattern: ^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
        description: Wallet address to look up — either an EVM address (0x + 40 hex chars) or a Solana base58 public key (32–44 chars).
        example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
      responses:
        '200':
          description: Credit balance for the wallet address
          content:
            application/json:
              schema:
                type: object
                required:
                - address
                - userId
                - balance
                - freeRefreshAt
                - createdAt
                properties:
                  address:
                    type: string
                    description: Normalized (lowercase) wallet address.
                    example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
                  userId:
                    type: string
                    description: Internal user ID derived from the wallet address.
                    example: x402:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
                  balance:
                    type: integer
                    description: Remaining platform credits (each credit = $0.001 USDC).
                    example: 42
                  freeRefreshAt:
                    type: string
                    format: date-time
                    description: 'ISO-8601 timestamp when the account''s free-tier credits next refresh.

                      For x402 accounts this is set far in the future (no free-tier top-ups).

                      '
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO-8601 timestamp when the account was first created.
        '400':
          description: Invalid or missing address parameter
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: address query parameter must be a valid EVM address (0x + 40 hex chars) or Solana base58 public key (32–44 chars)
        '404':
          description: No x402 account found for this address (the wallet has never paid for a call)
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - address
                properties:
                  error:
                    type: string
                    example: No x402 account found for this address
                  address:
                    type: string
                    example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
  /billing/x402/transactions:
    x-stability: stable
    get:
      tags:
      - Billing
      summary: Get x402 payment transaction history for a wallet address
      description: 'Returns the most recent credit transactions for the x402 account associated

        with the given wallet address (EVM or Solana).


        Each transaction represents either an incoming payment (positive delta) or

        a metered call deduction (negative delta). Use this to audit spending,

        confirm a specific payment was received, or build a usage dashboard.


        This endpoint requires no authentication and is always public.'
      operationId: getX402Transactions
      security: []
      parameters:
      - name: address
        in: query
        required: true
        schema:
          type: string
          pattern: ^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
        description: Wallet address to look up — either an EVM address (0x + 40 hex chars) or a Solana base58 public key (32–44 chars).
        example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
        description: Maximum number of transactions to return (1–200, default 50).
        example: 20
      responses:
        '200':
          description: Transaction history for the wallet address
          content:
            application/json:
              schema:
                type: object
                required:
                - address
                - userId
                - transactions
                - total
                properties:
                  address:
                    type: string
                    description: Normalized (lowercase) wallet address.
                    example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
                  userId:
                    type: string
                    description: Internal user ID derived from the wallet address.
                    example: x402:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
                  transactions:
                    type: array
                    description: Credit transactions in reverse-chronological order.
                    items:
                      type: object
                      required:
                      - id
                      - userId
                      - delta
                      - callType
                      - description
                      - createdAt
                      properties:
                        id:
                          type: string
                          description: Unique transaction identifier.
                          example: txn_abc123
                        userId:
                          type: string
                          description: Internal user ID.
                          example: x402:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
                        delta:
                          type: integer
                          description: Credit change — positive for payments, negative for call deductions.
                          example: 5
                        callType:
                          type: string
                          description: Category of the transaction (e.g. "x402_payment", "chaos.run").
                          example: x402_payment
                        apiKeyId:
                          type: string
                          nullable: true
                          description: API key ID if the call was authenticated, otherwise null.
                        stripeSessionId:
                          type: string
                          nullable: true
                          description: Stripe Checkout session ID for top-up transactions, otherwise null.
                        description:
                          type: string
                          description: Human-readable description of the transaction.
                          example: 'x402 USDC payment: 5 credits for chaos.run'
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO-8601 timestamp when the transaction was recorded.
                  total:
                    type: integer
                    description: Number of transactions returned (≤ limit).
                    example: 3
        '400':
          description: Invalid or missing address parameter
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: address query parameter must be a valid EVM address (0x + 40 hex chars) or Solana base58 public key (32–44 chars)
        '500':
          $ref: '#/components/responses/InternalError'
    servers:
    - url: https://www.cloudworldmodel.ai/api
      description: Production
    - url: http://localhost:5000/api
      description: Local development
components:
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    X402SettlementResolution:
      type: object
      required:
      - status
      properties:
        status:
          type: string
          enum:
          - confirmed
          - pending
          - failed
          description: Current facilitator settlement state.
          example: confirmed
        facilitatorStatus:
          type: string
          description: Raw facilitator status when one was supplied.
          example: settled
        transactionHash:
          type: string
          description: On-chain transaction hash when settlement is confirmed.
          example: 0xabc123...
        transaction:
          type: string
          description: Facilitator transaction identifier when supplied.
        network:
          type: string
          description: Settlement network reported by the facilitator.
          example: base
        payer:
          type: string
          description: Payer address reported by the facilitator.
        error:
          type: string
          description: Facilitator-declared settlement error, when present.
        httpStatus:
          type: integer
          description: Facilitator HTTP status when the settlement failed.
          example: 402
        responseData:
          type: object
          description: Redacted facilitator response data, when available.
          additionalProperties: true
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Error message
          example: Simulation not found
        details:
          type: array
          description: Detailed validation errors (for 400 responses)
          items:
            type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Wallet Session JWT
      description: 'API key or wallet-session JWT authentication using Bearer tokens in the Authorization header.


        **How to authenticate:**

        1. Create an API key using POST /api/keys

        2. Include the key in the Authorization header: `Bearer cwm_live_<your_key>`

        3. All RL environment endpoints require authentication


        **Rate Limits:**

        - Default: 1000 requests/hour per key

        - Configurable per key

        - Returns 429 when exceeded

        '
    UiSessionCookie:
      type: apiKey
      in: cookie
      name: cwm_ui_session
      description: 'HttpOnly browser-workspace session cookie issued by

        `POST /api/ui/simulations`. It authorizes UI mutations for simulations

        owned by that browser workspace.

        '
    x402:
      type: apiKey
      in: header
      name: X-PAYMENT
      description: "x402 v2 Base micropayment option. Select the Base entry from\n`GET /api/billing/x402/config` `paymentOptions`, then send its signed USDC\nmicro-payment in the `X-PAYMENT` header to get full access to the metered\nendpoint in a single round-trip — no account, no API key, no sign-up required.\n\n**402 → pay → retry loop:**\n1. Call the endpoint without an `X-PAYMENT` header.\n2. Receive a `402 Payment Required` response. The body is a\n   standard JSON `PaymentRequired` object. The same payload is also\n   echoed as a base64-encoded string in the `PAYMENT-REQUIRED`\n   response header for clients that cannot access the body.\n3. Decode the `PaymentRequired` body (or the `PAYMENT-REQUIRED`\n   header) to read the exact `payTo` wallet,\n   USDC amount, network, and facilitator URL.\n4. Construct and sign the payment with your x402 client library.\n5. Retry the Base request with the `X-PAYMENT` header — the server\n   verifies via `https://facilitator.payai.network` and responds `200`.\n\n**Optional Solana:** When `paymentOptions` advertises a Solana entry, callers\nmay instead select it and use `PAYMENT-SIGNATURE`. Solana is an additional\noption; use `X-PAYMENT` for the Base option shown by this security scheme.\n\n**Discovery:** `GET /api/billing/x402/config` returns the live `payTo`\naddress, canonical `paymentOptions`, per-call-type USDC amounts, facilitator\nURL, and the credits-per-USDC conversion rate. Always fetch this before\nhardcoding any amounts or a payment header.\n\n**Price range:** $0.0030 per 3-credit call — $0.0050 per 5-credit\ncall (see `x-x402-price-usdc` on each\noperation for the exact amount).\n\n**Facilitator:** `https://facilitator.payai.network` (PayAI-operated,\nverifies the advertised Base and optional Solana options).\n"
    x402Solana:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: 'Optional x402 v2 Solana payment alternative. Use this security option only

        when `GET /api/billing/x402/config` `paymentOptions` advertises a Solana

        network, then send its signed Solana USDC payment payload in the

        `PAYMENT-SIGNATURE` header. Include the option''s `feePayer` detail when

        constructing the transaction.


        For the primary Base payment option, select the `x402` security option

        instead and send its signed payment payload in the `X-PAYMENT` header.

        '
x-refined-from:
- cloudworldmodel-ai-openapi.json
- cloudworldmodel-ai-openapi.yml