designwithfocus

Cloud & DevOps

OpenAI API vs Azure OpenAI: Host, Price and Access

By Design With Focus Team 7 min read
Two API hosts side by side, one billed by OpenAI and one by Azure

Short answer

The OpenAI API and Azure OpenAI call similar models from different hosts. OpenAI prints token prices. Standard gpt-4o is $2.50 in and $10 out per million tokens. Azure hosts the models, bills the Azure subscription, and leaves token rates in a calculator. Choose the contract and the region. Do not copy a rate from one price list onto the other.

Last verified against the sources listed below.

Key takeaways

  • OpenAI's API calls api.openai.com with a bearer key. The text guide uses the Responses API.
  • Standard gpt-4o on OpenAI's pricing page is $2.50 input and $10 output per 1 million tokens.
  • OpenAI says models on Azure are billed by Azure, not by the OpenAI token table.
  • Azure's public page lists pay-as-you-go, provisioned throughput, and a batch discount, then points to the calculator.
  • Microsoft says Azure OpenAI availability varies by region, and preview models are not for production.

OpenAI API vs Azure OpenAI is a choice of host, bill, and where the request is allowed to run. OpenAI’s pricing page prints rates per 1 million tokens and says models on Microsoft Azure are billed through Azure, not through that table.

Azure’s own pricing page agrees that the bill is an Azure bill. It describes the ways you can pay, then sends you to a calculator for the number. The comparison below uses only rates that were printed, and it leaves Azure’s token math on the calculator as of December 2026.

What does the OpenAI API charge you for?

It charges for tokens, tools, and a few session fees, on a public list. Under standard text rates, gpt-4o is $2.50 per 1 million input tokens, $10 per 1 million output tokens, and $1.25 per 1 million cached input tokens. gpt-4o-mini on the same table is $0.15 in, $0.60 out, and $0.075 cached.

The page also splits some newer models into short context and long context. Short context is 272,000 input tokens or fewer. Long context is more than 272,000 input tokens. gpt-4o, on the standard table that was visible, is a single input rate and a single output rate, not a short-and-long pair.

Regional processing for data residency costs an extra 10 percent for models released on or after 5 March 2026. FedRAMP endpoints are also 10 percent more. That uplift is on OpenAI’s list. It is not a guess about Azure.

OpenAI’s text guide shows the call. You send a model and an input to the Responses API at https://api.openai.com/v1/responses, with a bearer API key. The guide prefers Responses over the older Chat Completions API for new text work. It tells you to pin production traffic to a snapshot, and the example id it gives is gpt-5.5-2026-04-23.

What does Azure OpenAI change about the same call?

The model is hosted by Azure and the invoice is an Azure subscription. Microsoft Learn says Foundry models sold by Azure, including Azure OpenAI models, are operated by Azure, covered by Azure service-level agreements, and supported by Microsoft. Availability varies by region and by cloud.

The Azure pricing page lists three ways to pay. Standard is pay-as-you-go for input and output tokens. Provisioned throughput uses PTUs, with monthly or annual reservations. The Batch API returns completions within 24 hours at a 50 percent discount on Global Standard pricing, for global deployments and three regions.

Deployment can be Global, a Data Zone in the EU or the US, or Regional in up to 27 regions. A notice on the page says that as of 1 November 2026, 12-hour prompt cache writes are billed at the 12-hour cache-write rate when you request them. The default 30-minute option is unchanged.

The same page says its prices are estimates, not quotes, and that you should sign in to the Azure pricing calculator. The model rows did not show a plain dollar rate.

Microsoft also says Azure uses the same input-token cutoff between short-context and long-context prices as OpenAI. The context window is shared. Input, generated output, and reasoning tokens all spend it. A max-output parameter does not reserve tokens the request cannot afford.

When should you choose the OpenAI API?

Choose it when you want the printed token list and a key pointed at OpenAI’s API host. The text guide is written for that path: a bearer key, the Responses API, and output_text when you need the words without guessing which output item holds them.

It fits a product that can send prompts to OpenAI and does not need the request to stay inside a named Azure region. You still read the uplift lines. Data-residency endpoints and FedRAMP endpoints on this host are 10 percent more for models released on or after 5 March 2026.

It is a weaker fit when procurement already requires an Azure subscription, a Microsoft support contract, or a region list Azure publishes. OpenAI’s page is explicit that Azure usage is billed by Azure. Copying a gpt-4o rate from OpenAI’s table into an Azure budget is how that warning gets ignored.

Machine learning is the broader field these models come from. The API is one way to call a trained model. It is not the training run itself.

When should you choose Azure OpenAI?

Choose it when the host has to be Azure. Microsoft’s reasons on the docs are operational: the model is hosted and operated by Azure, the bill is the Azure subscription, and you pick Global, Data Zone, or Regional deployment. GPT-4o and GPT-4o mini are described there as multimodal models that can take text and images.

Choose it when a preview model is not acceptable. Microsoft says not to use preview models in production, because those deployments move forward and skip the normal lifecycle. A generally available model id is the production choice on that page.

Choose it when a 24-hour batch is enough and the 50 percent discount on Global Standard pricing is the discount you are willing to verify in the calculator. The public page states the discount and the window. It does not state the base Global Standard rate next to each model. Open the calculator before you treat 50 percent as a dollar figure.

Cloud computing is the reason this host exists as a separate product. The same model family can be a feature of someone else’s cloud account, with that cloud’s regions and invoice.

How do the price lists differ as of December 2026?

OpenAI prints numbers. Azure prints the shape of the bill and a calculator.

Item OpenAI API, from the pricing page Azure OpenAI, from Microsoft’s pages
Who bills OpenAI, except Azure and Bedrock usage Your Azure subscription
Text rate example gpt-4o standard: $2.50 in, $10 out, $1.25 cached, per 1M tokens Not printed as a fixed quote. Use the calculator
Smaller example gpt-4o-mini: $0.15 in, $0.60 out, $0.075 cached, per 1M tokens Same calculator warning
Batch Separate batch rows on the OpenAI list Within 24 hours, 50 percent off Global Standard
Place 10 percent more for newer regional and FedRAMP endpoints Global, EU or US Data Zone, or up to 27 regions
Cache note Cached input is a column on the OpenAI tables As of 1 November 2026, explicit 12-hour cache writes use that rate

The Gradient Generator is a browser tool that builds a CSS gradient from colors you pick. It is not a model API. It is a useful contrast: one of these products returns tokens from a hosted model, and the other returns a stylesheet line on your machine.

What should you check before you move a workload?

Check the model id, the snapshot, and the bill before you compare speed or quality. A move from api.openai.com to Azure is a new host even when the family name matches.

  1. Read the OpenAI rate for the exact model and tier you run, including cache and any 10 percent residency uplift.
  2. Open the Azure calculator for that model, deployment type, and region. Do not copy the OpenAI number across.
  3. Confirm the model is generally available if this is production. Microsoft tells you not to pin a business process to a preview.
  4. Pin the OpenAI side to a snapshot if you stay there. The text guide’s example is gpt-5.5-2026-04-23.
  5. Recount tokens with the shared context budget Microsoft describes. More input leaves less room for output.
  6. Decide whether a 24-hour batch is acceptable before you plan on the 50 percent batch discount.

If the calculator is the only place Azure shows a dollar amount, quote the calculator in the budget and name the date you opened it. A blog that invents a token rate is not a source. The two official pages are.

Frequently asked questions

Are the OpenAI API and Azure OpenAI the same price?

Do not assume that. OpenAI's pricing page prints rates per 1 million tokens. Standard gpt-4o there is $2.50 for input, $10 for output, and $1.25 for cached input. The Azure OpenAI pricing page describes pay-as-you-go tokens, provisioned throughput, and a batch option, then says to sign in to the Azure pricing calculator for a quote. The tables on that public page did not show fixed dollar amounts. Use the calculator for Azure. Use the printed table for OpenAI.

Which API should new text calls use on OpenAI's platform?

OpenAI's text guide says to use the Responses API for new text generation, rather than the older Chat Completions API. The sample sends a model name and an input string, with Authorization set to a bearer API key, to the responses endpoint on api.openai.com. The guide also says not to assume the text lives at the first item of the output array. Official SDKs expose output_text as a shortcut that gathers the text.

What does a region change cost on the OpenAI API?

The pricing page says regional processing, meaning data-residency endpoints, is charged a 10 percent uplift for models released on or after 5 March 2026. FedRAMP endpoints get the same 10 percent uplift. That is a printed rule on OpenAI's list. It is not an Azure region price. Azure's page instead offers Global, Data Zone for the EU or the US, and Regional deployment in up to 27 regions, with the token math left to the calculator.

Can Azure OpenAI use the same model names as OpenAI?

Microsoft's model list includes OpenAI model families and says Azure uses the same input-token threshold between short-context and long-context pricing as OpenAI. It also says the context window is a shared budget. Input tokens, output tokens, and reasoning tokens all draw from it. More input leaves fewer tokens for the answer. A max output setting does not reserve tokens the request does not have. Availability still varies by region and cloud.

Should a production app pin a preview model?

Microsoft says no. Preview deployments can move to a later preview or to the latest generally available version, and they do not follow the standard lifecycle. OpenAI's text guide tells you to pin production apps to a specific snapshot so behavior stays put. Its example of a snapshot name is gpt-5.5-2026-04-23. Pinning is a host setting and a model id. It is not a promise that the two hosts bill that snapshot at the same rate.

Sources