Why are my api costs so high?

I got only one workflow execution but 13$ costs for the 23. , this doesnt seam right!

1 Like

Hi,

If you want to check where that $13 actually comes from, look in two places:

• Settings —>Billing —>Billing history (every payment / auto-recharge)

• Dashboard —> Usage (actual model usage per day, per project)

The console screenshot only shows the details of one response, it doesn’t represent your total spend. If Billing history shows a $10 auto-recharge + some usage, that could explain the $13.

Also check if auto-recharge is enabled.

the usage shows that its 13$ for one day. but i had my code only runned once

Got it I’ll check billing history and usage to track down where the $13 came from.

Just to be clear, the purple bar you’re looking at is usage, not a billing charge.

•Usage = how much model activity happened that day (converted into $).

•Billing history = the actual money taken from your card.

So even if your code ran once, anything else that hit the API that day is summed into that $13 usage total. Your real charge will always show up under Billing —> Billing history, not on the usage chart.

Just to be clear and offer correction: the purple bar is actual billed usage that incurred costs to an organisation, measured in dollars.

It is not merely API call usage, as non-billed API use, such as for complementary daily tokens, is not included there and does not show a dollar figure.

Billing → billing history will have nothing to do with API usage on a prepaid account. That is where your manual purchase of credit balance amounts appear, or large increments of credit card charges if “recharge” is set and the balance drops below the refill threshold.


By hover over the purple bar, you absolutely see daily billed amount from 00:00 UTC on a day resulting from API usage. Further, you can select “group by” → model, or key, and see a breakdown of what API model was employed, or what cost category incurred the billing. Note that “playground” usage is not free.

If it is completely unexpected use that you find, such as sora-2 but you never used that model, you may need to discover if there is ongoing abuse by a leaked API key, revoke all keys, and review that you have never committed code anywhere with hard-coded API keys.

Just to be clear (x3)….didn’t we basically say the same thing, just wearing different outfits?:relieved_face:

Why my feedback? You say, “actual model usage per day”, or “how much model activity happened that day”.

I can have a bar with costs incurred by:

  • having a vector store collection >1GB in size, where there are simply daily costs billed by the size of idle storage (not “actual model usage”)

I can have a bar with no costs by:

  • being enrolled in data sharing, having free usage up to 250k tokens daily (not “actual model usage”)

Those are counter-examples to your simple statement.

“If billing history shows a $10 auto-recharge”, you write. However, those payments “could explain the $13” in the purple usage is additionally false. I can purchase $50 and it will not show up as “usage”.

Thus, credit purchase, manual or automatic, is not any source of “usage” in the bar report.


So, “I had my code only runned once” reported here needs more investigation into where the billings originated, noted to be in an upward trend over several days: can the “code” make iterative calls, employ tools that have per-use billings, employ expensive models? Or…can the “code” leak API keys or allow unauthorized usage via its interface?

The platform site will not only show “group by” buckets of billing types, but also has individual categories below this main display that allow further investigation of actual API calls by endpoint, tokens, by counts. A deep dive will allow one to understand the source of usage billing.

Yeah, I hear you, there are deeper layers to usage that go beyond straightforward model activity. My answer was focused on what the OP was actually asking: why their chart shows $13 when they believe their code only ran once.

Your explanation covers the broader system architecture…mine addressed the practical confusion in front of them.

Different scopes, both useful depending on what the person was trying to understand😏