B3

B3 CU API

The CU API from B3 — 4 operation(s) for cu.

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/b3-cu-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

b3-cu-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  description: Workflow management API for B3OS
  title: B3OS Workflow Action CU API
  version: '1.0'
tags:
- name: CU
paths:
  /v1/cu/costs:
    get:
      description: Get the complete CU cost list for all triggers and actions (public, no auth)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCUCostsSuccessResponse'
          description: OK
      summary: Get CU costs
      tags:
      - CU
  /v1/organizations/{orgId}/cu:
    get:
      description: Get current CU balance and minimum threshold for an organization
      parameters:
      - description: Organization ID
        in: path
        name: orgId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCUBalanceSuccessResponse'
          description: OK
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Internal Server Error
      summary: Get CU balance and threshold
      tags:
      - CU
  /v1/organizations/{orgId}/cu/threshold:
    put:
      description: Update the CU minimum balance threshold for an organization (admin only)
      parameters:
      - description: Organization ID
        in: path
        name: orgId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - type: object
              - $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_service_cu.UpdateThresholdParams'
                summary: body
                description: Threshold parameters
        description: Threshold parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCUThresholdSuccessResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Internal Server Error
      summary: Update CU min threshold
      tags:
      - CU
  /v1/organizations/{orgId}/cu/usage:
    get:
      description: Get CU usage breakdown for a specific month
      parameters:
      - description: Organization ID
        in: path
        name: orgId
        required: true
        schema:
          type: string
      - description: Year-Month in YYYY-MM format
        in: query
        name: yearMonth
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCUUsageSuccessResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse'
          description: Internal Server Error
      summary: Get CU usage
      tags:
      - CU
components:
  schemas:
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageSummaryTotals:
      properties:
        deposited:
          type: number
        granted:
          type: number
        used:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_service_cu.UpdateThresholdParams:
      properties:
        minThreshold:
          type: number
      type: object
    GetCUUsageSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageSummary'
        message:
          example: successfully
          type: string
        requestId:
          example: req_abc123
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageBreakdown:
      properties:
        count:
          type: integer
        cu:
          type: number
        nodeType:
          type: string
        type:
          description: '"trigger" or "action"'
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUGetBalanceResult:
      properties:
        balance:
          type: number
        minThreshold:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageSummary:
      properties:
        daily:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUDailyUsage'
          type: array
          uniqueItems: false
        summary:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageSummaryTotals'
        yearMonth:
          type: string
      type: object
    GetCUBalanceSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUGetBalanceResult'
        message:
          example: successfully
          type: string
        requestId:
          example: req_abc123
          type: string
      type: object
    UpdateCUThresholdSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUpdateThresholdResult'
        message:
          example: successfully
          type: string
        requestId:
          example: req_abc123
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostsResult:
      properties:
        actions:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostActionsByCategory'
        defaults:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostDefaults'
        triggers:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostItem'
          type: array
          uniqueItems: false
      type: object
    GetCUCostsSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostsResult'
        message:
          example: successfully
          type: string
        requestId:
          example: req_abc123
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostDefaults:
      properties:
        builtIn:
          type: number
        dynamic:
          type: number
        logic:
          type: number
        trigger:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUpdateThresholdResult:
      properties:
        newThreshold:
          type: number
        oldThreshold:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostItem:
      properties:
        cost:
          type: number
        source:
          description: '"default" or "override"'
          type: string
        type:
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUDailyUsage:
      properties:
        breakdown:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageBreakdown'
          type: array
          uniqueItems: false
        date:
          type: string
        used:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_app_api_http.ErrorResponse:
      properties:
        code:
          type: integer
        details:
          items: {}
          type: array
          uniqueItems: false
        message:
          type: string
        requestId:
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostActionsByCategory:
      properties:
        builtIn:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostItem'
          type: array
          uniqueItems: false
        dynamic:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostItem'
          type: array
          uniqueItems: false
        logic:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUCostItem'
          type: array
          uniqueItems: false
      type: object