# Cost Information Now Included in API Response JSON!

**URL:** <https://community.perplexity.ai/t/cost-information-now-included-in-api-response-json/833>\
**Category:** Announcements\
**Created:** [August 1, 2025, 12:40am UTC](https://community.perplexity.ai/t/cost-information-now-included-in-api-response-json/833 "2025-08-01T00:40:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikvang](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vikvang](https://community.perplexity.ai/u/vikvang)\
**Post date:** [August 1, 2025, 12:40am UTC](https://community.perplexity.ai/t/cost-information-now-included-in-api-response-json/833/1 "2025-08-01T00:40:37Z")

</div>

We’re excited to share a new update for all Sonar API users: the API response JSON now includes detailed cost information for each request!

You’ll now see a new structure like this in your response:

`“usage”: {`  
` “prompt_tokens”: 8,`  
` “completion_tokens”: 439,`  
` “total_tokens”: 447,`  
` “search_context_size”: “low”,`  
` “cost”: {`  
` “input_tokens_cost”: 2.4e-05,`  
` “output_tokens_cost”: 0.006585,`  
` “request_cost”: 0.006,`  
` “total_cost”: 0.012609`  
` }`  
`}`

**What’s included?**

- **input\_tokens\_cost** : Cost attributed to input tokens.

- **output\_tokens\_cost** : Cost attributed to output tokens.

- **request\_cost** : Fixed cost per request.

- **total\_cost** : The total cost for this API call.

This update enables easier tracking of usage and billing directly from each API response.

If you have feedback or questions, drop them below!
