Integrations

curl

Copy-paste curl recipes for the Spoof API.

No SDK required. Set your key once and call the API with curl.

export SPOOF_API_KEY="spf_your_key"
bash · 1 lines

A message

curl https://api.spoofzone.com/v1/messages \
  -H "x-api-key: $SPOOF_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [{ "role": "user", "content": "Hello, Spoof!" }]
  }'
bash · 8 lines

Streaming

Add "stream": true and let curl print the event stream as it arrives:

curl -N https://api.spoofzone.com/v1/messages \
  -H "x-api-key: $SPOOF_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 512,
    "stream": true,
    "messages": [{ "role": "user", "content": "Write a haiku about the sea." }]
  }'
bash · 9 lines

An image

curl https://api.spoofzone.com/v1/images/generations \
  -H "x-api-key: $SPOOF_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "prompt": "an isometric cozy cafe on a floating island",
    "size": "1K"
  }'
bash · 8 lines

Bill a specific chain on any call by adding -H "x-spoof-billing-chain: arbitrum". See Billing chains.

curl | Spoof