Match the API model
OpenAI's pricing page lists rates by model and usage category. Match the model ID in your API call or usage export, and note the date you checked it. The name in a chat product or an old article may not identify the API SKU on your invoice.
Do the basic calculation
For text usage, multiply input tokens by the input rate and output tokens by the output rate, each divided by one million. Illustratively, 3,000 input at $2 per million plus 1,000 output at $8 per million costs $0.014. These are sample numbers used to show the method, not a current rate for a specific OpenAI model.
Read the remaining line items
Cached input can have a separate price. Batch jobs may qualify for reduced rates. Reasoning models may use billable reasoning tokens in output usage, and tools or multimodal input can have their own charges. Compare the API usage record with the full price sheet, not only the two headline token rates.
Turn usage into a forecast
Sample normal and long requests, then calculate a weighted average by feature. Multiply by expected monthly volume and include retries. Tokens to USD handles standard text-token arithmetic; use your OpenAI dashboard to reconcile the final invoice.