GPT-5 Codex

Chat Completions API
gpt-5-codex
отOpenAIСоздана 23 сент. 2025 г.400K контекст
Chat Completions API

GPT-5-Codex is a specialized version of GPT-5 tailored for software engineering and coding tasks. It is suitable for both interactive development sessions and the independent execution of complex engineering projects. The model is capable of building projects from scratch, developing new features, debugging, performing large-scale refactoring, and conducting code reviews. Compared to the standard GPT-5, Codex offers greater steerability, follows developer instructions more closely, and delivers cleaner, higher-quality code.

API-методы и структура запроса

Здесь собран публичный контракт интеграции модели: поддерживаемые API-методы, параметры запросов и примеры вызовов.

Chat Completions APIPOST/v1/chat/completions

Пример кода

Пример использования модели через API на Python или cURL. Замените значения-заполнители своим API-ключом и ID модели.

Базовый пример запроса. Проверьте разрешения 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-codex",
  "messages": [
    {
      "role": "user",
      "content": "Сколько будет 2 + 2?"
    }
  ]
}'

Параметры

Параметры, доступные в API-запросах
Frequency PenaltyFunction CallFunctionsLogit BiasMax Completion TokensParallel Tool CallsPredictionPresence PenaltyReasoning EffortResponse FormatStopTool ChoiceToolsWeb Search Options