An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hello Dawid Smolenski,
Welcome to Microsoft Q&A .Thank you for reaching out to us.
The observed behavior aligns with the current implementation of the Azure OpenAI v1
The GetInputTokenCountAsync method internally attempts to call the following endpoint:
POST /v1/responses/input_tokens
When using the Azure OpenAI v1 compatibility endpoint:
https://<resource>.openai.azure.com/openai/v1/
this specific route is not currently supported on the v1 compatibility endpoint, resulting in 404 - Unknown request URL
This confirms that the issue is not related to authentication, deployment configuration, SDK initialization or request formatting. Instead, it is caused by a service capability limitation, where the SDK helper method relies on an endpoint that is not exposed.
The Azure OpenAI v1 compatibility endpoint supports core Responses API operations, such as model inference (response generation). However, not all helper or auxiliary endpoints are available.
Specifically:
- The /v1/responses endpoint for inference is supported
- The /v1/responses/input_tokens helper endpoint is not currently supported
- SDK methods such as GetInputTokenCountAsync depend on this route and therefore fail
This highlights a feature availability gap between SDK capabilities and the service endpoint rather than any misconfiguration.
Please check if the following workarounds help-
- Avoid using GetInputTokenCountAsync on the v1 endpoint
- This method depends on an unsupported route
- Calls to this method will consistently return 404 in this setup
- Continue using supported Responses API operations Ensure standard configuration: Endpoint format -
https://<resource>.openai.azure.com/openai/v1/- Model value matches a valid deployment name
- Supported APIs (such as response generation) are used for inference
As troubleshooting validation -
To confirm correct isolation of the issue:
- If response generation calls (for example, CreateResponseAsync) succeed
- And only GetInputTokenCountAsync fails with 404
This confirms:
- Endpoint and deployment configuration are correct
- The issue is isolated to the unsupported /responses/input_tokens route
The following references might be helpful , please check them out
- Use the Azure OpenAI Responses API - Microsoft Foundry | Microsoft Learn
- Azure OpenAI in Microsoft Foundry Models REST API v1 preview reference - Microsoft Foundry | Microsoft Learn
- Azure OpenAI in Microsoft Foundry Models REST API reference - Microsoft Foundry | Microsoft Learn
Please let us know if the response was helpful
Thank you