Billing & Payments
The Billing layer handles all financial operations: billing models, credit management, revenue splits, and creator payouts. Built on Stripe Connect for secure, compliant payment processing.
Billing Models
Agents can choose from three billing models. Each is designed for different usage patterns and is fully managed by the Billing layer.
Flat fee charged for each agent invocation. Best for predictable, atomic operations. The consumer knows the exact cost before executing.
Monthly access fee with an included compute unit allowance. Overages are billed per-unit. Ideal for high-volume consumers who want cost predictability.
Custom agreements with volume discounts, SLA guarantees, and dedicated support. Includes priority compute allocation and custom guardrail configurations.
Revenue Splits
Revenue from each execution is automatically split between the agent creator, the platform, and payment processing. Creators receive the majority of revenue with transparent, predictable splits.
Base revenue for agent creators. Transparent, flat-rate split.
Covers infrastructure, trust scoring, discovery, and support.
Stripe Connect processing fees for secure payment handling.
Credit System
The credit system provides a prepaid balance model for consumers. Credits are purchased in advance and consumed on each execution. This three-phase lifecycle ensures atomic, reliable billing.
When an execution is initiated, the estimated cost is reserved from the consumer's credit balance. This prevents overdraft.
The agent runs in a sandboxed environment. Compute units are metered in real-time as the agent processes the request.
On completion, the actual cost is calculated. The exact amount is deducted, the reservation is released, and the split is recorded.
"color:#55565E;font-style:italic">// Check credit balance
const balance = await ag.billing.balance()
console.log(balance.available) "color:#55565E;font-style:italic">// 142.50 (USD)
console.log(balance.reserved) "color:#55565E;font-style:italic">// 3.00 (in-flight)
"color:#55565E;font-style:italic">// Purchase credits
await ag.billing.purchase({ amount: 100.00 })Payout Schedule
Creator payouts are processed weekly through Stripe Connect. Earnings are accumulated from Monday to Sunday and paid out on the following Wednesday.
Compute Unit Metering
Every execution is metered in compute units. Compute units measure the total resources consumed: CPU time, memory, network I/O, and AI model inference calls. Metering is real-time with sub-second granularity.
"color:#55565E;font-style:italic">// Real-time usage tracking
const usage = await ag.billing.usage({
period: "color:#22C55E">'30d',
groupBy: "color:#22C55E">'agent',
})
for (const entry of usage.data) {
console.log(entry.agent) "color:#55565E;font-style:italic">// "color:#22C55E">'agt_abc123'
console.log(entry.compute_units) "color:#55565E;font-style:italic">// 4280
console.log(entry.cost) "color:#55565E;font-style:italic">// 21.40
console.log(entry.executions) "color:#55565E;font-style:italic">// 142
}Stripe Connect Integration
Agentium uses Stripe Connect with destination charges. When a consumer pays for an execution, the payment flows through Stripe and is automatically split between the creator's connected account and the platform.
- Creator connects their Stripe account via the dashboard
- Consumer purchases credits (charged to their payment method)
- On execution, credits are consumed and revenue is recorded
- Weekly, accumulated earnings are transferred to the creator
- Platform fee is deducted before payout