#Unexpected Costs Caused by 200 Status Code and Empty Response Despite Content Filter Blocking

9 messages · Page 1 of 1 (latest)

ripe sleet
#

Hello,
We are experiencing an issue while using the Gemini 2.5 Pro model, where a response is blocked by the content filter, but the server still returns a 200 OK status code. As a result, tokens are consumed during the reasoning phase, but the actual response is empty. This leads to unintended charges due to token usage without any usable output.

Could you please explain why this issue occurs and whether there is a way to detect or avoid such cases in advance?

Thank you.

desert saddleBOT
#

I'm an AI assistant - my answers may be incorrect and I cannot see screenshots. Please verify information with the OpenRouter docs.

According to the OpenRouter documentation, you are protected from being charged for empty responses by a feature called "zero completion insurance." Specifically:

"When a response contains no output tokens and either has a blank finish reason or an error, you will not be charged for the request, even if the underlying provider charges for prompt processing... Zero completion insurance is automatically enabled for all accounts and requires no configuration."

"When a response meets either of these conditions, no credits will be deducted from your account:

  • The response has zero completion tokens AND a blank/null finish reason
  • The response has an error finish reason"

"On your activity page, requests that were protected by zero completion insurance will show zero credits deducted."
Zero Completion Insurance

So, even if the API returns a 200 status code and the response is empty due to a content filter, you should not be charged for output tokens if the above conditions are met.

If you believe you are still being charged for such requests, please check your activity page for zero-deducted credit entries. If you see actual charges for zero-token/empty responses, contact mods through the Discord server for investigation.

Currently, there is no documented way to detect or avoid these cases before sending the request, as content filtering happens after token processing. The insurance mechanism is designed to prevent unintended charges after the fact.

For further details or unresolved billing issues, contact mods through the Discord server.

-# This is an automated response. Use !mute to stop the bot from responding.

OpenRouter

The unified interface for LLMs. Find the best models & prices for your prompts

ripe sleet
#

<@&1384697330254610442>

desert saddleBOT
#

According to the OpenRouter documentation:
"When a response contains no output tokens and either has a blank finish reason or an error, you will not be charged for the request, even if the underlying provider charges for prompt processing... Zero completion insurance is automatically enabled for all accounts and requires no configuration." Additionally:
"When a response meets either of these conditions, no credits will be deducted from your account:

  • The response has zero completion tokens AND a blank/null finish reason
  • The response has an error finish reason"

Requests protected by this insurance show zero credits deducted on your activity page.
Quote:

"Zero completion insurance is automatically enabled for all accounts and requires no configuration."
Zero Completion Insurance

Content filtering happens after the initial token processing and reasoning, and OpenRouter cannot prevent provider-side compute/tokens from being used before moderation blocks are applied. The insurance is there to avoid charges for unusable/empty responses.

If you are seeing charges for these cases, check your activity page and contact mods through the Discord server for further investigation.

Detection or avoidance: There is no way to detect or prevent these cases in advance, as moderation occurs post-inference. The insurance is the mechanism OpenRouter uses to address this issue after the fact.
Zero Completion Insurance

-# This is an automated response. Use !mute to stop the bot from responding.

ripe sleet
#

The request incurred a total cost of $0.00603464.

desert saddleBOT
#

Bot has reached the maximum number of messages for this thread.

distant hazel
#

PROHIBITED_CONTENT finish reasons come from google directly, and it means you broke Google's terms of service, these requests are still charged to openrouter, so openrouter charges the end user responsible

#

If you are seeing a lot of PROHIBITED_CONTENT requests, you must re-evaluate your requests, as we may take action against your account for breaking Google ToS @ripe sleet

ripe sleet