Azure OpenAI exposes GPT-4o through model ID gpt-4o. 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
- 2
Code Examples
Install
pip install openaiAPI key
AZURE_OPENAI_API_KEYModel ID
gpt-4ogpt-4o 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", # your deployment name
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Azure OpenAI
Capabilities
VisionMultimodalJSON / Tool useStructured OutputsCode ExecutionPrompt CachingBatch APIFine-tuning
About GPT-4o
OpenAI GPT-4o: Flagship multimodal model with vision, function calling, and broad capability. $2.50/M input, $10/M output.
Model Specs
Released2024-05-13
Context128k
ArchitectureDecoder Only
Knowledge cutoff2023-10