Fireworks AI via Spawnpay

Fast hosted inference for Llama, Qwen, DeepSeek, Mixtral — Fireworks AI under Spawnpay billing.

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

Why route through Spawnpay

Latency-sensitive open-source-model agents. Multi-tenant tools needing per-customer Fireworks usage receipts.

Endpoint

Method
POST
Upstream path
/inference/v1/chat/completions
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: $FIREWORKS_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "fireworks",
  "path": "/inference/v1/chat/completions",
  "method": "POST",
  "body": {
    "model": "accounts/fireworks/models/llama-v3p1-70b-instruct",
    "messages": [
      {
        "role": "user",
        "content": "hello"
      }
    ]
  }
}'

Node (spawnpay-paywall)

import { proxy } from 'spawnpay-paywall';

const out = await proxy({
  "provider": "fireworks",
  "path": "/inference/v1/chat/completions",
  "method": "POST",
  "body": {
    "model": "accounts/fireworks/models/llama-v3p1-70b-instruct",
    "messages": [
      {
        "role": "user",
        "content": "hello"
      }
    ]
  },
  "providerKey": process.env.FIREWORKS_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 Fireworks AI live → 60-sec quickstart All providers