---
title: "Count response input tokens"
method: POST
path: "/v1/responses/input_tokens"
tags: ["responses"]
---

# Count response input tokens

`POST /v1/responses/input_tokens`

## Request body

- CoreResponseInputTokensRequest
  - `context_management` unknown
  - `conversation` union — Conversation accepts either a conversation ID string or an object with id.
    - string
    - CoreResponsesConversationRef
      - `id` string, required
  - `include` string[]
  - `input` union — string or []ResponsesInputElement — see docs for array form
    - string
    - CoreResponsesInputElement[]
      - `arguments` string
      - `call_id` string — Function call fields (type="function_call")
      - `content` union — Can be string or []ContentPart
        - string
        - CoreContentPart[]
          - `image_url` CoreImageURLContent
            - `detail` string
            - `media_type` string
            - `url` string
          - `input_audio` CoreInputAudioContent
            - `data` string
            - `format` string
          - `text` string
          - `type` string
      - `name` string
      - `output` string — Function call output fields (type="function_call_output") - CallID shared above
      - `role` string — Message fields (type="" or "message")
      - `status` string
      - `type` string — "message", "function_call", "function_call_output"
  - `instructions` string
  - `max_output_tokens` integer
  - `metadata` object
  - `model` string
  - `parallel_tool_calls` boolean
  - `previous_response_id` string
  - `prompt` unknown
  - `prompt_cache_retention` string
  - `provider` string — Gateway routing hint; stripped before upstream execution.
  - `reasoning` CoreReasoning
    - `effort` string — Effort controls how much reasoning effort the model should use. Valid values are "low", "medium", "high", "xhigh", and "max". "xhigh" and "max" are supported by newer models such as Claude Opus 4.8; providers downgrade unsupported levels to their nearest equivalent.
  - `safety_identifier` string
  - `service_tier` string
  - `store` boolean
  - `temperature` number
  - `text` unknown
  - `tool_choice` unknown
  - `tools` object[]
  - `top_logprobs` integer
  - `top_p` number
  - `truncation` string
  - `user` string

## Response `200`

OK

- CoreResponseInputTokensResponse
  - `input_tokens` integer
  - `object` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `501` — Not Implemented
- `502` — Bad Gateway

---

[API](https://skmtc.net/enterpilot/apis/gomodel-api.md) · [All operations](https://skmtc.net/enterpilot/apis/gomodel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/enterpilot/gomodel-api/revisions/4c27ea61fcfe/schema)
