How a request is charged
Because input and output cost the same, only the total matters:
cost in USD = total tokens / 1,000,000 × 0.33Worked example: 800,000 input tokens plus 200,000 output tokens is 1,000,000 tokens, so the cost is $0.33.
For more worked numbers, see Estimating Costs. For input and output tokens in general, see Input vs. Output Tokens.
What isn't charged
luv13.ai/docs says failed or empty calls aren't charged, so a request that errors costs nothing.
The rate is set by the operator; Pricing is the source of truth.
