Claude Opus 4

Chat Completions API
claude-opus-4-20250514
отAnthropicСоздана 25 мая 2025 г.200K контекст
Chat Completions API

Claude Opus 4.1 is Anthropic’s flagship model, offering improved performance in coding, reasoning, and agentic tasks. It achieves high scores on SWE-bench Verified and excels in multi-file code refactoring, debugging precision, and detail-oriented reasoning. The model supports extended thinking up to 64K tokens and is optimized for research, data analysis, and tool-assisted workflows.

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": "claude-opus-4-20250514",
  "messages": [
    {
      "role": "user",
      "content": "Сколько будет 2 + 2?"
    }
  ]
}'

Параметры

Параметры, доступные в API-запросах
Frequency PenaltyLogit BiasMax Completion TokensPresence PenaltyReasoning EffortResponse FormatStopTemperatureTool ChoiceToolsTop P