Skip to content

Agent Pricing

PIE supports a marketplace where agent developers can monetize their agents. This guide covers how pricing works for both developers and users.

Pricing Models

Agents support three pricing models that can be combined:

ModelFieldUnitDescription
Install PriceinstallPriceCentscentsOne-time fee on first install. Reinstalls are free.
Monthly SubscriptionmonthlyPriceCentscentsRecurring 30-day charge. Auto-renewed from user balance.
Per-Usage FeeperUsageMicrodollarsmicrodollarsCharged each time the agent executes (tool call or automation run).
Custom UsagecustomUsageEnabledbooleanLets your code charge variable amounts via context.billing.chargeUsage().

You can combine models. For example, a monthly subscription with a per-usage fee, or just a one-time install price.

Microdollars

All internal amounts use microdollars (1 USD = 1,000,000 microdollars). This allows sub-cent precision for per-usage fees. For install and monthly prices, you set values in cents (e.g., 499 = $4.99).

Setting Prices (Developers)

Use the pricing API to set prices for your agent:

PUT /api/plugins/:id/pricing

Request body:

json
{
  "installPriceCents": 499,
  "monthlyPriceCents": 299,
  "perUsageMicrodollars": 1000,
  "freeUsageQuota": 100
}

This would create an agent that costs:

  • $4.99 one-time install fee
  • $2.99/month subscription
  • $0.001 per use after the first 100 free uses

All fields are optional and nullable. Set a field to null to remove that pricing model.

Free Usage Quota

The freeUsageQuota field lets you offer a number of free executions before per-usage charges begin. This is useful for letting users try your agent before paying.

json
{
  "perUsageMicrodollars": 5000,
  "freeUsageQuota": 50
}

This charges $0.005 per use, but the first 50 uses are free.

Custom Usage Charges

For agents that incur variable costs per execution (phone calls, API pass-through, data processing), enable custom usage charging. This lets your code charge the user any amount during execution using context.billing.chargeUsage().

json
{
  "customUsageEnabled": true,
  "maxCustomChargeMicrodollars": 10000000
}

This enables custom charging with a max of $10.00 per individual charge call.

How it works:

  1. Enable customUsageEnabled via the pricing API
  2. Optionally set maxCustomChargeMicrodollars (defaults to $5.00 / 5,000,000 microdollars if not set)
  3. In your handler, call context.billing.chargeUsage() with the amount and a description
js
async function handler(input, context) {
  const callResult = await makePhoneCall(input.phoneNumber);

  // Charge based on actual call duration
  const costMicrodollars = Math.ceil(callResult.durationMinutes * 50000); // $0.05/min
  await context.billing.chargeUsage({
    amount: costMicrodollars,
    description: `${callResult.durationMinutes}-min call to ${input.phoneNumber}`,
  });

  return { success: true, duration: callResult.durationMinutes };
}

Limits:

  • Minimum charge: 100 microdollars ($0.0001)
  • Maximum charge per call: maxCustomChargeMicrodollars or $5.00 default
  • Maximum 10 charge calls per handler execution
  • Description: 1-200 characters (shown to users in billing history)

Custom usage charges appear as "Agent Charge" in the user's billing history with the description you provide.

Retrieving Prices

GET /api/plugins/:id/pricing

Returns the current pricing configuration (or null if the agent is free).

Revenue Share

  • Developers receive 70% of gross earnings (default)
  • PIE retains a 30% platform fee
  • The platform fee percentage is stored per developer account and may vary

Earnings Tracking

Earnings are tracked per agent per month:

  • Gross earnings: Total amount charged to users
  • Platform fee: PIE's share
  • Net earnings: Amount paid out to developer

Payouts

  • Payouts are processed monthly on the 1st via Stripe Connect
  • Minimum payout: $1.00
  • Developers must complete Stripe Connect onboarding to receive payouts
  • Payout status progresses: pending -> paid

Stripe Connect Setup

To receive payouts, developers create a Stripe Connect Express account:

  1. Go to the Developer page in PIE
  2. Click Set Up Payouts
  3. Complete the Stripe Connect onboarding flow
  4. Once verified, payouts are enabled automatically

You can access your Stripe dashboard at any time to view earnings and payout history.

How Users Are Charged

Prepaid Balance

All agent charges deduct from the user's prepaid balance. Users cannot install paid agents without sufficient balance.

Install Price

When a user installs an agent with an install price:

  1. PIE checks if the user previously purchased this agent (reinstalls are free)
  2. If not, PIE verifies sufficient balance
  3. The install price is deducted
  4. The purchase is recorded to prevent re-charging

Monthly Subscription

When a user installs an agent with a monthly subscription:

  1. The first month is charged immediately
  2. A subscription record is created with a 30-day period
  3. A daily cron job checks for expired subscriptions and auto-renews
  4. If the user's balance is insufficient at renewal, the subscription lapses

Per-Usage Fee

Each time the agent executes (tool call or automation run):

  1. PIE checks if the user is within the free quota
  2. If beyond the quota, the per-usage fee is deducted from balance
  3. Developer earnings are recorded

Top-Ups and Auto-Refill

  • Users can add funds via Stripe Checkout (one-time top-up)
  • Auto-refill can be enabled: when balance drops below a threshold, PIE automatically charges the user's saved payment method
  • Default auto-refill threshold: $5.00, default refill amount: $20.00

Best Practices

  1. Start free - Consider offering a free tier or generous free quota to attract users
  2. Be transparent - Clearly describe what your agent does before users pay
  3. Price fairly - Per-usage fees should reflect actual API costs plus a reasonable margin
  4. Use free quota - Let users try before they buy with freeUsageQuota
  5. Test pricing - You can update pricing at any time via the API

Built with VitePress