{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreich67dobwhc3r5xf3lu4dsgh4oenpvvpojjnjr2yn2ct2fbjxw7w4",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mlsk6mnvcvp2"
  },
  "path": "/t/how-to-calculate-only-uncached-tokens/1380908#post_1",
  "publishedAt": "2026-05-14T08:43:36.000Z",
  "site": "https://community.openai.com",
  "textContent": "An openai Agents SDK returns total agent’s loop tokens usage object as:\n\n\n    inputTokens,\n    inputTokensDetails: [{cached_tokens}],\n    outputTokens\n\n\nso, here the inputTokens are all input tokens, including cached and uncached, or only uncached tokens?\nIs it correct to calculate uncached tokens as `inputTokens - inputTokensDetails.cached_tokens`",
  "title": "How to calculate only uncached tokens"
}