Skip to Content

Cache hit rate and gross margin

Returns the cache statistics of the whole service: today's and this month's hit rate, the calls that actually reached the upstream, and the effective upstream cost and Bulk gross margin that follow from the hit rate. A cache hit costs zero upstream, so this is the number that decides the margin.

GET
/v1/cache

Returns the cache statistics of the whole service: today's and this month's hit rate, the calls that actually reached the upstream, and the effective upstream cost and Bulk gross margin that follow from the hit rate. A cache hit costs zero upstream, so this is the number that decides the margin.

Authorization

headerX-API-KEY<token>

Response Body

OK

application/json
  1. response
data*
meta?
Example Request
curl -X GET 'https://api.agenttweet.com/v1/cache'
Example Response
{  "data": {},  "meta": {    "count": 0,    "cursor": "string",    "provider": "string",    "cached": true,    "tokens_raw": 0,    "tokens_flat": 0,    "tokens_saved": 0,    "tokens_saved_pct": 0,    "tokens_billed": 0,    "cost_usd": 0,    "balance_usd": 0,    "request_id": "string"  }}