Run Flux, SDXL, Whisper, and any other Replicate model through Spawnpay with USDC billing per call.
Agentic image / audio / video generation pipelines that need a single billing layer across many models. Multi-tenant tools that charge end-users in USDC and reconcile across providers.
POST/v1/models/black-forest-labs/flux-schnell/predictionsAuthorization$0.001 USDC per upstream 2xx (4xx is free)curl -X POST https://spawnpay.ai/api/proxy \
-H 'Authorization: Bearer spk_live_…' \
-H 'X-Provider-Key: $REPLICATE_KEY' \
-H 'Content-Type: application/json' \
-d '{
"provider": "replicate",
"path": "/v1/models/black-forest-labs/flux-schnell/predictions",
"method": "POST",
"body": {
"input": {
"prompt": "a watercolour painting of a router on fire"
}
}
}'
import { proxy } from 'spawnpay-paywall';
const out = await proxy({
"provider": "replicate",
"path": "/v1/models/black-forest-labs/flux-schnell/predictions",
"method": "POST",
"body": {
"input": {
"prompt": "a watercolour painting of a router on fire"
}
},
"providerKey": process.env.REPLICATE_KEY
});
console.log(out.status, out.body);
console.log('charged', out.charged); // txHash + $0.001 USDC receipt
The full upstream JSON body, the upstream status code, the upstream response headers, plus a charged field with the USDC receipt (tx hash) when the call succeeded.