Stability AI via Spawnpay

SDXL, Stable Image Core, Stable Audio — Stability AI behind Spawnpay routing + USDC receipts.

BYOK $0.001 / 2xx No reselling — your upstream relationship stays exactly as it is.

Why route through Spawnpay

Image-gen agents that want Stability alongside FLUX/DALL-E with one budget. Multi-model fallback where the cheaper Stability render is the default.

Endpoint

Method
POST
Upstream path
/v2beta/stable-image/generate/core
Upstream auth
Authorization
Auth note
X-Provider-Key becomes "Authorization: Bearer …" upstream.
Routing fee
$0.001 USDC per upstream 2xx (4xx is free)
Provider docs

curl

curl -X POST https://spawnpay.ai/api/proxy \
  -H 'Authorization: Bearer spk_live_…' \
  -H 'X-Provider-Key: $STABILITY_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "stability",
  "path": "/v2beta/stable-image/generate/core",
  "method": "POST",
  "body": {
    "prompt": "a watercolour robot"
  }
}'

Node (spawnpay-paywall)

import { proxy } from 'spawnpay-paywall';

const out = await proxy({
  "provider": "stability",
  "path": "/v2beta/stable-image/generate/core",
  "method": "POST",
  "body": {
    "prompt": "a watercolour robot"
  },
  "providerKey": process.env.STABILITY_KEY
});

console.log(out.status, out.body);
console.log('charged', out.charged); // txHash + $0.001 USDC receipt

What you get back

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.

▶ Try Stability AI live → 60-sec quickstart All providers