Core concepts

Streaming

Receive tokens as they are generated with server-sent events.

Set "stream": true on a Messages request to receive the response incrementally as server-sent events (SSE). The event stream matches the Anthropic Messages API exactly, so any compatible client parses it unchanged.

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": 1024,
  "stream": true,
  "messages": [{ "role": "user", "content": "Write a haiku about the ocean." }]
}'
bash · 9 lines

If a stream stops early because max_tokens hit the server ceiling, the response carries an x-spoof-clamped-max-tokens header noting the original value you requested.

Streaming | Spoof