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/shardflux-dev:shardflux-dev-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. 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: Shardflux Billing API
version: 0.1.0
description: 'The public Shardflux HTTP API, as called by the TypeScript and Python SDKs and the CLI. Authenticate every request with a project API key: `Authorization: Bearer sfk__`. Error responses use the ErrorBody schema. Workspace tools (exec, PTY, processes, files, git, browser) are served by the workspace’s cell at `cell_endpoint` with a tool token from POST /v1/workspaces/{workspace_id}/tool-tokens and are not part of this document.'
servers:
- url: https://api.shardflux.dev
description: Production
tags:
- name: Billing
description: The plan catalog and the organization’s subscription.
paths:
/v1/billing/catalog:
get:
operationId: getV1BillingCatalog
summary: The active plan catalog (the same versioned catalog admission enforces)
tags:
- Billing
description: Public, cacheable. Prices are in minor units; `purchasable` plans can be bought with POST .../organizations/{id}/billing/checkout-sessions (a browser or CLI session; `shard billing upgrade `).
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
required:
- catalog_version
- mode
- currency
- activation_at
- approved_commercial
- plans
- policies
- units
properties:
catalog_version:
type: string
mode:
anyOf:
- type: string
enum:
- test
- type: string
enum:
- live
currency:
type: string
activation_at:
type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
approved_commercial:
type: boolean
plans:
type: array
items:
type: object
required:
- plan_key
- name
- priority
- overage
- limits
- allowances
- grant_days
- prices
properties:
plan_key:
type: string
name:
type: string
priority:
type: string
overage:
type: string
limits:
type: object
properties: {}
additionalProperties: true
description: Admission limits (null = unlimited).
allowances:
type: object
properties: {}
additionalProperties: true
grant_days:
anyOf:
- type: integer
description: 'Days a grant of this plan lasts (the signup trial); its allowances count over the grant, not the month, and at its end or its CPU/RAM cap the organization is back on the default plan. null: a plan that is sold (or the default).'
- type: 'null'
prices:
type: array
items:
type: object
required:
- interval
- amount_minor
- currency
- purchasable
properties:
interval:
anyOf:
- type: string
enum:
- month
- type: string
enum:
- year
amount_minor:
type: integer
description: Price in the currency’s minor unit (cents).
currency:
type: string
purchasable:
type: boolean
description: Bound to a Stripe price of this environment’s mode (checkout accepts it).
additionalProperties: false
additionalProperties: false
policies:
type: object
properties: {}
additionalProperties: true
description: Grace, cancellation, overage and retention policies of this catalog version.
units:
type: object
properties: {}
additionalProperties: true
additionalProperties: false
4XX:
description: Default Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
not_found:
$ref: '#/components/examples/not_found'
rate_limited:
$ref: '#/components/examples/rate_limited'
validation_failed:
$ref: '#/components/examples/validation_failed'
5XX:
description: Default Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
not_found:
$ref: '#/components/examples/not_found'
rate_limited:
$ref: '#/components/examples/rate_limited'
validation_failed:
$ref: '#/components/examples/validation_failed'
/v1/organizations/{organization_id}/billing/subscription:
get:
operationId: getV1OrganizationsOrganizationIdBillingSubscription
summary: Subscription, billing state and effective plan of an organization
tags:
- Billing
description: 'Owner/billing members (browser) or any API key of the organization (read-only). `billing_state`: free (no paid subscription), active, canceling (ends at period end, after which a paid plan is required to open or resume compute), grace (payment overdue, workspaces unaffected), restricted (grace ended: new opens/resumes answer 402 entitlement_required).'
parameters:
- schema:
type: string
format: uuid
in: path
name: organization_id
required: true
description: UUIDv7, lowercase canonical form.
security:
- apiKey: []
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
required:
- organization_id
- mode
- billing_state
- plan
- subscription
- restrictions
- pending_checkout
- purchase_available
- custom_plan
- trial
properties:
organization_id:
type: string
format: uuid
description: UUIDv7, lowercase canonical form.
mode:
anyOf:
- type: string
enum:
- test
- type: string
enum:
- live
billing_state:
anyOf:
- type: string
enum:
- free
- type: string
enum:
- active
- type: string
enum:
- canceling
- type: string
enum:
- grace
- type: string
enum:
- restricted
plan:
anyOf:
- type: object
required:
- plan_key
- catalog_version
- source
- ends_at
properties:
plan_key:
type: string
catalog_version:
type: string
source:
anyOf:
- type: string
enum:
- override
- type: string
enum:
- subscription
- type: string
enum:
- trial
- type: string
enum:
- default
ends_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
description: When this plan grant stops applying (a trial or partner grant, or a custom plan); null when it lasts until changed.
additionalProperties: false
description: The plan whose limits admission enforces now.
- type: 'null'
subscription:
anyOf:
- type: object
required:
- id
- status
- plan_key
- catalog_version
- current_period_start
- current_period_end
- cancel_at_period_end
- cancel_at
- canceled_at
- ended_at
- past_due_since
- grace_until
- restricted
- restriction_reason
- entitlement_state
- synced_at
properties:
id:
type: string
format: uuid
description: UUIDv7, lowercase canonical form.
status:
type: string
description: 'Stripe status: incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, paused.'
plan_key:
anyOf:
- type: string
- type: 'null'
catalog_version:
anyOf:
- type: string
- type: 'null'
current_period_start:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
current_period_end:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
cancel_at_period_end:
type: boolean
cancel_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
canceled_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
ended_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
past_due_since:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
grace_until:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
restricted:
type: boolean
restriction_reason:
anyOf:
- type: string
- type: 'null'
entitlement_state:
anyOf:
- type: string
enum:
- none
- type: string
enum:
- active
- type: string
enum:
- grace
- type: string
enum:
- restricted
synced_at:
type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
additionalProperties: false
- type: 'null'
restrictions:
type: object
properties: {}
additionalProperties: true
pending_checkout:
anyOf:
- type: object
required:
- id
- plan_key
- status
- expires_at
properties:
id:
type: string
format: uuid
description: UUIDv7, lowercase canonical form.
plan_key:
anyOf:
- type: string
- type: 'null'
status:
type: string
expires_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
additionalProperties: false
- type: 'null'
purchase_available:
type: boolean
description: Checkout/portal are configured in this environment.
custom_plan:
anyOf:
- type: object
required:
- id
- name
- base_plan_key
- status
- billing
- price
- starts_at
- ends_at
- overage
- limits
- allowances
properties:
id:
type: string
format: uuid
description: UUIDv7, lowercase canonical form.
name:
type: string
description: Display name, e.g. "Scale (custom)".
base_plan_key:
type: string
description: The catalog plan it is built on.
status:
anyOf:
- type: string
enum:
- active
- type: string
enum:
- scheduled
description: 'active: in force now; scheduled: starts at starts_at.'
billing:
type: string
description: Invoiced by Shardflux directly; no card charge or Stripe subscription.
enum:
- manual_invoice
price:
type: object
required:
- amount_minor
- currency
- interval
properties:
amount_minor:
type: integer
description: Agreed price in minor units (cents).
currency:
type: string
interval:
anyOf:
- type: string
enum:
- one_off
- type: string
enum:
- month
- type: string
enum:
- year
description: 'one_off: once for the whole term.'
additionalProperties: false
starts_at:
type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
ends_at:
type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
overage:
anyOf:
- type: string
enum:
- 'on'
- type: string
enum:
- 'off'
description: 'on: usage past the allowances keeps running and is invoiced with the plan; off: the allowances are caps.'
limits:
type: object
properties: {}
additionalProperties: true
description: Admission limits of the plan (null = unlimited).
allowances:
type: object
properties: {}
additionalProperties: true
description: Allowances per month of the plan.
additionalProperties: false
description: A plan arranged with Shardflux for this organization (the one in force, else the next scheduled one).
- type: 'null'
trial:
type: object
required:
- state
- ends_at
- unlock
properties:
state:
anyOf:
- type: string
enum:
- active
- type: string
enum:
- available
- type: string
enum:
- used
- type: string
enum:
- none
description: 'active: the organization is on its signup trial. available: its creator can still start it via `unlock`. used: the creator''s trial was granted already, or their card or identity has already earned one. none: no signup trial applies (a subscription or custom plan, or this month''s trials are given out).'
ends_at:
anyOf:
- type: string
format: date-time
description: RFC 3339 UTC timestamp with Z.
- type: 'null'
unlock:
type: array
items:
anyOf:
- type: string
enum:
- identity
- type: string
enum:
- card_check
description: 'While available: `card_check` = save a non-prepaid card in setup mode, nothing charged (POST .../billing/card-checks; shard billing trial); `identity` = verify an established work domain or link a GitHub account at least 30 days old. One trial per person, card, and GitHub account.'
additionalProperties: false
description: The signup trial of this organization.
card_required:
type: boolean
description: 'Compute (opens, resumes, forks, template builds) answers 402 `card_required` until a card is saved for this organization: POST .../billing/card-checks (shard billing card), nothing is charged. False when a card is on file, a subscription, custom plan or operator grant is in force, or the deployment does not require one. Absent from APIs before the card gate (read absent as false).'
additionalProperties: false
4XX:
description: Default Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
not_found:
$ref: '#/components/examples/not_found'
rate_limited:
$ref: '#/components/examples/rate_limited'
validation_failed:
$ref: '#/components/examples/validation_failed'
5XX:
description: Default Response
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
examples:
not_found:
$ref: '#/components/examples/not_found'
rate_limited:
$ref: '#/components/examples/rate_limited'
validation_failed:
$ref: '#/components/examples/validation_failed'
components:
schemas:
ErrorBody:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- request_id
- retryable
properties:
code:
type: string
enum:
- bad_request
- token_invalid
- unauthenticated
- invalid_credentials
- entitlement_required
- card_required
- allowance_exhausted
- quota_exceeded
- forbidden
- feature_unavailable
- mfa_required
- email_unverified
- csrf_failed
- step_up_required
- not_found
- conflict
- stale_epoch
- payload_too_large
- unsupported_media_type
- validation_failed
- idempotency_mismatch
- rate_limited
- internal_error
- capacity_pending
- dependency_unavailable
- authorization_pending
- slow_down
- access_denied
- expired_token
description: Closed set of error codes (docs/INTEGRATION_CONTRACTS.md).
message:
type: string
description: Safe, human-readable text.
request_id:
type: string
retryable:
type: boolean
operation_id:
type: string
format: uuid
description: UUIDv7, lowercase canonical form.
details:
type: object
properties: {}
additionalProperties: true
description: 'Operation-specific fields. Block-volume reasons: volume_kind_mismatch, volume_in_use, block_volumes_not_enabled, block_volumes_unsupported_base, block_volumes_schema_unavailable, block_volume_restart_required, block_volume_default_not_supported, not_supported_with_block_volumes, fork_source_volume_unavailable. fork_source_volume_unavailable is non-retryable: a generation captured by the fork source checkpoint is unavailable; choose another checkpoint. volume_in_use includes attachment_id and workspace_id when visible; detaching holders are retryable with retry_after_seconds (1–5). Block quota limits: workspace_disk_gib_max and block_volume_attachments_per_workspace (2).'
additionalProperties: false
additionalProperties: false
examples:
validation_failed:
summary: Request body failed schema validation
value:
error:
code: validation_failed
message: Request validation failed.
request_id: req-5a6b7c8d9e0f
retryable: false
details:
issues:
- path: /body
message: must have required property 'password'
not_found:
summary: Resource outside the caller’s tenant or nonexistent
value:
error:
code: not_found
message: Project not found.
request_id: req-2f1c9a7e44d1
retryable: false
rate_limited:
summary: Durable rate limit exhausted (Retry-After header is also set)
value:
error:
code: rate_limited
message: Too many requests. Try again later.
request_id: req-9b0e1d2c3f4a
retryable: true
details:
retry_after_seconds: 42
securitySchemes:
apiKey:
type: http
scheme: bearer
bearerFormat: sfk_<key_id>_<secret>
externalDocs:
description: Endpoint reference
url: https://docs.shardflux.dev/reference/http-api/endpoints