Teardrop Admin / Billing API
The Admin / Billing API from Teardrop — 8 operation(s) for admin / billing.
The Admin / Billing API from Teardrop — 8 operation(s) for admin / billing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/teardrop-dev:teardrop-dev-admin-billing-api"
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.
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: 3.2.0
info:
title: Teardrop Admin / Billing API
description: The open API and billing gateway for autonomous economic agents
version: 2.13.0
tags:
- name: Admin / Billing
paths:
/admin/pricing/tools:
post:
tags:
- Admin / Billing
summary: Admin Upsert Tool Pricing
description: 'Set or update the per-call cost for a specific tool (admin only).
Accepts built-in tool names or qualified marketplace names (e.g. ''acme/weather'').'
operationId: admin_upsert_tool_pricing_admin_pricing_tools_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ToolPricingOverrideRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ToolPricingOverrideResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/admin/pricing/tools/{tool_name}:
delete:
tags:
- Admin / Billing
summary: Admin Delete Tool Pricing
description: Remove a per-tool pricing override, reverting to the global default (admin only).
operationId: admin_delete_tool_pricing_admin_pricing_tools__tool_name__delete
security:
- HTTPBearer: []
parameters:
- name: tool_name
in: path
required: true
schema:
type: string
title: Tool Name
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ToolPricingDeleteResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/billing/revenue:
get:
tags:
- Admin / Billing
summary: Admin Billing Revenue
description: Aggregate settled revenue by period (admin only).
operationId: admin_billing_revenue_admin_billing_revenue_get
security:
- HTTPBearer: []
parameters:
- name: start
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Start
- name: end
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: End
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/RevenueSummaryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/billing/charges/reconciliation:
get:
tags:
- Admin / Billing
summary: Admin Charge Reconciliation
description: 'Compare the unified charge ledger with legacy billing records (admin only).
``ok`` is true only when every check reports zero discrepancies over a window
that starts after migration 115 was deployed.'
operationId: admin_charge_reconciliation_admin_billing_charges_reconciliation_get
security:
- HTTPBearer: []
parameters:
- name: start
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Window start (ISO 8601; UTC when no offset). Defaults to 24h before end.
title: Start
description: Window start (ISO 8601; UTC when no offset). Defaults to 24h before end.
- name: end
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Exclusive window end (ISO 8601). Defaults to 5 minutes ago.
title: End
description: Exclusive window end (ISO 8601). Defaults to 5 minutes ago.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ChargeReconciliationResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/credits/topup:
post:
tags:
- Admin / Billing
summary: Admin Credits Topup
description: Top up an org's prepaid credit balance (admin only).
operationId: admin_credits_topup_admin_credits_topup_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TopupRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTopupResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/admin/billing/pending:
get:
tags:
- Admin / Billing
summary: Admin Billing Pending
description: List pending/failed settlements for reconciliation (admin only).
operationId: admin_billing_pending_admin_billing_pending_get
security:
- HTTPBearer: []
parameters:
- name: status
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Status
- name: limit
in: query
required: false
schema:
type: integer
default: 50
title: Limit
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PendingSettlementsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/billing/pending/{settlement_id}/retry:
post:
tags:
- Admin / Billing
summary: Admin Billing Retry
description: Reset an exhausted settlement for manual retry (admin only).
operationId: admin_billing_retry_admin_billing_pending__settlement_id__retry_post
security:
- HTTPBearer: []
parameters:
- name: settlement_id
in: path
required: true
schema:
type: string
title: Settlement Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SettlementRetryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/orgs/{org_id}/spending:
get:
tags:
- Admin / Billing
summary: Admin Get Spending
description: Get spending configuration for an org (admin only).
operationId: admin_get_spending_admin_orgs__org_id__spending_get
security:
- HTTPBearer: []
parameters:
- name: org_id
in: path
required: true
schema:
type: string
title: Org Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrgSpendingConfigResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Admin / Billing
summary: Admin Update Spending
description: Update spending limit or pause/unpause an org (admin only).
operationId: admin_update_spending_admin_orgs__org_id__spending_patch
security:
- HTTPBearer: []
parameters:
- name: org_id
in: path
required: true
schema:
type: string
title: Org Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SpendingConfigUpdate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrgSpendingConfigResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ToolPricingOverrideRequest:
properties:
tool_name:
type: string
maxLength: 100
minLength: 1
title: Tool Name
cost_usdc:
type: integer
maximum: 100000000.0
minimum: 0.0
title: Cost Usdc
description:
type: string
maxLength: 500
title: Description
default: ''
type: object
required:
- tool_name
- cost_usdc
title: ToolPricingOverrideRequest
SpendingConfigUpdate:
properties:
spending_limit_usdc:
anyOf:
- type: integer
minimum: 0.0
- type: 'null'
title: Spending Limit Usdc
is_paused:
anyOf:
- type: boolean
- type: 'null'
title: Is Paused
type: object
title: SpendingConfigUpdate
RevenueSummaryResponse:
properties:
total_settlements:
type: integer
title: Total Settlements
total_revenue_usdc:
type: integer
title: Total Revenue Usdc
type: object
required:
- total_settlements
- total_revenue_usdc
title: RevenueSummaryResponse
AdminTopupResponse:
properties:
org_id:
type: string
title: Org Id
new_balance_usdc:
type: integer
title: New Balance Usdc
type: object
required:
- org_id
- new_balance_usdc
title: AdminTopupResponse
ToolPricingOverrideResponse:
properties:
tool_name:
type: string
title: Tool Name
cost_usdc:
type: integer
title: Cost Usdc
description:
type: string
title: Description
updated:
type: boolean
title: Updated
type: object
required:
- tool_name
- cost_usdc
- description
- updated
title: ToolPricingOverrideResponse
ToolPricingDeleteResponse:
properties:
deleted:
type: boolean
title: Deleted
tool_name:
type: string
title: Tool Name
type: object
required:
- deleted
- tool_name
title: ToolPricingDeleteResponse
PendingSettlementsResponse:
properties:
items:
items:
$ref: '#/components/schemas/PendingSettlementItem'
type: array
title: Items
type: object
required:
- items
title: PendingSettlementsResponse
SettlementRetryResponse:
properties:
settlement_id:
type: string
title: Settlement Id
status:
type: string
const: pending
title: Status
type: object
required:
- settlement_id
- status
title: SettlementRetryResponse
PendingSettlementItem:
properties:
id:
type: string
title: Id
usage_event_id:
type: string
title: Usage Event Id
org_id:
type: string
title: Org Id
run_id:
type: string
title: Run Id
billing_method:
type: string
title: Billing Method
amount_usdc:
type: integer
title: Amount Usdc
retry_count:
type: integer
title: Retry Count
max_retries:
type: integer
title: Max Retries
next_retry_at:
anyOf:
- type: string
- type: 'null'
title: Next Retry At
description: ISO 8601 timestamp; null if not scheduled.
last_error:
anyOf:
- type: string
- type: 'null'
title: Last Error
status:
type: string
title: Status
created_at:
type: string
title: Created At
description: ISO 8601 timestamp.
type: object
required:
- id
- usage_event_id
- org_id
- run_id
- billing_method
- amount_usdc
- retry_count
- max_retries
- status
- created_at
title: PendingSettlementItem
TopupRequest:
properties:
org_id:
type: string
title: Org Id
amount_usdc:
type: integer
exclusiveMinimum: 0.0
title: Amount Usdc
type: object
required:
- org_id
- amount_usdc
title: TopupRequest
OrgSpendingConfigResponse:
properties:
org_id:
type: string
title: Org Id
balance_usdc:
type: integer
title: Balance Usdc
spending_limit_usdc:
type: integer
title: Spending Limit Usdc
is_paused:
type: boolean
title: Is Paused
daily_spend_usdc:
type: integer
title: Daily Spend Usdc
type: object
required:
- org_id
- balance_usdc
- spending_limit_usdc
- is_paused
- daily_spend_usdc
title: OrgSpendingConfigResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ChargeReconciliationResponse:
properties:
start:
type: string
format: date-time
title: Start
end:
type: string
format: date-time
title: End
ok:
type: boolean
title: Ok
checks:
items:
$ref: '#/components/schemas/ReconciliationCheckResponse'
type: array
title: Checks
legacy_revenue_usdc:
type: integer
title: Legacy Revenue Usdc
ledger_revenue_usdc:
type: integer
title: Ledger Revenue Usdc
ledger_mcp_revenue_usdc:
type: integer
title: Ledger Mcp Revenue Usdc
type: object
required:
- start
- end
- ok
- checks
- legacy_revenue_usdc
- ledger_revenue_usdc
- ledger_mcp_revenue_usdc
title: ChargeReconciliationResponse
ReconciliationCheckResponse:
properties:
name:
type: string
title: Name
source_rows:
type: integer
title: Source Rows
discrepancies:
additionalProperties:
type: integer
type: object
title: Discrepancies
info:
additionalProperties:
type: integer
type: object
title: Info
sample_ids:
items:
type: string
type: array
title: Sample Ids
type: object
required:
- name
- source_rows
- discrepancies
- info
- sample_ids
title: ReconciliationCheckResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
HTTPBearer:
type: http
scheme: bearer