responses

Count response input tokens

post/v1/responses/input_tokens

Request body

{"stackTrail":"components:schemas:core.ResponseInputTokensRequest:properties:context_management","oasType":"schema","type":"unknown"}
includestring[]
instructionsstring
max_output_tokensinteger
metadataobject
modelstring
parallel_tool_callsboolean
previous_response_idstring
{"stackTrail":"components:schemas:core.ResponseInputTokensRequest:properties:prompt","oasType":"schema","type":"unknown"}
prompt_cache_retentionstring
providerstring

Gateway routing hint; stripped before upstream execution.

safety_identifierstring
service_tierstring
storeboolean
temperaturenumber
{"stackTrail":"components:schemas:core.ResponseInputTokensRequest:properties:text","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:core.ResponseInputTokensRequest:properties:tool_choice","oasType":"schema","type":"unknown","description":"string or object"}
toolsobject[]
top_logprobsinteger
top_pnumber
truncationstring
userstring

Response

OK

input_tokensinteger
objectstring

Changes

Changed in 3 of the 53 revisions of this API.24

    • added the optional property error/provider to the response with the 400 status

      response-optional-property-added

    • added the optional property error/provider to the response with the 401 status

      response-optional-property-added

    • added the optional property error/provider to the response with the 501 status

      response-optional-property-added

    • added the optional property error/provider to the response with the 502 status

      response-optional-property-added

    • added the new optional request property context_management

      new-optional-request-property

    • added the new optional request property conversation

      new-optional-request-property

    • added the new optional request property include

      new-optional-request-property

    • added the new optional request property max_output_tokens

      new-optional-request-property

    • added the new optional request property parallel_tool_calls

      new-optional-request-property

    • added the new optional request property previous_response_id

      new-optional-request-property

    • added the new optional request property prompt

      new-optional-request-property

    • added the new optional request property prompt_cache_retention

      new-optional-request-property

    • added the new optional request property safety_identifier

      new-optional-request-property

    • added the new optional request property service_tier

      new-optional-request-property

    • added the new optional request property store

      new-optional-request-property

    • added the new optional request property temperature

      new-optional-request-property

    • added the new optional request property text

      new-optional-request-property

    • added the new optional request property tool_choice

      new-optional-request-property

    • added the new optional request property tools

      new-optional-request-property

    • added the new optional request property top_logprobs

      new-optional-request-property

    • added the new optional request property top_p

      new-optional-request-property

    • added the new optional request property truncation

      new-optional-request-property

    • added the new optional request property user

      new-optional-request-property

    • endpoint added

      endpoint-added