AI Gateway pricing discrepancy between documented rates and actual charges

I’m seeing significant discrepancies between the documented AI Gateway pricing and what’s actually being charged. I’ve done detailed analysis on two models and the numbers don’t add up.

Gemini 2.5 Pro

Documented pricing: $1.25/1M input, $10.00/1M output

Actual requests from my dashboard:

image

Back-calculating from the actual charges gives approximately $1.73/1M input and $43.74/1M output - significantly higher than documented, especially for output tokens (4.4x higher).

Request 1: 4900i + 46o = 0.01049125  
Request 2: 3300i + 443o = 0.02508875

Solve for i from Request 1:  
i = (0.01049125 - 46o) / 4900

Substitute into Request 2:  
3300 × (0.01049125 - 46o) / 4900 + 443o = 0.02508875

Solve for o:  
0.007068 - 30.98o + 443o = 0.02508875  
412.02o = 0.018021  
o = 0.0000437 per token = $43.74 per 1M output tokens

Plug o back in to get i:  
i = (0.01049125 - 46 × 0.0000437) / 4900  
i = 0.00848 / 4900  
i = 0.00000173 per token = $1.73 per 1M input tokens

Verification

Using $1.73/1M input and $43.74/1M output:

Request 1: 4900 × $1.73/1M + 46 × $43.74/1M = $0.00848 + $0.00201 = $0.01049  
Request 2: 3300 × $1.73/1M + 443 × $43.74/1M = $0.02509

Both match the actual charges.

I had similar results with gpt-5-mini. Not as extreme as this but they were still consistently wrong.

Gemini 2.5 Pro is $1.25/M input, $10.00/M output, and $35.00/K (+input tokens) for web searches. Did you have web searching enabled? Also, could you please provide a full screenshot of the charges, because I can’t tell what columns are what in the dashboard screenshot you shared :smiley:

Thank you for the detailed post! I’ve shared it with the AI Gateway team, and we’re looking at deploying a fix. I’ll let you know once we do!

2 Likes

No web search. Columns from left to right are date, model, provider, cost, input tokens, output tokens, duration.

1 Like

Thank you! Im already seeing new columns for “cache read”, “cache write”, and “reasoning”, are those related to this fix?

2 Likes

Hi Grant! I’m on the AI Gateway team - thanks for sharing this! We looked into your usage and can confirm this was due to reasoning tokens, which were not previously shown in the dashboard. We’ve added the new columns that you flagged above to make it easier to match to the cost of the request. Hopefully this fixes any confusion and lets you track your AI Gateway requests more accurately, thanks again for the feedback.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.