Authorization header, and every call you make to GPT-4o, o1, or any other OpenAI model is automatically metered, tagged, and attributed to your budget — no SDK wrappers, no middleware, no refactoring required.
The URL change
Swap the OpenAI base URL for your Tokonomics proxy URL. That is the only code change you need to make.
The upstream path stays exactly the same. For example, a chat completion request hits:
Supported OpenAI paths
Tokonomics forwards requests to any path underhttps://api.openai.com/v1. The most commonly used paths are:
chat/completions— chat models including GPT-4o, GPT-4o mini, and the o-seriesembeddings— text embedding models such astext-embedding-3-smallcompletions— legacy text completion endpoint
Tagging your calls
Add theX-Metering-Tags header to any request to attach structured metadata. Tokonomics stores these tags and lets you query spend broken down by any key.