{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicjlr5tf2sgwcepp4gmszxwjpisk7t6gv4ef32zghx5oppeuuzcjy",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3midygvl2t7a2"
  },
  "path": "/t/issue-with-costs-api-pagination-invalid-page-token-returned/1369109#post_7",
  "publishedAt": "2026-03-31T09:10:32.000Z",
  "site": "https://community.openai.com",
  "textContent": "Thanks for the update. I still can still reproduce the bug though.\n\nHere is what I found:\n\nThe current documentation for `GET /v1/organization/costs` says the next request should use the `next_page` value from the previous response as the `page` parameter.\n\nWhen using grouped Costs queries, the first page returns successfully with `has_more=true` and a `next_page` cursor. But when I send that same `next_page` value in the second request, the API still returns a 400 error saying: `The page token is invalid, have you modified the query parameters?`\n\nAs a comparison, the same endpoint without `group_by` paginated normally across multiple pages in the same test.\n\nSo this does not appear to be fully resolved. From what I observe, the problem seems limited to pagination on grouped `/organization/costs` queries, rather than pagination on the endpoint in general.\n\nCurrent workaround: if you need to paginate Costs results, avoid `group_by` where possible, or keep the grouped query small enough to fit on a single page.\n\nHope this helps!",
  "title": "Issue With Costs API Pagination – Invalid Page Token Returned"
}