How to view token usage metrics for my Azure OpenAI model deployment?

Darshan N 40 Reputation points
2026-06-22T10:23:12.65+00:00

I am using Azure OpenAI Service with a deployed model under my subscription. I want to track the token usage of this model — input tokens, output tokens, and total tokens consumed.

Kindly help me with the following:

  1. Where exactly in the Azure Portal can I see the token usage metrics for a specific model deployment?
  2. Which metric names should I select for input, output, and total tokens?
  3. How can I filter the metrics by a particular model or deployment name?
  4. Is there any delay in these metrics getting updated after I send requests?

I am currently on the free credits, so please also let me know if any extra setting or diagnostic configuration is needed to view this data.

Thank you.

Azure OpenAI in Foundry Models

Answer accepted by question author
Jerald Felix 18,760 Reputation points Volunteer Moderator
2026-06-22T11:52:42.3933333+00:00

Hello Darshan N,

Greetings! Thanks for raising this question in the Q&A forum.

Great questions and the good news is that Azure OpenAI has built-in monitoring through Azure Monitor, and it works on free credits too without any extra paid configuration. Let me address all four of your questions clearly.

Where to find token usage metrics in the Azure Portal

Go to Azure Portal > Your Azure OpenAI resource > Monitoring > Metrics in the left navigation pane. This opens the Azure Monitor Metrics Explorer scoped to your OpenAI resource. No additional setup is needed to start seeing metrics here they are available by default.

Which metric names to select for input, output, and total tokens

For token usage, use the following metrics:

  • Processed Prompt Tokens — this is your input tokens (the tokens you send in each request)
  • Generated Completion Tokens — this is your output tokens (the tokens the model generates in response)
  • Processed Inference Tokens — this is the total tokens (input + output combined)

These metrics directly correspond to the prompt_tokens, completion_tokens, and total_tokens fields you see in the API response under the usage property.

To add them in Metrics Explorer, click + Add metric, search for the metric name, and set the Aggregation to Sum so you get a running total rather than an average.

How to filter metrics by a specific deployment name

Once you have a metric added, click Apply splitting and choose ModelDeploymentName as the splitting dimension. This gives you a separate time series per deployment and is the supported way to monitor each deployment individually.

You can also click Add filter, set the property to ModelDeploymentName, and select your specific deployment from the dropdown to isolate just that one deployment's data.

Here is a step-by-step summary for setting up one chart:

  1. Go to Azure Portal > Your Azure OpenAI resource > Monitoring > Metrics
  2. Click + Add metric and select Processed Prompt Tokens
  3. Set Aggregation to Sum
  4. Click Apply splitting > ModelDeploymentName to see per-deployment data
  5. Click + Add metric again to add Generated Completion Tokens on the same chart
  6. Adjust the time range at the top right (e.g., Last 24 hours, Last 7 days)

Is there a delay in metrics being updated?

Yes, there is a short delay. These metrics can be analyzed using minimum, average, and maximum aggregation over 1-minute windows, so the granularity is 1 minute but in practice you may see a 2 to 5 minute lag before a request shows up in the chart after it is made. This is normal Azure Monitor behavior and not specific to OpenAI.

Do you need any extra diagnostic settings?

No extra configuration is needed to view the basic token metrics in Metrics Explorer — they are available out of the box on free credits. However, if you want to export metrics to a Log Analytics workspace for richer querying with KQL, you can optionally set that up:

Go to Your Azure OpenAI resource > Monitoring > Diagnostic settings > + Add diagnostic setting, enable AllMetrics, and send them to a Log Analytics workspace. This allows you to query token usage with KQL like this:

AzureMetrics
| where MetricName in ("ProcessedPromptTokens", "GeneratedTokens", "TokenTransaction")
| summarize TotalTokens = sum(Total) by bin(TimeGenerated, 1d), MetricName
| order by TimeGenerated asc
| render timechart

You can also pin these charts to an Azure Dashboard for a persistent view, or click Share > Download to Excel to get the raw data for your own analysis.

If this answer helps you kindly accept the answer which will help others who have similar questions.

Best Regards,

Jerald Felix.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author
Karnam Venkata Rajeswari 5,255 Reputation points Microsoft External Staff Moderator
2026-06-22T11:49:59.3733333+00:00

Hello @Darshan N ,

Welcome to Microsoft Q&A .Thank you for reaching out to us.

Azure OpenAI provides built-in token usage monitoring through Azure Monitor platform metrics. These metrics are collected automatically and can be viewed directly from the Azure Portal without requiring any additional monitoring configuration. This functionality is available regardless of whether the subscription is using free credits or a paid billing model.

Token usage metrics can be accessed from:

Azure Portal > Azure OpenAI Resource > Monitoring > Metrics

Once in the Metrics blade:

  1. Select the desired token metric.
  2. Set Aggregation = Sum.
  3. Select an appropriate time range (for example, Last 30 Minutes or Last 24 Hours).
  4. Review the resulting token consumption data.

Using Sum aggregation is recommended because token metrics represent the total number of tokens processed during the selected time period.

  1. The following metrics represent input, output and total tokens Input tokens - Processed Prompt Tokens (ProcessedPromptTokens) Output tokens - Generated Completion Tokens (GeneratedTokens) Total tokens - Processed Inference Tokens (TokenTransaction) These metrics provide visibility into prompt token usage, generated completion token usage and overall token consumption. Please note that Processed Inference Tokens are calculated as prompt tokens (input) plus generated tokens (output). Metrics such as Active Tokens are intended for utilization and capacity monitoring and are generally not used for token consumption reporting.
  2. Metrics being filtered for a specific deployment Deployment-level visibility can be obtained through metric dimensions. After selecting a metric:
    1. Select Add Filter or Apply Splitting.
    2. Choose ModelDeploymentName to isolate a specific deployment.
    3. Optionally select ModelName to group usage by model.
    Using ModelDeploymentName is the recommended method for reviewing deployment-specific token consumption and comparing multiple deployments. Azure OpenAI token metrics support ModelDeploymentName and ModelName dimensions.
  3. Regarding the delay before metrics appear Yes. A short delay is expected. Azure OpenAI metrics are collected at PT1M (1-minute granularity) and are intended for near-real-time monitoring rather than real-time transaction tracking. Recently submitted requests may therefore take a short period before appearing in Azure Monitor If recent activity is not immediately visible:
    • Verify that the selected time range includes the request period.
    • Ensure Aggregation = Sum is selected.
    • Refresh the Metrics view after a short interval.
    • Submit a small number of test requests and review the metrics again.
  4. If any additional diagnostic settings required- No additional configuration is required to view token usage metrics. The following components are not required for standard token monitoring:
    • Diagnostic Settings
    • Log Analytics Workspace
    • Application Insights
    These components become relevant only for advanced scenarios such as:
    • Long-term retention of monitoring data
    • KQL-based analysis
    • Centralized monitoring across multiple resources
    • Exporting logs and metrics for additional reporting
    Platform metrics are automatically generated and collected in Azure Monitor without configuration. Standard token monitoring therefore works directly through the Metrics blade, including subscriptions operating on free credits.

If token usage is not appearing as expected:

  1. Confirm requests are being sent to the intended deployment.
  2. Submit several test requests.
  3. Open Monitoring → Metrics.
  4. Review:
    • Processed Prompt Tokens
    • Generated Completion Tokens
    • Processed Inference Tokens
  5. Set Aggregation = Sum.
  6. Filter or split by ModelDeploymentName.
  7. Allow a short period for metric ingestion and refresh the page.

The following references might be helpful , please check them out

Please let us know if the response was helpful

 

Thank you

 

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Oldest
  1. Darshan N 40 Reputation points
    2026-06-24T08:47:27.7466667+00:00

    Hi Jerald,

    Thank you for the detailed explanation and guidance. I was able to find the token usage metrics and filter them by deployment successfully.
    Your step-by-step instructions were very helpful.

    Thanks again for your support!

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.