---
title: "Count Input Tokens"
method: POST
path: "/v1/responses/input_tokens"
tags: ["responses"]
---

# Count Input Tokens

`POST /v1/responses/input_tokens`

## Request

- Base URL: `https://api.mistral.ai`
- URL: `https://api.mistral.ai/v1/responses/input_tokens`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mistral/apis/mistral-ai-api/docs/v1/responses/input_tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Count response input tokens.

Count the input tokens for a Responses request without generating a
response. The count includes the supplied conversation, instructions,
and tool definitions.

Use the same input, instructions, and tools that you plan to send when
creating a response. For multi-turn conversations, include prior output
items and function results in input.

## Request body

- CountResponseInputTokensRequest
  - `model` string, required
  - `input` union, required
    - string
    - union[]
      - union
        - object
          - `content` union, required
            - string
            - union[]
              - …
          - `role` 'user' | 'assistant' | 'system' | 'developer', required
          - `phase` 'commentary' | 'final_answer', nullable
          - `type` 'message', nullable
        - object
          - `content` union[], required
            - union
              - …
          - `role` 'user' | 'system' | 'developer', required
          - `status` 'in_progress' | 'completed' | 'incomplete', nullable
          - `type` 'message', nullable
        - object
          - `id` string, required
          - `content` union[], required
            - union
              - …
          - `role` 'assistant', required
          - `status` 'in_progress' | 'completed' | 'incomplete', required
          - `type` 'message', required
          - `phase` 'commentary' | 'final_answer', nullable
        - object
          - `arguments` string, required
          - `call_id` string, required
          - `name` string, required
          - `type` 'function_call', required
          - `id` string, nullable
          - `caller` union
            - object
              - …
            - object
              - …
          - `namespace` string, nullable
          - `status` 'in_progress' | 'completed' | 'incomplete', nullable
        - object
          - `call_id` string, required
          - `output` union, required
            - string
            - union[]
              - …
          - `type` 'function_call_output', required
          - `id` string, nullable
          - `caller` union
            - object
              - …
            - object
              - …
          - `status` 'in_progress' | 'completed' | 'incomplete', nullable
        - object
          - `id` string, required
          - `summary` ResponsesSummary[], required
            - `text` string, required
            - `type` 'summary_text', required
          - `type` 'reasoning', required
          - `content` ResponsesContent[], nullable
            - `text` string, required
            - `type` 'reasoning_text', required
          - `encrypted_content` string, nullable
          - `status` 'in_progress' | 'completed' | 'incomplete', nullable
  - `instructions` string, nullable
  - `parallel_tool_calls` boolean
  - `previous_response_id` unknown
  - `truncation` 'disabled'
  - `tools` union[]
    - union
      - object
        - `name` string, required
        - `parameters` object, nullable
        - `strict` boolean, nullable
        - `type` 'function', required
        - `allowed_callers` string[], nullable
        - `defer_loading` boolean, nullable
        - `description` string, nullable
        - `output_schema` object, nullable
      - object
        - `description` string, required
        - `name` string, required
        - `tools` union[], required
          - union
            - object
              - …
            - object
              - …
        - `type` 'namespace', required
  - `tool_choice` union
    - 'none' | 'auto' | 'required'
    - object
      - `name` string, required
      - `type` 'function', required
  - `reasoning` object, nullable
    - `effort` 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max', nullable
  - `conversation` unknown
  - `prompt` unknown
  - `text` object, nullable
    - `format` union
      - object
        - `type` 'text', required
      - object
        - `name` string, required
        - `schema` object, required
        - `type` 'json_schema', required
        - `description` string, nullable
        - `strict` boolean, nullable
      - object
        - `type` 'json_object', required
    - `verbosity` 'low' | 'medium' | 'high', nullable

## Response `200`

Successful Response

- CountResponseInputTokensResponse
  - `input_tokens` integer, required
  - `object` 'response.input_tokens', required

## Changes

- **2026-10-28** `08a585fb75bc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mistral/apis/mistral-ai-api/changes/v1/responses/input_tokens/post.md)

---

[API](https://skmtc.dev/mistral/apis/mistral-ai-api.md) - [All operations](https://skmtc.dev/mistral/apis/mistral-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mistral/apis/mistral-ai-api/revisions/08a585fb75bc?raw)
