Agentic Payments
Pay via MPP to add credits and obtain (or refresh) an API key, then call the standard /v1/openai/* endpoints with it as a Bearer token.
Payment rails: every challenge offers both, as two separate WWW-Authenticate header instances. Pay whichever one you can and retry with that rail's credential:
Stripe (
method="stripe"): pay with a Stripe card or Link Shared Payment Token. Retry withAuthorization: Payment <stripe-credential>.Tempo (
method="tempo"): pay with on-chain USDC on the Tempo network. Retry withAuthorization: Payment <tempo-credential>.
Amount: defaults to $5.00; pass amount_cents to choose a size (clamped to the credit-purchase limits). Send the same amount_cents on the paid retry as on the challenge call.
Headers:
Authorization: Payment <credential>— the MPP payment credential.X-API-Key: sk_…(optional) — refill an existing org; omit to mint a new org + key (returned once in the response body).
Top-up size in cents. Defaults to 500 ($5.00). Range $1.00–$10,000.00. Must be identical on the challenge call and the paid retry.
500Successful Response
Payment required. Two WWW-Authenticate: Payment header instances are returned, one per supported rail (method="stripe" and method="tempo"), each quoting the top-up amount; pay either and retry.
Validation Error
POST /v1/mpp/topup HTTP/1.1
Host: api.lightningrod.ai
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"amount_cents": 500
}{
"organization_id": "text",
"credited_cents": 1,
"api_key": "text",
"api_key_id": "text"
}Last updated
Was this helpful?
