Skip to main content
Replicate is a platform for running open-source machine learning models in the cloud. Their billing model is one of the purest examples of usage-based pricing in the AI industry. There is no monthly subscription fee and no flat rate per model run. Instead, they bill for the exact amount of compute time consumed, down to the second, with rates that vary based on the underlying hardware. This approach works well for AI workloads because execution times are unpredictable. A single user might run a lightweight model for a few seconds or a massive generative model for several minutes. By tying cost to compute resources rather than the model itself, Replicate keeps pricing transparent and scalable.

How Replicate Bills

Replicate’s pricing is decoupled from the specific model being run. Whether you’re generating an image with SDXL or running Llama 3, the billing is determined by the hardware tier and the duration of execution. This lets them host thousands of open-source models without needing a separate pricing plan for each one.
  1. Hardware-Specific Rates: The cost per second varies based on the compute resources required. Each hardware tier has a different price point.
  2. Pure Usage-Based Model: There are no monthly fees, no overages, and no limits. Users are billed for exact compute time (e.g., “12.4 seconds on an A100”) rather than per-generation.
  3. Per-Second Granularity: Traditional cloud providers bill by the hour or minute, leading to waste on short-lived tasks. Per-second billing eliminates this inefficiency for both small experiments and large production workloads.
Cold starts are also billable. The first request to a model often takes 10-30 seconds to load the model into memory. This loading time is billed at the same rate as execution time.

What Makes It Unique

  • Hardware-specific metering: The same model costs more on better hardware. Users choose between speed and cost. A T4 GPU works for non-time-sensitive tasks, while an A100 handles real-time applications.
  • Per-second granularity: Billing is calculated to the second, so users are never overcharged for short tasks.
  • No subscription: Zero commitment to start. It scales infinitely with usage, making it ideal for startups and developers experimenting with different models.
  • Model-agnostic: The billing logic stays the same regardless of task type (image generation, text processing, audio transcription, or video synthesis). This lets the platform support a vast model ecosystem without complex pricing tables.

Build This with Dodo Payments

You can replicate this billing model using Dodo Payments’ usage-based billing features. The key is to use multiple meters to track different hardware tiers and attach them to a single product.
1

Create Usage Meters (One Per Hardware Class)

Create separate meters for each hardware tier. Each hardware type has a different cost per second, so independent metering lets Dodo price each tier differently and provide itemized billing.The Sum aggregation on the execution_seconds property calculates total compute time per hardware tier over the billing period.
2

Create a Usage-Based Product

Create a new product in the Dodo Payments dashboard:
  • Pricing type: Usage Based Billing
  • Base Price: $0/month (no subscription fee)
  • Billing frequency: Monthly
Attach all meters with their per-unit pricing:Set the Free Threshold to 0 for all meters. Every second of execution is billable.
3

Send Usage Events

Send usage events to Dodo whenever a model execution completes. Include a unique event_id for each prediction to ensure idempotency.
4

Measure Execution Time Precisely

Wrap your model execution with precise timing using performance.now(). Round to the nearest tenth of a second for billing.
5

Create Checkout

When a user signs up, create a checkout session for the usage-based product. Dodo handles recurring billing and invoicing automatically.

Accelerate with the Time Range Ingestion Blueprint

The Time Range Ingestion Blueprint simplifies per-second compute tracking. Create one ingestion instance per hardware tier and use trackTimeRange for cleaner event submission.
The blueprint handles duration formatting and event construction. Combined with per-hardware ingestion instances, this pattern cleanly maps to Replicate’s multi-tier metering.
For long-running jobs, combine the Time Range Blueprint with interval-based heartbeat tracking. See the full blueprint documentation for advanced patterns.

Cost Estimation for Users

Since usage-based billing can be unpredictable, provide users with cost estimates before they run a model. This reduces surprise bills and builds trust.

Example Cost Calculations

Building a Cost Calculator

Enterprise: Reserved Capacity

For enterprise customers who need guaranteed availability and no cold starts, Replicate offers “Private Instances” at a fixed hourly rate. With Dodo Payments, model this as a subscription product:
  • Product Type: Subscription
  • Price: Fixed monthly price (e.g., “Reserved A100 Instance - $500/month”)
  • Billing Cycle: Monthly
You can still send usage events for monitoring and analytics, but the subscription covers the cost. As a user’s volume grows, switching from pay-as-you-go to reserved capacity often becomes more cost-effective.

Advanced: Heartbeat Metering

For tasks that take several minutes or hours, sending a single event at the end is risky. If the process crashes, you lose the usage data. A better approach is to send usage events every 30-60 seconds during execution.

Key Dodo Features Used

Usage-Based Billing

Set up products that bill based on consumption.

Meters

Define the metrics you want to track and bill for.

Event Ingestion

Send usage data to Dodo in real-time.

Subscriptions

Manage recurring billing for reserved capacity and enterprise plans.

Time Range Blueprint

Per-second compute tracking with duration helpers.
Last modified on March 25, 2026