API Usage Cost Guides

Start with the API that produced your response. Each guide shows which fields to copy and how cached tokens affect the estimate.

Already have a response?

Copy the response's usage or usageMetadata object and select the exact model, or paste the whole response to detect the model automatically. A standalone object keeps prompts and generated text out of the editor.

Open the calculator