Responses API: new field in return, "billing", answering 'was it free?'

Just noticed this new "billing" key being returned in the response object of Responses (but not Chat Completions):

{
  "id": "resp_12345",
  "object": "response",
  "created_at": 1760179000,
  "status": "completed",
  "billing": {
    "payer": "openai"
  },

Billing seems to be an object with two string enums for “payer”:

  • {'payer': 'openai'} - if you are getting complementary tokens
  • {'payer': 'developer'} - if it is billed to your account

I expect with the latter being “developer”, there is just a choice of two, as I cannot extrapolate other calls that would give other values (maybe “ChatGPT subscription?”). Just a signal that your credit balance wasn’t consumed.

If you are enrolled in data sharing for training with free daily tokens, this seems to be an indicator whether the call cost you or not. Change to a model out of the program, such as “gpt-3.5-turbo”, and see the payer switch.

The key is undocumented across API reference or SDKs or OpenAPI specification.
After an SDK module call, it can be obtained by response.billing, but is not typed or hinted in IDEs.

1 Like