Azure OpenAI exposes GPT-4o-mini through model ID gpt-4o-mini. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-05-10. Next refresh: weekly.
Quick Start
- 1
- 2Use the Azure OpenAI SDK or REST API to call
gpt-4o-mini— see the documentation for request format.
Code Examples
Install
pip install openaiAPI key
AZURE_OPENAI_API_KEYModel ID
gpt-4o-minigpt-4o-mini is your Azure deployment name, not the underlying model name. Deployment names are set when you deploy a model in Azure AI Foundry / Azure OpenAI Studio.
import os
from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], # e.g. https://{resource}.openai.azure.com
api_key=os.environ["AZURE_OPENAI_API_KEY"],
api_version="2024-02-01"
)
response = client.chat.completions.create(
model="gpt-4o-mini", # your deployment name
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Azure OpenAI
Capabilities
Structured OutputsPrompt CachingBatch APIFine-tuning
About GPT-4o-mini
OpenAI: GPT-4o-mini available via OpenRouter. Pricing: $0.15/1M input, $0.6/1M output.
Model Specs
Released2024-07-18
Context128k
ArchitectureDecoder Only
Knowledge cutoff2023-10