Strix Billing API
Credit balance, agent-payable top-ups, and automatic top-up settings.
Credit balance, agent-payable top-ups, and automatic top-up settings.
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/strix-ai:strix-ai-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: Strix Billing API
version: 1.0.0
description: Public REST API for the Strix autonomous penetration testing platform. Manage scans, vulnerabilities, assets, schedules, API tokens, and webhooks. Intake-only workspaces can register repositories, manage domains, and manage or verify test users. Other operations return 403. Repository and domain responses in these workspaces omit scan, finding, and PR review fields.
servers:
- url: /api/v1
description: Strix v1 API
security:
- BearerAuth: []
tags:
- name: Billing
description: Credit balance, agent-payable top-ups, and automatic top-up settings.
paths:
/billing/auto-topup:
get:
operationId: getAutoTopupSettings
summary: Get automatic top-up settings
description: Not available on self-hosted deployments (returns 404). Get the automatic top-up settings for the organization. Requires the billing:read scope, an unscoped token, and the admin role.
tags:
- Billing
security:
- BearerAuth:
- billing:read
responses:
'200':
description: Automatic top-up settings.
content:
application/json:
schema:
$ref: '#/components/schemas/AutoTopupSettings'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: updateAutoTopupSettings
summary: Update automatic top-up settings
description: Not available on self-hosted deployments (returns 404). Update the automatic top-up settings for the organization. Automatic top-up charges the saved payment method when a scan or a chat needs more credits. The monthly cap applies to all automatic purchases. The chat limit applies to the automatic purchases made for one chat. To enable automatic top-up, the organization needs a usable saved card. If the organization has no saved card, or the card has expired, the API returns 409 with code `no_payment_method` or `card_expired`. If automatic top-up is not configured for this deployment, the API returns 503. An admin adds a card under Billing in the dashboard. Requires the billing:write scope and the admin role.
tags:
- Billing
security:
- BearerAuth:
- billing:write
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
enabled:
description: When true, Strix buys credits automatically when a scan needs more.
type: boolean
topup_credits:
description: Number of credits to buy on each automatic top-up.
type: integer
minimum: 1
maximum: 10000
monthly_cap_credits:
type:
- integer
- 'null'
minimum: 1
maximum: 2147483647
description: Maximum automatically purchased credits per calendar month. An omitted field keeps the stored cap. An explicit null removes the cap.
chat_cap_credits:
type:
- integer
- 'null'
minimum: 1
maximum: 2147483647
description: Maximum credits that automatic top-up buys for one chat. An omitted field keeps the stored limit. An explicit null removes the limit.
required:
- enabled
- topup_credits
responses:
'200':
description: Updated settings.
content:
application/json:
schema:
$ref: '#/components/schemas/AutoTopupSettings'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'503':
$ref: '#/components/responses/ServiceUnavailable'
/billing/checkout:
post:
operationId: createBillingCheckout
summary: Create a checkout link
description: Not available on self-hosted deployments (returns 404). Create a hosted checkout link for a plan or a credit pack. A person must open the link and complete the payment. Requires the admin role and the billing:write scope.
tags:
- Billing
security:
- BearerAuth:
- billing:write
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCheckoutRequest'
responses:
'200':
description: The checkout link.
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutLink'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/billing/credits:
get:
operationId: getCreditBalance
summary: Get the credit balance
description: Not available on self-hosted deployments (returns 404). Get the current top-up credit balance for the organization. The response also gives the whole-credit balance that Chat can spend. A credit that Chat has only partly used counts as one. Requires the billing:read scope.
tags:
- Billing
security:
- BearerAuth:
- billing:read
responses:
'200':
description: Credit balance.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditBalance'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/billing/scan-limit:
get:
operationId: getScanLimit
summary: Get the scan limit
description: Not available on self-hosted deployments (returns 404). Get the scan limit for the organization and the number of scans used in the current period. Each scan counts once, for all of its repositories and domains. Retests and failed scans do not count. Periods use UTC, and a week starts on Monday. The value of `scan_limit` is null when the organization has no limit. Requires the billing:read scope.
tags:
- Billing
security:
- BearerAuth:
- billing:read
responses:
'200':
description: The scan limit and current-period usage.
content:
application/json:
schema:
$ref: '#/components/schemas/ScanLimit'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/billing/portal:
post:
operationId: createBillingPortal
summary: Create a billing portal link
description: Not available on self-hosted deployments (returns 404). Create a hosted billing portal link. A person must open the link to change the payment method or the subscription. Requires the admin role and the billing:write scope.
tags:
- Billing
security:
- BearerAuth:
- billing:write
responses:
'200':
description: The billing portal link.
content:
application/json:
schema:
$ref: '#/components/schemas/PortalLink'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'502':
$ref: '#/components/responses/BadGateway'
/billing/topup:
post:
operationId: purchaseCredits
summary: Buy credits with a machine payment
description: 'Not available on self-hosted deployments (returns 404). Enterprise organizations billed per pentest cannot use it (returns 400); they add pentests from Settings > Billing. Buy scan credits with the Machine Payments Protocol (MPP). Authenticate with `X-Strix-Authorization: Bearer ` because MPP uses the standard Authorization header for its payment credential. The first request without a payment credential returns HTTP 402 with a payment challenge. Pay the challenge with a Stripe agent wallet (https://link.com/agents), then retry the request with the payment credential. The user approves each payment in the Link app. If the user does not want a wallet, create a hosted checkout link with the billing checkout operation instead. A verified payment grants the credits one time and returns a receipt. Requires the billing:write scope and the admin role.'
tags:
- Billing
security:
- StrixAuthorization:
- billing:write
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TopupRequest'
responses:
'200':
description: Payment verified and credits granted.
content:
application/json:
schema:
$ref: '#/components/schemas/TopupResult'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
description: Payment required. The WWW-Authenticate header contains the MPP payment challenge. Only agents that hold a Stripe agent wallet pay the challenge directly. Everyone else opens `checkout_url`, a hosted checkout for the same credits that the user pays in the browser; the field is omitted when no hosted checkout could be created. `wallet_setup` explains both paths.
content:
application/json:
schema:
$ref: '#/components/schemas/TopupChallengeResponse'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'503':
$ref: '#/components/responses/ServiceUnavailable'
components:
schemas:
TopupChallengeResponse:
type: object
description: The MPP payment challenge body, extended with the hosted checkout alternative. Protocol fields from the challenge are passed through unchanged.
properties:
checkout_url:
type: string
format: uri
description: Hosted checkout for the same number of credits. The user pays in the browser; credits are granted when the payment completes. Omitted when no hosted checkout could be created.
wallet_setup:
type: string
description: 'How to proceed: open `checkout_url` (or create a hosted checkout with `POST /billing/checkout`) unless the agent holds a Stripe agent wallet, in which case it may pay the challenge directly.'
additionalProperties: true
required:
- wallet_setup
ErrorResponse:
type: object
properties:
detail:
type: string
description: Human-readable explanation of the error.
code:
type: string
description: Stable machine-readable error code. `insufficient_scope` means the token does not hold the scope that this endpoint requires.
required_scope:
$ref: '#/components/schemas/ApiV1Scope'
description: Scope that the caller must add to the token. Returned with the `insufficient_scope` code.
docs:
type: string
format: uri
description: Documentation page that explains how to resolve the error.
hint:
type: string
description: One instruction that resolves the error. For `insufficient_scope`, a CLI session gets the `strix cloud session scopes set full` or `strix cloud login --scope-profile full` command, and an API token gets the settings page where the user creates a token with the scope. When the owner's role cannot hold the scope, the hint asks for a role change instead.
required:
- detail
TopupVolumeDiscount:
type: object
description: Volume discount on a single top-up. The discount is 0% up to `start_credits`, grows with the logarithm of the amount, and reaches `max_discount_percent` at `max_credits` and above. The price of a top-up is `credits * price_per_credit_cents * (1 - discount)`, rounded to the cent.
properties:
start_credits:
type: integer
description: Largest top-up that pays the list price.
max_credits:
type: integer
description: Top-up size at which the discount reaches its maximum.
max_discount_percent:
type: integer
description: Largest discount, in percent.
required:
- start_credits
- max_credits
- max_discount_percent
ScanLimit:
type: object
required:
- scan_limit
properties:
scan_limit:
oneOf:
- type: 'null'
- type: object
required:
- limit
- period
- used
- period_start
- resets_at
properties:
limit:
type: integer
minimum: 0
description: Maximum scans allowed during the current period.
period:
type: string
enum:
- week
- month
- year
description: The period for this scan limit.
used:
type: integer
minimum: 0
description: Scans used during the current period.
period_start:
type: string
format: date-time
description: Start of the current period in UTC.
resets_at:
type: string
format: date-time
description: Start of the next period in UTC.
description: The current scan limit and usage, or null when the organization has no limit.
ApiV1Scope:
type: string
enum:
- scans:read
- scans:write
- vulnerabilities:read
- vulnerabilities:write
- dependencies:read
- schedules:read
- schedules:write
- assets:read
- assets:write
- organizations:read
- organizations:write
- members:read
- members:write
- invitations:read
- invitations:write
- webhooks:read
- webhooks:write
- tokens:write
- audit:read
- pr_reviews:read
- pr_reviews:write
- connectors:read
- connectors:write
- knowledge:read
- knowledge:write
- uploads:write
- integrations:read
- integrations:write
- chat:read
- chat:write
- scans:message
- analytics:read
- llm:read
- llm:write
- test_users:read
- test_users:write
- discovery:read
- discovery:write
- license:read
- supply_chain:read
- supply_chain:write
- billing:read
- billing:write
- containers:read
- containers:write
- logs:read
CheckoutLink:
type: object
properties:
checkout_url:
type: string
required:
- checkout_url
CreditBalance:
type: object
properties:
balance:
type: integer
description: Current top-up credit balance for the organization. Scans reserve whole credits from this balance.
chat_balance:
type: integer
description: Whole credits that Chat can still spend. This value is `balance`, or `balance` plus one while Chat holds the unspent part of a credit that it started to use.
price_per_credit_cents:
type: integer
description: List price of one credit in USD cents, before the volume discount.
volume_discount:
$ref: '#/components/schemas/TopupVolumeDiscount'
required:
- balance
- chat_balance
- price_per_credit_cents
- volume_discount
AutoTopupSettings:
type: object
properties:
enabled:
type: boolean
description: True when automatic top-up is active.
topup_credits:
type: integer
minimum: 1
maximum: 10000
description: Credits purchased for each automatic top-up.
monthly_cap_credits:
type:
- integer
- 'null'
minimum: 1
maximum: 2147483647
description: Maximum automatically purchased credits per calendar month. Null removes the cap.
chat_cap_credits:
type:
- integer
- 'null'
minimum: 1
maximum: 2147483647
description: Maximum credits that automatic top-up buys for one chat. Null removes the limit. Manual purchases and scans are not affected. An admin can lift the limit for one chat with `PUT /chat/{chatId}/auto-topup-limit`.
used_this_month:
type: integer
description: Credits already purchased automatically this month.
required:
- enabled
- topup_credits
- monthly_cap_credits
- chat_cap_credits
- used_this_month
PortalLink:
type: object
properties:
portal_url:
type: string
required:
- portal_url
CreateCheckoutRequest:
type: object
properties:
product:
type: string
enum:
- strix_top_up
- strix_cloud
- strix_startup
description: The product to buy.
credits:
type: integer
minimum: 1
maximum: 10000
default: 60
description: Number of credits to buy. Only used with `strix_top_up`.
success_url:
type: string
description: The page to open after the payment. The server accepts only a same-origin address.
required:
- product
TopupResult:
type: object
properties:
credits_granted:
type: integer
description: Credits granted by this payment. Zero when the payment was already processed.
duplicate:
type: boolean
description: True when this payment reference was already granted.
reference:
type: string
description: Payment reference from the payment receipt.
balance:
type: integer
description: Credit balance after the grant.
required:
- credits_granted
- duplicate
- reference
- balance
TopupRequest:
type: object
properties:
credits:
type: integer
minimum: 1
maximum: 10000
description: Number of credits to purchase.
required:
- credits
responses:
NotFound:
description: Resource not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ServiceUnavailable:
description: Service unavailable.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadRequest:
description: Bad request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized:
description: Missing or invalid API token.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Forbidden:
description: Insufficient permissions or missing scope. A missing scope returns the `insufficient_scope` code, the `required_scope` field, and a `hint` with the command or page that grants the scope, so a client can request the correct scope and retry.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
BadGateway:
description: Bad gateway.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Conflict:
description: Conflict.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: 'API token obtained from the Tokens endpoint or CLI device login. Include as `Authorization: Bearer <token>`. Requests made with a managed CLI session also include `X-Strix-Workspace: <organization_id>` to pin a process to the workspace it started in; recovery endpoints report the current workspace after a concurrent switch.'
StrixAuthorization:
type: apiKey
in: header
name: X-Strix-Authorization
description: 'API token for operations where the standard Authorization header carries a protocol credential. Include as `X-Strix-Authorization: Bearer <token>`.'