APIs & Developers Supported by aipp architecture

Get Paid Before Compute

Require payment before triggering expensive AI models, APIs, GPU inference, or compute jobs.

Target Audience: AI developers, API providers, cloud engineers, serverless architects, and automation operators.

The Real Problem

Executing digital actions (LLM tokens, GPU inference, third-party API calls, proxy scraping, data processing) creates immediate provider expense. In conventional billing models, providers fund compute execution first and attempt to bill customers later, taking on financial risk.

Real-World Example: For example, an AI generation API or automated research tool could require payment before invoking GPU inference or third-party paid APIs, ensuring compute costs are funded before execution.

How aipp Solves It

aipp gates your compute handler with an HTTP 402 challenge header or Smart Tag. When a client requests execution, aipp returns a payment requirement. Once the Lightning or USDC payment is verified, your backend executes the compute job.

Step-by-Step Payment Flow

STEP 01 Compute Request Client submits parameters for a resource-intensive job.
STEP 02 402 Invoice Server issues HTTP 402 challenge with upfront job price.
STEP 03 Payment Settlement Client settles invoice via Lightning or Base USDC.
STEP 04 Compute Execution Server verifies payment proof and executes the compute work.

Scope & Boundaries

What aipp Does
  • Exposes a payment requirement before expensive execution starts
  • Verifies Lightning or Base USDC payment settlement proof
  • Allows the protected application to execute after successful verification
  • Auto-forwards net earnings to merchant wallet
What aipp Does Not Do
  • Does not provide LLMs, GPU hardware, proxies, or compute resources
  • Does not calculate underlying cloud costs or meter tokens after execution
  • Does not automatically determine what an action should cost (merchant defines price)
  • Does not perform dynamic post-execution variable bill-back

Implementation Pattern

Below is the minimal implementation pattern using standard aipp endpoints / SDK:

import { Aipp, l402Paywall } from 'aipp-sdk'; // Require upfront payment before executing expensive compute app.post('/api/compute-job', l402Paywall({ client: aipp, amountUsd: 0.10 }), async (req, res) => { const result = await executeExpensiveCompute(req.body); res.json({ result }); });
Settlement Architecture Note:
Lightning Rail: In hosted Lightning flows, payments route through aipp's Lightning gateway before net proceeds are automatically forwarded to your configured wallet address.
Base USDC Rail: USDC transfers settle directly on-chain to your designated EVM wallet address.
No Merchant Spending Balance: aipp does not maintain a spendable merchant balance or require manual withdrawal steps.

Requirements & Limitations

Frequently Asked Questions

How is this different from Get Paid Before Delivery?

Get Paid Before Delivery protects an existing file or asset. Get Paid Before Compute gates the resource invocation itself so providers do not fund execution costs upfront.

Does aipp track token usage during execution?

No. aipp requires a known price set by the merchant before execution starts. It does not perform dynamic post-execution token metering.

Related Use Cases

AI & Agents Paid AI Image Generation Require payment before triggering GPU-intensive AI image generation models. Data & Research Paid Web Scraping & Data Extraction Monetize URL extraction, page rendering, and web scraping APIs per request. AI & Agents Paid Audio & Video Transcription Charge per audio or video file transcription job without subscriptions. Content & Digital Goods Paid Report & Document Generation Sell automated PDF reports, SEO audits, and company analyses on demand. APIs & Developers Paid Data API Sell specialized market data, weather metrics, analytics, and datasets per request. APIs & Developers Pay per API Call Charge per HTTP request using L402 or Base USDC HTTP 402 challenge headers. Creators & Independent Work Get Paid Before Digital Delivery Require verified Lightning or Base USDC payment before releasing custom digital deliverables to clients.

Implement Get Paid Before Compute with aipp

Read the developer documentation or generate your API key to gate requests behind Lightning and Base USDC payments.

View Developer Docs → Open Studio Console