responses
Count Input Tokens
Changed onCount 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.
post/v1/responses/input_tokens
Request
- Base URLhttps://api.mistral.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Successful Response
Changes
- info
endpoint added
- info