Skip to main content
Resource providers can charge per call, and listed nodes can charge per script token. Callers pay from their organization’s prepaid USD balance, bought by card. Providers are paid out to a bank account through Stripe Connect. An operator service holds the balances and moves the money. You manage it all on the Stellarium Platform at platform.stellarium.sh. Every amount is an integer number of micro-USD (1 USD = 1,000,000), so 10000 is $0.01. Prices can be fractions of a cent.

The Stellarium Platform

The platform is where an organization buys credits, sees what its nodes spent and earned, enrolls nodes, and sets up payouts. Sign in, then create or join an organization: balances, nodes and payouts belong to organizations, not to individual users. Organization admins can buy credits, manage nodes and set up payouts. Members can view everything.
Stellarium Platform overview showing a $24.96 credit balance, available credit, earnings, and a table of recent paid calls

The overview: the organization's credit balance, what's available to spend, earnings, and recent paid calls.

Organizations and nodes

An organization owns its nodes’ keys, a prepaid balance, and a payable balance of earnings. Calls a node pays for draw on its organization’s balance. Calls to a node’s paid functions are paid into its organization’s earnings. A node key belongs to at most one organization. A node joins an organization with a one-time enrollment token. On the platform’s Nodes page, create a token, then start the node with it set:
.env
The node presents the token to the operator when it starts and joins the token’s organization. After that it needs only its signing key, so the used token can stay in its configuration. A token works once and expires after 24 hours. A node hosting paid functions refuses to start until it’s enrolled.
The Nodes page with a form to create an enrollment token and a table of enrolled nodes with their public keys and status

Nodes: create enrollment tokens, and see or revoke the nodes enrolled in the organization.

Revoking a node stops it from paying or being paid, and its key can never be enrolled again.

Pricing a function

Add a paymentManifest to any function on a resource you register:
You don’t name who gets paid. When your node publishes its resources, it adds recipientOrganizationId, the organization it’s enrolled in, to each paid function’s manifest. Callers see the price and recipient during discovery.

How a paid call works

  1. When a request calls a priced remote function, the caller node creates a payment voucher and signs it with its Ed25519 signing key. The voucher has the amount, the recipient organization, request and invocation IDs, a hash of the call (resource path and name, function, and parameters), the caller’s public key, and an expiry. Callers refuse to pay more than their costLimitMicroUsd per call (10,000 micro-USD, or $0.01, by default).
  2. The provider node refuses a call without a voucher with 402. It checks that the voucher is bound to this exact call, pays at least costMicroUsd to its own organization, hasn’t expired, and is signed by the voucher’s key. If any check fails it responds 400.
  3. The provider asks the operator to authorize the voucher. This places a hold for its amount on the caller organization’s available balance (its balance less other holds). If the operator refuses, the function doesn’t run, and the caller gets the operator’s answer:
  4. The provider runs the function and returns the result.
  5. The provider captures the voucher. The operator charges the caller’s balance, and credits the provider organization’s earnings with the charge less the 20% platform fee. If the function returned an error, the provider releases the hold instead, and nothing is charged. Holds that are neither captured nor released are released ten minutes after their voucher expires.
Authorize, capture and release are each safe to repeat for the same voucher, so nodes retry them freely. Every balance change is a balanced entry in the operator’s double-entry ledger.
The Usage page listing paid calls with time, provider node, token counts, status and amount charged

Usage: each paid call the organization's nodes made, with what it was charged. The Earned tab shows calls to your own functions.

Inference functions

An inference function runs AI inference, so what a call costs depends on the tokens it uses. Declare one with kind: "inference". It must take a maxTokens: int32 parameter, the most output tokens the caller allows, and may take others. Its exec returns { value, usage: { inputTokens, outputTokens } }, and scripts see only value. A paid inference function is priced per million tokens. It must also declare estimateInputTokens, which counts the input tokens a call will use. The estimator runs only on your node, like exec, so it can call a token-counting API such as Anthropic’s.
Either rate may be 0. A call’s charge is ceil((inputTokens × inputRate + outputTokens × outputRate) / 1,000,000) micro-USD. The node refuses to start if an inference function lacks maxTokens, or is paid and lacks per-token rates or an estimator. Neither side has to trust the other’s estimate:
  1. The caller sends the call to the provider’s POST /v1/run/resource/estimate. The provider runs its estimator and answers { inputTokens, maxAmount }, where maxAmount is the charge for those input tokens plus maxTokens output tokens.
  2. The caller checks that maxAmount follows from the advertised rates and is within its inferenceCostLimitMicroUsd. It signs an inference voucher (kind: "inference") carrying maxAmount, both rates and maxTokens, in place of amount. Inference vouchers expire after 10 minutes.
  3. The provider checks the voucher as above, and that its rates match the manifest and its maxTokens matches the call. It runs the estimator again, and refuses with 402 and requiredMaxAmount if the voucher doesn’t cover it.
  4. The provider authorizes the voucher, which holds maxAmount. After the call, it captures the reported usage, with output tokens capped at maxTokens. The operator charges the usage at the signed rates, never more than the hold. A call that costs nothing releases the hold.
An inference function without a paymentManifest is free: it needs maxTokens, but no estimator.

Scripts run by API clients

An organization can also run scripts on another organization’s listed node with an API client, without running a node of its own. The node charges a price per million script tokens the run executes, and the paid functions the script calls are charged at their manifest prices, all from the run’s hold on the client organization’s balance. See API clients and listings.

Contracts

A contract deployed to a node is charged for the script tokens it executes, at the node’s listed price. The caller signs a contract voucher (kind: "contract") with the price and the most it will pay, and the hosting node authorizes a run for the call with it. The paid functions the contract calls draw on that run’s hold, so the caller pays for everything the contract does. Organizations pay a node’s deploy fee, if it sets one, the same way.

Buying credits

On the platform’s Credits page, an admin enters an amount and pays by card through Stripe Checkout. Top-ups are from $10 to $1,000. The balance is credited when Stripe confirms the payment, usually within seconds. Credit doesn’t expire.
The Credits page showing the credit balance, an amount field with Buy credits button, a Manage in Stripe button, and top-up history

Credits: the balance, buying credits through Stripe, the billing portal, and top-up history.

Manage in Stripe opens Stripe’s billing portal for saved cards, billing details and receipts. If a top-up is refunded, the refunded amount is taken off the balance. If its payment is disputed, the disputed amount is taken off as soon as the dispute opens, and returned if the dispute is won. Either can leave the balance negative, and an organization with a negative balance can’t pay for calls until it buys more credit.

Getting paid

Providers are paid through Stripe Connect. On the platform’s Payouts page, an admin clicks Set up payouts and completes Stripe’s onboarding: identity or business details and a bank account. Until it’s finished, calls to the organization’s paid functions are refused with 422, so they never run unpaid. When Stripe confirms the account, the status shows Ready.
The Payouts page showing a Ready payout account, earnings, and payout history with paid transfers

Payouts: the Stripe account's status, earnings, and transfers so far.

Each captured call earns its charge less the 20% platform fee. Earnings are paid out like this:
  • Hold: earnings become payable 7 days after the call.
  • Schedule: an organization is paid at most once a week, once at least $10 is payable.
  • Amount: each payout is a Stripe transfer of the payable earnings in whole cents. Sub-cent remainders and smaller amounts carry over to the next payout.
  • Bank: Stripe then pays the transfer out to your bank on its own schedule.
If a transfer fails or is reversed, its amount returns to your earnings and is paid out later.

The operator

The operator holds every organization’s balance, ledger and receipts, and is the only service that talks to Stripe. Nodes call it as themselves: each request is signed with the node’s Ed25519 key, in an Authorization: Stellarium <credentials> header with a timestamp the operator accepts for five minutes. A voucher may also carry runId, when a script run by an API client makes the call. The run’s hold pays for it instead of the signing node’s organization. The operator’s routes for run tokens and runs are listed under API clients. The platform’s own API and Stripe’s webhooks are served by the operator too. Node operators don’t call them directly.

Current limitations

  • The operator is trusted. It holds every balance, and its ledger is the record of who owes what.
  • US only. Card payments are in USD, and Connect payouts go to US accounts.
  • Nodes can’t change organizations. A node key stays in the organization it first enrolled in, even after it’s revoked. Use a new key to move a node.
To try the full flow locally, including Stripe test mode, see Run a local network.