Get input token counts

Returns input token counts of the request.

Returns an object with object set to response.input_tokens and an input_tokens count.

post/responses/input_tokens

Request body

modelstring nullable

Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.

previous_response_idstring nullable

The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state. Cannot be used in conjunction with conversation.

truncation'auto' | 'disabled'
instructionsstring nullable

A system (or developer) message inserted into the model's context. When used along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

parallel_tool_callsboolean nullable

Whether to allow the model to run tool calls in parallel.

Response

Success

object'response.input_tokens' required
input_tokensinteger required

Example response

{
  "object": "response.input_tokens",
  "input_tokens": 123
}

Changes

Changed in 9 of the 31 revisions of this API.4794

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property //////////////////

      new-optional-request-property

    • added the new optional request property //////////////////

      new-optional-request-property

    • added the new optional request property ///////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property //////////////////

      new-optional-request-property

    • added the new optional request property //////////////////

      new-optional-request-property

    • added the new optional request property ///////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property ///////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

    • added to the /// request property anyOf list

      request-property-any-of-added

    • added to the ////////// request property anyOf list

      request-property-any-of-added

    • added to the ////////// request property anyOf list

      request-property-any-of-added

    • added to the // request property anyOf list

      request-property-any-of-added

    • added to the //// request property anyOf list

      request-property-any-of-added

    • added the new auto enum value to the request property /////////

      request-property-enum-value-added

    • added the new auto enum value to the request property /////////

      request-property-enum-value-added

    • added the new auto enum value to the request property //////////

      request-property-enum-value-added

    • added the new auto enum value to the request property //////////

      request-property-enum-value-added

    • added the new max enum value to the request property ///

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////////////

      new-optional-request-property

    • added the new optional request property ////

      new-optional-request-property

  • 506a44267b3f12See the full diff
    • removed the media type application/x-www-form-urlencoded from the request body

      request-body-media-type-removed

    • added the new optional request property //

      new-optional-request-property

    • request property deprecated

      request-property-deprecated

    • added the new optional request property (media type: application/json)

      new-optional-request-property

    • added the new optional request property (media type: application/x-www-form-urlencoded)

      new-optional-request-property

    • added to the //// request property anyOf list (media type: application/json)

      request-property-any-of-added

    • added to the //// request property anyOf list (media type: application/x-www-form-urlencoded)

      request-property-any-of-added

    • the request property //////// became optional (media type: application/json)

      request-property-became-optional

    • the request property //////// became optional (media type: application/x-www-form-urlencoded)

      request-property-became-optional

    • request property //////// deprecated (media type: application/json)

      request-property-deprecated

    • request property //////// deprecated (media type: application/x-www-form-urlencoded)

      request-property-deprecated

    • added to the /// request property anyOf list (media type: application/json)

      request-property-any-of-added

    • added to the /// request property anyOf list (media type: application/x-www-form-urlencoded)

      request-property-any-of-added

  • 737fbb7f6f171612See the full diff
    • removed the enum value 1024x1024 of the request property //////////// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1024x1024 of the request property //////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value 1024x1024 of the request property //// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1024x1024 of the request property //// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value 1024x1536 of the request property //////////// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1024x1536 of the request property //////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value 1024x1536 of the request property //// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1024x1536 of the request property //// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value 1536x1024 of the request property //////////// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1536x1024 of the request property //////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value 1536x1024 of the request property //// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value 1536x1024 of the request property //// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value auto of the request property //////////// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value auto of the request property //////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • removed the enum value auto of the request property //// (media type: application/json)

      request-property-enum-value-removed

    • removed the enum value auto of the request property //// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-removed

    • added the new chatgpt-image-latest enum value to the request property ///////////// (media type: application/json)

      request-property-enum-value-added

    • added the new chatgpt-image-latest enum value to the request property ///////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • added the new chatgpt-image-latest enum value to the request property ///// (media type: application/json)

      request-property-enum-value-added

    • added the new chatgpt-image-latest enum value to the request property ///// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • added the new gpt-image-2 enum value to the request property ///////////// (media type: application/json)

      request-property-enum-value-added

    • added the new gpt-image-2 enum value to the request property ///////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • added the new gpt-image-2 enum value to the request property ///// (media type: application/json)

      request-property-enum-value-added

    • added the new gpt-image-2 enum value to the request property ///// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • added the new gpt-image-2-2026-04-21 enum value to the request property ///////////// (media type: application/json)

      request-property-enum-value-added

    • added the new gpt-image-2-2026-04-21 enum value to the request property ///////////// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • added the new gpt-image-2-2026-04-21 enum value to the request property ///// (media type: application/json)

      request-property-enum-value-added

    • added the new gpt-image-2-2026-04-21 enum value to the request property ///// (media type: application/x-www-form-urlencoded)

      request-property-enum-value-added

    • the //////////// request property type changed from string to no type (media type: application/json)

      request-property-type-changed

    • the //// request property type changed from string to no type (media type: application/json)

      request-property-type-changed

    • added subschema #1 subschema #2 to the //////////// request property anyOf list (media type: application/json)

      request-property-any-of-added

    • added subschema #1 subschema #2 to the //////////// request property anyOf list (media type: application/x-www-form-urlencoded)

      request-property-any-of-added

    • added subschema #1 subschema #2 to the //// request property anyOf list (media type: application/json)

      request-property-any-of-added

    • added subschema #1 subschema #2 to the //// request property anyOf list (media type: application/x-www-form-urlencoded)

      request-property-any-of-added

    • the //////////// request property type was generalized from string to no type (media type: application/x-www-form-urlencoded)

      request-property-type-generalized

    • the //// request property type was generalized from string to no type (media type: application/x-www-form-urlencoded)

      request-property-type-generalized

    • the ////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ///////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ///////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ///////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ///////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the //////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the //////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the /////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the //////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the //////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the /////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the /////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the ////////// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed

    • the //// request property format changed from no format to uri (media type: application/json)

      request-property-type-changed

    • the //// request property format changed from no format to uri (media type: application/x-www-form-urlencoded)

      request-property-type-changed