Skip to content
ndStill is in development. These docs describe the v2 API as designed; the SDKs and the hosted MCP server are previews and not generally available.
Docs

Billing API

Your plan, usage meters and invoices.

6 endpointsGenerated from the typed registry

Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.

List invoices#

GET/v2/billing/invoices
Query parameters all optional
  • cursorstring
  • limitnumber

    1–200, default 50.

  • qstring

    Free-text search over names, ids and descriptors.

  • sortstring

    Sort field, prefix "-" for descending ("-created_at" is the default).

  • created_gteTimestamp

    created_at >= (ISO).

  • created_lteTimestamp

    created_at <= (ISO).

Response list of Invoice

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

  • idId
  • object"invoice"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • numberstring
  • periodstring
  • amountMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • statusstring enum
    "open""draft""paid""void"
  • pdf_urlstring
  • due_atTimestamp
Errors
  • 400invalid_request

    A query parameter is invalid.

  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/billing/invoices?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "inv_01M3TC5H00DVQ1438VCW25J5ED",
      "object": "invoice",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-10-02T00:00:00.000Z",
      "number": "NDS-202610-4753",
      "period": "2026-10",
      "amount": {
        "amount": 53900,
        "asset": "USD"
      },
      "status": "paid",
      "pdf_url": "/demo/invoices/2026-10.pdf",
      "due_at": "2026-10-16T00:00:00.000Z"
    },
    {
      "id": "inv_01M1D47Z003QBJD3JSCNE5NKBH",
      "object": "invoice",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-09-02T00:00:00.000Z",
      "number": "NDS-202609-9453",
      "period": "2026-09",
      "amount": {
        "amount": 79200,
        "asset": "USD"
      },
      "status": "paid",
      "pdf_url": "/demo/invoices/2026-9.pdf",
      "due_at": "2026-09-16T00:00:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 3
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Retrieve an invoice#

GET/v2/billing/invoices/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response Invoice

The same Invoice object as List invoices.

Errors
  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 404not_found

    No object with that id in this org.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/billing/invoices/inv_01M3TC5H00DVQ1438VCW25J5ED" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "inv_01M3TC5H00DVQ1438VCW25J5ED",
  "object": "invoice",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-10-02T00:00:00.000Z",
  "number": "NDS-202610-4753",
  "period": "2026-10",
  "amount": {
    "amount": 53900,
    "asset": "USD"
  },
  "status": "paid",
  "pdf_url": "/demo/invoices/2026-10.pdf",
  "due_at": "2026-10-16T00:00:00.000Z"
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get the current plan#

GET/v2/billing/plan
Response Plan
  • object"plan"
  • org_idId
  • codePlanCode
    "free""starter""growth""enterprise"
  • namestring
  • priceMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • intervalstring enum
    "month""year"
  • limitsobject
    3 fields
    • active_agentsnumber | null
    • decisions_per_monthnumber | null
    • seatsnumber | null
  • renews_atTimestamp
  • payment_methodobject | nulloptional
    3 fields
    • brandstring
    • last4string
    • expstring
  • billing_emailstring | nulloptional
  • scheduled_changeobject | nulloptional

    A plan change waiting for the period end (downgrades).

    3 fields
    • codePlanCode
      "free""starter""growth""enterprise"
    • namestring
    • atTimestamp
Errors
  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/billing/plan" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "plan",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "code": "growth",
  "name": "Growth",
  "price": {
    "amount": 49900,
    "asset": "USD"
  },
  "interval": "month",
  "limits": {
    "active_agents": 50,
    "decisions_per_month": 25000,
    "seats": 25
  },
  "renews_at": "2026-12-05T00:43:11.374Z",
  "payment_method": {
    "brand": "Visa",
    "last4": "2177",
    "exp": "08/28"
  },
  "billing_email": "billing@acme-robotics.example",
  "scheduled_change": null
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

List plans#

GET/v2/billing/plans
Response list of objects

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

  • object"plan_option"
  • codePlanCode
    "free""starter""growth""enterprise"
  • namestring
  • priceMoney | null

    null = priced with sales.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • interval"month"
  • summarystring
  • limitsobject
    3 fields
    • active_agentsnumber | null
    • decisions_per_monthnumber | null
    • seatsnumber | null
  • featuresstring[]
  • contact_salesboolean
Errors
  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/billing/plans" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "object": "plan_option",
      "code": "free",
      "name": "Free",
      "price": {
        "amount": 0,
        "asset": "USD"
      },
      "interval": "month",
      "summary": "Try ndStill with a few agents in test mode and one live rail.",
      "limits": {
        "active_agents": 5,
        "decisions_per_month": 1000,
        "seats": 3
      },
      "features": [
        "5 active agents",
        "1,000 decisions a month",
        "Test mode and replay"
      ],
      "contact_sales": false
    },
    {
      "object": "plan_option",
      "code": "growth",
      "name": "Growth",
      "price": {
        "amount": 49900,
        "asset": "USD"
      },
      "interval": "month",
      "summary": "For teams running agents in production across rails.",
      "limits": {
        "active_agents": 50,
        "decisions_per_month": 25000,
        "seats": 25
      },
      "features": [
        "50 active agents",
        "25,000 decisions a month",
        "Slack and Teams approvals"
      ],
      "contact_sales": false
    },
    {
      "object": "plan_option",
      "code": "enterprise",
      "name": "Enterprise",
      "price": null,
      "interval": "month",
      "summary": "SSO enforcement, SCIM, custom roles and a dedicated cell.",
      "limits": {
        "active_agents": null,
        "decisions_per_month": null,
        "seats": null
      },
      "features": [
        "Unlimited agents and decisions",
        "SSO enforcement and SCIM",
        "Custom data residency"
      ],
      "contact_sales": true
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 3
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get usage meters#

GET/v2/billing/usage
Response list of objects

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

  • object"usage_meter"
  • meterstring enum
    "decisions""active_agents""ai_proxy_tokens""cards_issued""verify_calls""evidence_packs""platform_decisions"
  • labelstring
  • periodstring
  • quantitynumber
  • includednumber | null
  • unitstring
  • dailynumber[]optional

    Per-day counts this period, oldest first (decisions).

Errors
  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/billing/usage" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "object": "usage_meter",
      "meter": "active_agents",
      "label": "Active agents",
      "period": "2026-11",
      "quantity": 25,
      "included": 50,
      "unit": "agents"
    },
    {
      "object": "usage_meter",
      "meter": "decisions",
      "label": "Decisions",
      "period": "2026-11",
      "quantity": 952,
      "included": 25000,
      "unit": "decisions",
      "daily": [
        33,
        39,
        52
      ]
    },
    {
      "object": "usage_meter",
      "meter": "ai_proxy_tokens",
      "label": "AI proxy tokens",
      "period": "2026-11",
      "quantity": 30000000,
      "included": null,
      "unit": "tokens"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 6
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Change plan#

POST/v2/billing/plan
Request body PlanChange
  • codePlanCoderequired
    "free""starter""growth""enterprise"
  • step_upstring
Response Plan

The same Plan object as Get the current plan.

Errors
  • 400invalid_request

    A field is missing or invalid; fields names each one.

  • 401authentication

    The key or token is missing, expired or revoked.

  • 403permission

    The key's scopes or the person's role don't allow this.

  • 409conflict

    The object changed or already exists, or the Idempotency-Key was reused with a different body.

  • 429rate_limited

    Slow down; retry after the Retry-After header.

Example request only (not run: it changes the org for good)
Request
curl -X POST "https://api.ndstill.com/v2/billing/plan" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "free"
  }'
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.