B3

B3 CU API

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

Operations 6

GET /v1/cu/costs Get CU costs #
GET /v1/organizations/{orgId}/cu Get CU balance and threshold #
PUT /v1/organizations/{orgId}/cu/threshold Update CU min threshold #
GET /v1/organizations/{orgId}/cu/usage Get CU usage #
GET /v1/organizations/{orgId}/cu/runs Get runs with CU costs #
GET /v1/organizations/{orgId}/cu/usage-by-workflow Get CU usage by workflow #

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 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

b3-cu-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: B3 CU API
  version: '1.0'
  description: 'Operations tagged CU across 2 of this provider''s published API definitions: b3-b3os-workflow-openapi.json, b3-b3os-workflow-openapi_2.json. Each path carries the servers of the definition it was published in.'
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
      operationId: getV1CuCosts
      x-operation-id-source: derived
  /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
      operationId: getV1OrganizationsByOrgIdCu
      x-operation-id-source: derived
  /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
      operationId: putV1OrganizationsByOrgIdCuThreshold
      x-operation-id-source: derived
  /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
      operationId: getV1OrganizationsByOrgIdCuUsage
      x-operation-id-source: derived
  /v1/organizations/{orgId}/cu/runs:
    get:
      description: Get recent workflow runs with their aggregated CU consumption
      parameters:
      - description: Organization ID
        in: path
        name: orgId
        required: true
        schema:
          type: string
      - description: 'Items per page (default: 20, max: 100)'
        in: query
        name: limit
        schema:
          type: integer
      - description: 'Pagination offset (default: 0)'
        in: query
        name: offset
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCURunsSuccessResponse'
          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
        '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 runs with CU costs
      tags:
      - CU
      operationId: getV1OrganizationsByOrgIdCuRuns
      x-operation-id-source: derived
  /v1/organizations/{orgId}/cu/usage-by-workflow:
    get:
      description: Get per-workflow CU cost breakdown for a time period
      parameters:
      - description: Organization ID
        in: path
        name: orgId
        required: true
        schema:
          type: string
      - description: Start time (unix milliseconds)
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: End time (unix milliseconds)
        in: query
        name: to
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCUUsageByWorkflowSuccessResponse'
          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
        '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 by workflow
      tags:
      - CU
      operationId: getV1OrganizationsByOrgIdCuUsageByWorkflow
      x-operation-id-source: derived
components:
  schemas:
    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.CUUsageSummaryTotals:
      properties:
        deposited:
          type: number
        granted:
          type: number
        used:
          type: number
      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_app_api_service_cu.UpdateThresholdParams:
      properties:
        minThreshold:
          type: number
      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_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
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUGetBalanceResult:
      properties:
        balance:
          type: number
        minThreshold:
          type: number
      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_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.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
    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
    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.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
    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
    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.CUUpdateThresholdResult:
      properties:
        newThreshold:
          type: number
        oldThreshold:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CURunItem:
      properties:
        finishedAt:
          type: string
        runId:
          type: string
        startedAt:
          type: string
        status:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.RunStatus'
        totalCu:
          type: number
        triggerSource:
          type: string
        workflowId:
          type: string
      type: object
    GetCURunsSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/PaginatedData-github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity_CURunItem'
        message:
          example: successfully
          type: string
        requestId:
          example: req_abc123
          type: string
      type: object
    PaginatedData-github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity_CURunItem:
      properties:
        hasMore:
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CURunItem'
          type: array
          uniqueItems: false
        limit:
          type: integer
        offset:
          type: integer
      type: object
    GetCUUsageByWorkflowSuccessResponse:
      properties:
        code:
          example: 0
          type: integer
        data:
          $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageByWorkflowResult'
        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.CUUsageSummaryTotals_2:
      properties:
        adjusted:
          description: 'Net of period adjustments (credit +, debit -, incl. monthly reset) so the

            breakdown reconciles: granted + deposited + adjusted - used.'
          type: number
        deposited:
          type: number
        granted:
          type: number
        used:
          type: number
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.RunStatus:
      enum:
      - running
      - waiting
      - success
      - partial
      - failure
      - cancelled
      type: string
      x-enum-comments:
        RunStatusCancelled: Run was cancelled by user
        RunStatusFailure: Run failed
        RunStatusPartial: Run completed with mixed for-each iteration outcomes
        RunStatusRunning: Run is executing
        RunStatusSuccess: Run completed successfully
        RunStatusWaiting: Run is paused, waiting for a trigger to resume
      x-enum-varnames:
      - RunStatusRunning
      - RunStatusWaiting
      - RunStatusSuccess
      - RunStatusPartial
      - RunStatusFailure
      - RunStatusCancelled
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUWorkflowUsageItem:
      properties:
        cuPerHour:
          type: number
        estimatedCostPerRun:
          type: integer
        isStream:
          type: boolean
        runCount:
          type: integer
        status:
          type: string
        totalCu:
          type: number
        triggerType:
          type: string
        workflowId:
          type: string
        workflowName:
          type: string
      type: object
    github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUUsageByWorkflowResult:
      properties:
        workflows:
          items:
            $ref: '#/components/schemas/github_com_b3-fun_b3-mono_services_b3os-workflow_internal_pkg_entity.CUWorkflowUsageItem'
          type: array
          uniqueItems: false
      type: object
x-refined-from:
- b3-b3os-workflow-openapi.json
- b3-b3os-workflow-openapi_2.json