You are not charged for the model's tokens when an answer comes back empty or ends in an error.
Every request is charged the provider's real bill for it, converted to DA. When a model's answer comes back empty or ends in an error, that bill carries no charge for the model's tokens — so neither does your wallet. It applies to every account, every model and every provider, with nothing to switch on.
No charge is taken for the model's prompt, completion or reasoning tokens when:
finish_reason: "error").The same holds for other kinds of output: a speech answer is not billed until it delivers usable audio, and a picture answer that returns no decodable picture is not billed.
max_tokens, or that you closed, delivered usable output: it is billed on what the provider produced.400, 401, 402 — never reaches a model and charges nothing either.Nothing is held or reserved before a request runs. Your wallet admits the request while your balance is above zero; when the answer is done, its real bill is converted to DA and taken off your balance once. An empty or failed answer has a real bill of zero for its tokens, so nothing is taken for them.
Each request, and what it was charged, appears in your activity within seconds of the answer completing.
Note. The insurance does not replace retry logic. For production work, back off and retry on
503and504, and consider model fallbacks so a request can move to another model when the first is unavailable.