On the Claude API, you are no longer billed for a request when it returns stop_r
On the Claude API, you are no longer billed for a request when it returns stop_reason: "refusal" without Claude having generated any output. See Streaming refusals for detecting and handling refusals.
Source: Claude Platform release notes (view original)