Skip to main content

How to Look Up Azure OpenAI Model Prices with the Azure Retail Prices API

· 12 min read
Jagdish Kumawat
Founder @ Dewiride

A cost estimate is only as good as the price in it, and model prices change. Microsoft publishes every Azure price, including what each Azure OpenAI model costs per million tokens, through the Azure Retail Prices API: a public web address that needs no Azure account. This guide finds one model's prices, decodes the meter names, narrows the list to one deployment type and converts it to another currency, with curl and jq or with PowerShell.

Syntax​

Syntax
https://prices.azure.com/api/retail/prices?$filter=<field> eq '<value>' and contains(<field>, '<text>')&currencyCode='<currency>'
PartWhat to put there
$filterWhich prices to return, written as conditions on the prices' fields
<field> eq '<value>'Keep the prices whose field is exactly that value, such as armRegionName eq 'eastus2'. Values are case-sensitive
contains(<field>, '<text>')Keep the prices whose field contains that text, such as contains(meterName, '5.6 luna')
andJoins conditions. A price is returned only when all of them are true
currencyCodeOptional. The currency, such as 'EUR'. Without it, prices are in US dollars

The fields you can filter on are listed in Microsoft's reference: armRegionName, Location, meterId, meterName, productid, skuId, productName, skuName, serviceName, serviceId, serviceFamily, priceType and armSkuName. In a terminal, the spaces and quotes in the filter have to be encoded for a web address, which curl and PowerShell do for you, as the steps show.

The Example​

The example finds what the gpt-5.6-luna model costs on a Global Standard deployment in East US 2: input, cached input, cache writes and output, per million tokens.

Prerequisites​

  • In bash or zsh: curl and jq, a command-line JSON tool. On my Mac, running macOS 26, both came with the system. On Linux, install jq from your distribution's packages if jq --version doesn't print a version.
  • In PowerShell: PowerShell 7. I ran these commands in PowerShell 7.6.

Step 1: Find the Model's Service and Product​

You don't need to know where Azure files a model's prices: filter by part of the model's name and look. Model meters name the model without its gpt- prefix, so search for 5.6 luna in one region:

Terminal
curl -s -G "https://prices.azure.com/api/retail/prices" \
--data-urlencode "\$filter=armRegionName eq 'eastus2' and contains(meterName, '5.6 luna')" \
| jq -r '.Items[] | [.serviceName, .productName] | @tsv' | sort -u | column -t -s $'\t'
Output
Foundry Models Azure OpenAI GPT5
  • curl -s -G sends a quiet GET request, and --data-urlencode adds the filter to the address, encoded. The backslash in \$filter stops the shell from treating $filter as a variable.
  • jq -r '.Items[] | ...' picks two fields from every price in the answer's Items list, and sort -u keeps one copy of each line.
  • In PowerShell, -Body turns the hashtable into the same query string, because the request is a GET. Invoke-RestMethod turns the JSON into objects, so Select-Object can pick the fields.

The model's prices are under the service Foundry Models, in the product Azure OpenAI GPT5.

Step 2: List the Model's Prices​

Filter by the service, the region and the short-context version of the model, and show each meter's name and price:

Terminal
curl -s -G "https://prices.azure.com/api/retail/prices" \
--data-urlencode "\$filter=serviceName eq 'Foundry Models' and armRegionName eq 'eastus2' and contains(meterName, '5.6 luna ShortCo')" \
| jq -r '.Items[] | [.meterName, .retailPrice] | @tsv' | sort | column -t -s $'\t'
Output
5.6 luna ShortCo Cd Inp PP DZ 1M Tokens 0.044
5.6 luna ShortCo Cd Inp PP Gl 1M Tokens 0.04
5.6 luna ShortCo Cd Inp Std DZ 1M Tokens 0.022
5.6 luna ShortCo Cd Inp Std Gl 1M Tokens 0.02
5.6 luna ShortCo Cd Wr PP DZ 1M Tokens 0.55
5.6 luna ShortCo Cd Wr PP Gl 1M Tokens 0.5
5.6 luna ShortCo Cd Wr Std DZ 1M Tokens 0.275
5.6 luna ShortCo Cd Wr Std Gl 1M Tokens 0.25
5.6 luna ShortCo Inp PP DZ 1M Tokens 0.44
5.6 luna ShortCo Inp PP Gl 1M Tokens 0.4
5.6 luna ShortCo Inp Std DZ 1M Tokens 0.22
5.6 luna ShortCo Inp Std Gl 1M Tokens 0.2
5.6 luna ShortCo Opt PP DZ 1M Tokens 2.64
5.6 luna ShortCo Opt PP Gl 1M Tokens 2.4
5.6 luna ShortCo Opt Std DZ 1M Tokens 1.32
5.6 luna ShortCo Opt Std Gl 1M Tokens 1.2

macOS-style terminal window showing a curl request to the Azure Retail Prices API filtered to Foundry Models in eastus2 with meter names containing 5.6 luna ShortCo, piped through jq, sort and column, and the sixteen meters it returned with their prices, from 5.6 luna ShortCo Cd Inp PP DZ 1M Tokens at 0.044 to 5.6 luna ShortCo Opt Std Gl 1M Tokens at 1.2

Sixteen prices for one model, because each combination of token type, pricing tier and deployment type has its own meter. Every price is per million tokens: the names end in 1M Tokens.

Step 3: Decode the Meter Names​

Microsoft doesn't document these abbreviations. To decode them, I compared every price with Microsoft's Azure OpenAI pricing page for East US on November 21, 2026, where the same numbers appear under full names:

In the meter nameMeansOn the pricing page
ShortCo, LongCoShort context, long contextTwo versions of the model: GPT-5.6-luna (short context) and (long context)
InpInput tokensInput: $0.20 for Global
Cd InpCached input tokensCached Input: $0.02
Cd WrCache writesCache writes: $0.25
OptOutput tokensOutput: $1.20
Gl, DZGlobal or Data Zone deploymentThe Global and Data Zone rows: Data Zone input is $0.22
StdThe standard pay-as-you-go priceThe first price column
PPPriority ProcessingThe Priority Processing column: for the long-context model on Global, $0.80, $0.08, $1 and $3.60, the API's LongCo ... PP Gl meters

So a Global Standard deployment of the short-context model costs $0.20 per million input tokens, $0.02 per million cached input tokens, $0.25 per million tokens written to the cache, and $1.20 per million output tokens.

Step 4: Keep One Deployment Type​

Add contains(meterName, 'Std Gl') to the filter to keep the four prices that apply to a Global Standard deployment, and show the unit too:

Terminal
curl -s -G "https://prices.azure.com/api/retail/prices" \
--data-urlencode "\$filter=serviceName eq 'Foundry Models' and armRegionName eq 'eastus2' and contains(meterName, '5.6 luna ShortCo') and contains(meterName, 'Std Gl')" \
| jq -r '.Items[] | [.meterName, .retailPrice, .unitOfMeasure] | @tsv' | sort | column -t -s $'\t'
Output
5.6 luna ShortCo Cd Inp Std Gl 1M Tokens 0.02 1M
5.6 luna ShortCo Cd Wr Std Gl 1M Tokens 0.25 1M
5.6 luna ShortCo Inp Std Gl 1M Tokens 0.2 1M
5.6 luna ShortCo Opt Std Gl 1M Tokens 1.2 1M

macOS-style terminal window showing a curl request to the Azure Retail Prices API with the extra condition contains(meterName, 'Std Gl'), and the four meters it returned: cached input 0.02, cache writes 0.25, input 0.2 and output 1.2, each per 1M tokens

Four prices, each per 1M, a million tokens. Each price also has an effectiveStartDate, the date it took effect: August 1, 2026, for these four.

Step 5: Get the Prices in Another Currency​

Add currencyCode='EUR' to the request:

Terminal
curl -s -G "https://prices.azure.com/api/retail/prices" \
--data-urlencode "currencyCode='EUR'" \
--data-urlencode "\$filter=serviceName eq 'Foundry Models' and armRegionName eq 'eastus2' and contains(meterName, '5.6 luna ShortCo') and contains(meterName, 'Std Gl')" \
| jq -r '.Items[] | [.meterName, .retailPrice, .currencyCode] | @tsv' | sort | column -t -s $'\t'
Output
5.6 luna ShortCo Cd Inp Std Gl 1M Tokens 0.0180 EUR
5.6 luna ShortCo Cd Wr Std Gl 1M Tokens 0.2244 EUR
5.6 luna ShortCo Inp Std Gl 1M Tokens 0.1795 EUR
5.6 luna ShortCo Opt Std Gl 1M Tokens 1.0772 EUR

PowerShell's table shows three decimals, so 0.1795 appears as 0.179. Microsoft's reference adds a caution about other currencies: Prices shown in USD currency are Microsoft retail prices. Other non-USD prices returned by the API are for your reference to help you estimate budget expenses.

Common Mistakes​

MistakeWhat happensDo this instead
Writing "$filter=..." in bash or zsh without the backslashThe shell swaps $filter for an empty variable, so the API gets no filter. When I tried it, the answer held 1,000 prices for everything, starting with Virtual MachinesWrite "\$filter=...", or put the whole argument in single quotes
Writing a value in the wrong caseNo match: serviceName eq 'foundry models' returned nothingCopy the value exactly, such as 'Foundry Models'. Microsoft's reference: the value is case sensitive
Leaving out the regionPrices for every region: without it, Step 2's filter returned 306 prices from 27 regions instead of 16Add armRegionName eq '<region>'
Reading a price without its unitA price per million tokens read as a price per tokenShow unitOfMeasure, as Step 4 does

Troubleshooting​

SymptomLikely causeFix
Items is emptyA value doesn't match exactly, often the case of a letterStart broad, with only the region and part of the meter name, as in Step 1
Exactly 1,000 itemsThe API returns at most 1,000 per requestNarrow the filter, or follow NextPageLink for the next page

FAQ​

Do I need an Azure account?​

No. Microsoft's reference calls it an unauthenticated experience: the API needs no sign-in and no subscription.

Are these the prices I'll pay?​

They're Azure's retail prices. Microsoft's reference describes retailPrice as Microsoft Retail Prices without discount, so a discount your organization has doesn't show here.

What if a filter returns more than 1,000 prices?​

The answer then ends with a NextPageLink, the address of the next page. Microsoft's reference: For each API request, a maximum of 1,000 records are returned. At the end of the API response, it has the link to next page. Request that address to get the next 1,000, until there's no more link.

Conclusion​

The Azure Retail Prices API answers "what does this model cost?" with a single public request. Filter by serviceName eq 'Foundry Models', the region and part of the model's meter name. Read the abbreviations: Inp, Cd Inp, Cd Wr and Opt for the token types, Std or PP for the tier, Gl or DZ for the deployment type. Every price is per million tokens, and currencyCode converts the list for budgeting.

Additional Resources​