Home / Servers / OpenAI API / beta_getinputtokencounts
Get input token counts
An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.
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?beta=true]
Name on the gateway: openai_api__beta_getinputtokencounts · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
model | string | Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a… |
input | string | Text, image, or file inputs to the model, used to generate a response |
previous_response_id | string | The unique ID of the previous response to the model. Use this to create… |
tools | array | An array of tools the model may call while generating a response. You can… |
text | object | Configuration options for a text response from the model. Can be plain text or… |
reasoning | object | **gpt-5 and o-series models only** Configuration options for reasoning models. |
truncation | auto | disabled | The truncation strategy to use for the model response. - auto: If the input to… |
instructions | string | A system (or developer) message inserted into the model's context. When used… |
personality | string | A model-owned style preset to apply to this request. Omit this parameter to… |
conversation | object | The conversation that this response belongs to. Items from this conversation… |
tool_choice | object | Controls which tool the model should use, if any. |
parallel_tool_calls | boolean | Whether to allow the model to run tool calls in parallel. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "openai_api__beta_getinputtokencounts",
"arguments": {}
}Or connect the OpenAI API server directly, which lists 371 tools including this one:
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the get input token counts tool with model set to ….