Azure OpenAI exposes GPT-4 through model ID gpt-4. 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
- 3
Code Examples
Install
pip install openaiAPI key
AZURE_OPENAI_API_KEYModel ID
gpt-4gpt-4 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-4", # your deployment name
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Azure OpenAI
| Type | Price (per 1M) |
|---|---|
| Input tokens | $30.00 |
| Output tokens | $60.00 |
Capabilities
VisionMultimodalJSON / Tool useStructured OutputsCode Execution
About GPT-4
OpenAI's original GPT-4 model with strong reasoning and general knowledge. Foundation model for many applications.
Model Specs
Released2023-03-14
Parameters1.76T (8x222B MoE)*
Context8k
ArchitectureMixture of Experts
Knowledge cutoff2021-09