For the complete documentation index, see llms.txt. This page is also available as Markdown.

Billing

Inspect costs and credits, configure auto-reload and create payments.

Billing is per organization and admin-only, with ?org= selecting it. Restricted keys also need billing scopes. Project-limited keys cannot run organization billing, except costs with an explicit permitted projectId, still as an admin. REST supports payments; MCP does not buy credits or change auto-reload.

Current balance and billing status of the caller's organization

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
get/billing/balance
GET /v1/billing/balance HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "balanceCents": 1,
  "promoBalanceCents": 1,
  "currency": "text",
  "overLimitCents": 1,
  "status": null,
  "mode": "text",
  "frozen": true,
  "autoReload": {
    "enabled": true,
    "thresholdCents": null,
    "targetCents": null
  }
}

Cost breakdown for a date range of up to 366 days. Default: the current calendar month, UTC

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

startstringOptional

First day, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
endstringOptional

Last day, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
projectIdstringOptional

Limit to one project

Pattern: ^[0-9a-fA-F]{24}$
appIdstringOptional

Limit to one app

Pattern: ^[0-9a-fA-F]{24}$
Responses
200

OK

application/json
get/billing/costs
GET /v1/billing/costs HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "start": "2026-01-01T00:00:00.000Z",
  "end": "2026-01-01T00:00:00.000Z",
  "currency": "text",
  "totalCost": 1,
  "byProject": [
    {
      "projectId": "text",
      "projectName": "text",
      "cost": 1
    }
  ],
  "byApp": [
    {
      "appId": "text",
      "appName": "text",
      "projectId": "text",
      "cost": 1
    }
  ],
  "byResource": [
    {
      "type": "text",
      "cost": 1,
      "usage": 1,
      "unit": "text"
    }
  ],
  "daily": [
    {
      "date": "text",
      "cost": 1
    }
  ]
}

Turn auto-reload on or off and set when the saved card is charged

patch

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 409 no_payment_method: No card is on file; the user adds one in the dashboard (billingUrl)

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Body
enabledbooleanRequired

Reload automatically when the balance drops below the threshold

thresholdCentsinteger · min: 500Optional

Balance that triggers a reload, in US cents; required when enabling

targetCentsintegerOptional

Balance after a reload, in US cents, 500 to 50000 above the threshold; required when enabling

Responses
200

OK

application/json
patch/billing/auto-reload
PATCH /v1/billing/auto-reload HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "enabled": true,
  "thresholdCents": 1,
  "targetCents": 1
}
{
  "enabled": true,
  "thresholdCents": null,
  "targetCents": null
}

Charge the saved card and add the amount to the balance

post

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 400 amount_too_large: The amount exceeds the organization's per-transaction maximum (maxCents)

  • 409 no_payment_method: No card is on file; the user adds one in the dashboard (billingUrl)

  • 403 first_payment_in_dashboard: The organization has never paid on-session; the first payment happens in the dashboard (billingUrl)

  • 429 topup_limit: At most 10 API top-ups per day (resetAt)

  • 402 card_declined: The issuer declined the charge (declineCode)

  • 402 authentication_required: The issuer wants authentication, which needs a browser; pay in the dashboard (billingUrl)

  • 402 blocked_by_risk: The charge was blocked by fraud screening

  • 409 idempotency_conflict: The idempotencyKey was used before with different parameters

  • 409 topup_in_progress: A charge with this idempotencyKey is still running

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Body
amountCentsinteger · min: 500Required

Amount to charge, in US cents (at least 500)

idempotencyKeystring · min: 1 · max: 64Optional

Client token; a retry with the same token returns the original charge instead of making a second one and does not count as another top-up for the day

Responses
200

OK

application/json
post/billing/topups
POST /v1/billing/topups HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41

{
  "amountCents": 1,
  "idempotencyKey": "text"
}
{
  "id": "text",
  "status": "succeeded",
  "amountCents": 1,
  "credited": true,
  "createdAt": "2026-01-01T00:00:00.000Z"
}

State of a top-up charged through the API

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Path parameters
topupIdstringRequired

Top-up id returned when it was created

Pattern: ^pi_[A-Za-z0-9]+$
Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
get/billing/topups/{topupId}
GET /v1/billing/topups/{topupId} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "status": "succeeded",
  "amountCents": 1,
  "credited": true,
  "createdAt": "2026-01-01T00:00:00.000Z"
}

Create a hosted payment page for adding credits by card; nothing is charged until the user completes it

post

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 400 amount_too_large: The amount exceeds the organization's per-transaction maximum (maxCents)

  • 409 no_customer: The organization has no payment profile yet (billingUrl)

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Body
amountCentsinteger · min: 500Required

Amount the page will charge, in US cents (at least 500)

successUrlstring · uriOptional

Where the user lands after paying; defaults to the dashboard billing page

cancelUrlstring · uriOptional

Where the user lands after backing out; defaults to the dashboard billing page

Responses
201

Created

application/json
post/billing/checkout-sessions
POST /v1/billing/checkout-sessions HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 86

{
  "amountCents": 1,
  "successUrl": "https://example.com",
  "cancelUrl": "https://example.com"
}
{
  "id": "text",
  "url": "text",
  "amountCents": 1,
  "expiresAt": "2026-01-01T00:00:00.000Z"
}

List the organization's monthly invoices, newest first. Optionally for one month, status or date range

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

yearinteger · min: 2020 · max: 2100Optional

Invoices of one year

monthinteger · min: 1 · max: 12Optional

Invoices of one month (with year)

statusstring · enumOptional

Invoices in this state

Possible values:
fromstringOptional

Billing periods starting on or after this day, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
tostringOptional

Billing periods ending on or before this day, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
Responses
200

OK

application/json
get/billing/invoices
GET /v1/billing/invoices HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "invoices": [
    {
      "number": "text",
      "period": {
        "start": "text",
        "end": "text"
      },
      "status": "draft",
      "partialMonth": true,
      "currency": "text",
      "totalCents": 1,
      "amountDueCents": 1,
      "closingBalanceCents": 1,
      "createdOn": "text",
      "updatedOn": "text"
    }
  ]
}

Get one invoice with its statement summary, itemized usage and the payments and credits of the period

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Path parameters
invoiceNumberstring · min: 1Required

Invoice number

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
get/billing/invoices/{invoiceNumber}
GET /v1/billing/invoices/{invoiceNumber} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "number": "text",
  "period": {
    "start": "text",
    "end": "text"
  },
  "status": "draft",
  "partialMonth": true,
  "currency": "text",
  "totalCents": 1,
  "amountDueCents": 1,
  "closingBalanceCents": 1,
  "createdOn": "text",
  "updatedOn": "text",
  "customer": {
    "email": "text",
    "name": null,
    "billingEmail": null
  },
  "statement": {
    "openingBalanceCents": 1,
    "closingBalanceCents": 1,
    "amountDueCents": 1,
    "paymentsCents": 1,
    "promosCents": 1,
    "refundsCents": 1,
    "adjustmentsCents": 1,
    "usageCents": 1,
    "taxCents": 1,
    "taxRateBps": 1
  },
  "items": [
    {
      "resource": "text",
      "detail": null,
      "csp": null,
      "region": null,
      "zone": null,
      "kcRegion": null,
      "quantity": 1,
      "unit": "text",
      "unitPrice": 1,
      "amount": 1
    }
  ],
  "credits": [
    {
      "ledgerEntryId": "text",
      "type": "text",
      "at": "text",
      "amountCents": 1,
      "label": "text",
      "paymentMethod": {
        "brand": null,
        "last4": null
      }
    }
  ],
  "finalizedOn": "text",
  "paidOn": "text"
}

Download an invoice as a PDF

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Path parameters
invoiceNumberstring · min: 1Required

Invoice number

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/pdf
Responsestring · binary
get/billing/invoices/{invoiceNumber}/pdf
GET /v1/billing/invoices/{invoiceNumber}/pdf HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary

Usage charges summed per day or per hour, newest first. From the ledger, with the split between serverless apps, dedicated servers and spot leases

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

granularitystring · enumOptional

Sum per day (default) or per hour

Possible values:
fromstringOptional

First day to include, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
tostringOptional

Last day to include, YYYY-MM-DD

Pattern: ^\d{4}-\d{2}-\d{2}$
timeZonestringOptional

IANA time zone the days are counted in, e.g. America/Los_Angeles; UTC by default

limitinteger · min: 1 · max: 200Optional

Items per page, 1 to 200 (default 50)

cursorstring · min: 1 · max: 512Optional

nextCursor from the previous page; omit for the first page

Responses
200

OK

application/json
get/billing/charges
GET /v1/billing/charges HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "charges": [
    {
      "period": "2026-01-01T00:00:00.000Z",
      "amountCents": 1,
      "appsCents": 1,
      "serversCents": 1,
      "spotCents": 1,
      "currency": "text"
    }
  ],
  "nextCursor": null
}

Ledger entries that added or removed credit, newest first. Payments, promotional credit, refunds, adjustments

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

typestring · enumOptional

Only entries of this type

Possible values:
fromstringOptional

First day to include, YYYY-MM-DD (UTC)

Pattern: ^\d{4}-\d{2}-\d{2}$
tostringOptional

Last day to include, YYYY-MM-DD (UTC)

Pattern: ^\d{4}-\d{2}-\d{2}$
limitinteger · min: 1 · max: 200Optional

Items per page, 1 to 200 (default 50)

cursorstring · min: 1 · max: 512Optional

nextCursor from the previous page; omit for the first page

Responses
200

OK

application/json
get/billing/credits
GET /v1/billing/credits HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "id": "text",
      "at": "2026-01-01T00:00:00.000Z",
      "type": "credit_topup",
      "amountCents": 1,
      "currency": "text",
      "status": "text",
      "paymentMethod": {
        "brand": null,
        "last4": null
      },
      "note": null
    }
  ],
  "nextCursor": null
}

List the organization's saved cards and which one is the default

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
get/billing/payment-methods
GET /v1/billing/payment-methods HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "paymentMethods": [
    {
      "id": "text",
      "brand": null,
      "last4": null,
      "expMonth": 1,
      "expYear": 1,
      "default": true,
      "addedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Make a saved card the default for auto-reload and top-ups

post

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 404 not_found: No saved card has this id

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Path parameters
paymentMethodIdstring · min: 1Required

Payment method id from the list

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
post/billing/payment-methods/{paymentMethodId}/default
POST /v1/billing/payment-methods/{paymentMethodId}/default HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "paymentMethods": [
    {
      "id": "text",
      "brand": null,
      "last4": null,
      "expMonth": 1,
      "expYear": 1,
      "default": true,
      "addedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Remove a saved card. A removed default is replaced by the next saved card; auto-reload is switched off when no card is left.

delete

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 404 not_found: No saved card has this id

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Path parameters
paymentMethodIdstring · min: 1Required

Payment method id from the list

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
delete/billing/payment-methods/{paymentMethodId}
DELETE /v1/billing/payment-methods/{paymentMethodId} HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "paymentMethods": [
    {
      "id": "text",
      "brand": null,
      "last4": null,
      "expMonth": 1,
      "expYear": 1,
      "default": true,
      "addedAt": "2026-01-01T00:00:00.000Z"
    }
  ],
  "autoReloadDisabled": true
}

Redeem a voucher code for organization credit; once per person per code

post

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 404 voucher_not_found: No voucher has this code

  • 400 voucher_rejected: The voucher is inactive, used up, not yet valid, or restricted to other accounts

  • 429 too_many_attempts: More than five codes tried in a minute

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Body
codestring · min: 1 · max: 64Required

The voucher code

Responses
200

OK

application/json
post/billing/vouchers/redeem
POST /v1/billing/vouchers/redeem HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "code": "text"
}
{
  "amountCents": 1,
  "redemptionsRemaining": 1
}

Read the organization's node protection setting. Whether its dedicated servers are hibernated automatically when the balance is about to run out, and at how many hours of runway

get

Requires billing:read (View balance, invoices, charges, credits, payment methods and cost breakdowns).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Responses
200

OK

application/json
get/billing/node-protection
GET /v1/billing/node-protection HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "enabled": true,
  "thresholdHours": 1,
  "hibernatedAt": "2026-01-01T00:00:00.000Z",
  "deprovisionedAt": "2026-01-01T00:00:00.000Z"
}

Turn node protection on with a runway threshold, or off. On: when the balance would run out within thresholdHours at the current spend rate, the organization's dedicated servers are hibernated (storage only) until credits are added.

patch

Requires billing:write (Change auto-reload, payment methods and node protection, redeem vouchers, add credits from the saved card).

Errors specific to this operation:

  • 400 org_required: The caller reaches more than one organization and named none; details.orgs lists their slugs

  • 403 key_project_restricted: The key is limited to specific projects, and this acts on the organization

Authorizations
AuthorizationstringRequired

An API key from Account settings, e.g. kn_...

Query parameters
orgstring · min: 3 · max: 39Optional

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Body
enabledbooleanRequired

Turn protection on or off

thresholdHoursinteger · min: 2 · max: 48Optional

Hours of runway that trigger hibernation, 2 to 48; required when enabling

Responses
200

OK

application/json
patch/billing/node-protection
PATCH /v1/billing/node-protection HTTP/1.1
Host: api.kinesis.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "enabled": true,
  "thresholdHours": 1
}
{
  "enabled": true,
  "thresholdHours": 1,
  "hibernatedAt": "2026-01-01T00:00:00.000Z",
  "deprovisionedAt": "2026-01-01T00:00:00.000Z"
}

Was this helpful?