GPT 5.1 Codex
Chat Completions API
gpt-5.1-codex
Chat Completions API
GPT-5.1-Codex is an OpenAI model optimized for agentic software development in Codex and similar tool-driven environments. It can inspect code, plan and implement multi-file changes, and work through longer coding tasks with reasoning and tool calls. The model accepts text and image inputs and is available through the Responses API.
Пример кода
Пример использования модели через API на Python или cURL. Замените значения-заполнители своим API-ключом и ID модели.
Базовый пример запроса. Проверьте разрешения API-ключа. Подробнее см. документацию.
Базовый пример запроса. Проверьте разрешения API-ключа. Подробнее см. документацию.
curl https://api.makura.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"model": "gpt-5.1-codex",
"messages": [
{
"role": "user",
"content": "Сколько будет 2 + 2?"
}
]
}'