Streaming and usage
SSE on both dialects, and how every Faucet request is metered — including the ones most gateways record as zero.
Set "stream": true on /v1/chat/completions and you get standard OpenAI SSE
chunks. On /v1/messages, you get Anthropic's native message_start, content
block, message_delta, and message_stop events. Both are forwarded as they
arrive rather than buffered — first token out as soon as the provider emits it.
Usage is recorded on every request
Every endpoint, streamed or not, whether or not you asked for it. The one
deliberately free operation is /v1/messages/count_tokens: its returned
input_tokens guides Claude Code's compaction decision, while Faucet records
the request itself with zero usage and zero cost.
For chat that matters more than it sounds. OpenAI omits token counts from a
stream unless stream_options.include_usage is set, most clients never set it,
and a gateway that simply forwards the omission meters the majority of its
traffic as zero. Faucet forces the flag upstream and reads the counts back
out of the bytes on their way through.
Cached and reasoning tokens are counted separately where the provider prices them separately, and a cancelled stream is still metered for what it generated before you hung up.
Anthropic splits native streaming usage across the stream: input and cache
counts begin on message_start, while cumulative output arrives on
message_delta. Faucet combines those snapshots for billing without changing
the SSE bytes Claude Code receives.
What each endpoint reports
Embeddings and image generation return one document rather than a stream, so their counts simply arrive in the body. Transcription can do either, depending on the model.
| Endpoint | Usage reported |
|---|---|
| Chat | Input and output tokens, with cached and reasoning counted separately where priced separately |
| Embeddings | Input tokens only — a vector is not tokens, and nothing charges for producing one |
| Image generation | Input and output, where the output is the picture — or provider credits on FLUX.2 |
| Image edits | Input split into text and picture, which are priced apart on OpenAI |
| Transcription | Either tokens or audio duration, matching how the selected model is priced |
Because image output tokens are the picture, image generation debits your tokens-per-minute allowance like anything else — and they are large. See Errors and limits.