Skip to content

An optional per-call settlement lane (x402) for Serverless endpoints #601

Description

@dhyabi2

Motivation

RunPod Serverless is billed per second of compute — from the moment a worker starts until it
fully stops, rounded up, on the GPU tier in play (e.g. ~$0.00016/s on A4000 through ~$0.0024/s
on B200). With Flex workers scaling to zero when idle, the unit you actually charge for is the
individual job a caller submits to an endpoint: one /run or /runsync request, one worker's
execution time, a cost that lands in fractions of a cent up to a few cents for a single
inference.

That is exactly the tier where the settlement rail outweighs everything else. When the caller
is an AI agent invoking one endpoint once, a per-call cost of fractions of a cent cannot
sensibly carry an API key, a prepaid balance, a minimum top-up or a card on file. The smaller
the payment, the more the rail itself matters — and today there is no per-call, no-account,
feeless way for an autonomous agent to pay for a single Serverless job on RunPod.

Proposed solution

Offer the x402 protocol (HTTP 402 Payment Required) as an optional settlement path on
Serverless endpoints, paired with a feeless settlement network (Nano/XNO — zero
transaction fees, sub-second finality). The flow:

  1. An agent calls an endpoint tokenlessly; the endpoint answers 402 with a pay_to address
    and an amount.
  2. The agent settles in XNO and retries with the receipt in the request.
  3. RunPod verifies (a short on-chain check), runs the job, and returns the result — one HTTP
    round-trip, no account, no card, no minimum.

The billing you already do gives you the exact number to quote: the per-second GPU rate times
the job's expected execution time is a natural maxAmountRequired for that endpoint and GPU
tier. Because the RunPod caller side is an SDK (runpod-python), a small client helper that
mounts an x402 payment handler would give existing users a copy-paste-able shape to run today.

Alternatives

  • Prepaid credit / top-up balances: workable, but they put a top-up and minimum-balance step
    between an agent and a single cheap job — disproportionate at sub-cent costs.
  • Card on file per human account: not a path an autonomous agent can walk.
  • API-key gating: fine for a single operator, but it does not scale to dozens of agent callers
    each paying for their own invocation.
    The x402 + feeless lane is additive: keep every existing model, add the no-account per-call
    path for agents.

Additional context

x402 is an open, neutral standard for internet-native per-request payments (https://x402.org).
Feeless settlement means a job priced in fractions of a cent settles for the value of the call
itself, same round-trip, no fee floor. Happy to put together a working reference handler
against a Serverless endpoint (or a client snippet in runpod-python) if that would help the
discussion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions