Text
GPT-5.2 Codex
GPT-5.2-Codex is an upgraded version of gpt-5.1-codex optimized for software engineering and coding workflows.
Model ID
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GPT-5.2-Codex is an upgraded version of gpt-5.1-codex optimized for software engineering and coding workflows.
openai/gpt-5.2-codex
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"input": "Tell me a three sentence bedtime story about a unicorn."
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"instructions": "You are a helpful assistant.",
"input": "Hello!",
"stream": true
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"input": "How much wood would a woodchuck chuck?",
"reasoning": {
"effort": "low"
}
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"input": "What is the weather like in Boston today?",
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"description": "Temperature unit",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location", "unit"]
}
}
],
"tool_choice": "auto"
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"input": [
{
"role": "user",
"content": [
{"type": "input_text", "text": "what is in this image?"},
{
"type": "input_image",
"image_url": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"
}
]
}
]
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"input": [
{
"role": "user",
"content": [
{"type": "input_text", "text": "what is in this file?"},
{
"type": "input_file",
"file_url": "https://www.berkshirehathaway.com/letters/2024ltr.pdf"
}
]
}
]
}'
curl https://api.gmi-serving.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GMI_API_KEY" \
-d '{
"model": "openai/gpt-5.2-codex",
"tools": [{ "type": "web_search_preview" }],
"input": "What was a positive news story from today?"
}'