OpenAI-compatible chat completions backed by GPT-6 Sol, the GPT-6 family model built for complex coding and agentic workflows: a 1,050,000-token context, up to 128,000 output tokens, reasoning_effort from none to max, image input and tool calling. Set model to gpt-6-sol; the same model is also served on /v1/responses. Cached input settles at one tenth of the input rate. This model also returns a reasoning summary: choices[].message.reasoning_content when non-streaming, choices[].delta.reasoning_content when streaming. The answer itself stays in content and is never mixed with the reasoning, so clients that only read content need no changes. When reasoning_effort is omitted the gateway requests the medium tier (the model's own default) and the summary comes back all the same. Billing: thinking tokens are charged at the output rate and are included in usage.completion_tokens; usage.completion_tokens_details.reasoning_tokens breaks out how many were reasoning -- those tokens are billed whether or not you read the field. Note that OpenAI exposes only a summary of the reasoning, never the raw chain of thought, so this field is usually short. Note: this model is served over a ChatGPT-subscription upstream that does not accept temperature / top_p / max_tokens / max_completion_tokens / frequency_penalty / presence_penalty -- sending them is silently ignored (no error). Use reasoning_effort for thinking depth and prompt wording for length. For image input use a base64 data: URI; a public image URL may time out upstream.
📥 Контекстное окно (максимум ввода):1,050,000 токенов (официальная цифра OpenAI); до 128,000 токенов на выходе за один вызов. Расходы на системный промпт также учитываются в этом лимите.
Попробовать в песочнице →Аутентификация
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Чтобы начать, создайте API-ключ в консоли.
Тело запроса
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
| model | string | Да | Model ID, here gpt-6-sol. |
| messages | array | Да | Массив сообщений; у каждого есть role (system/user/assistant) и content. content может быть строкой или массивом частей {type:text} и {type:image_url} для распознавания изображений (мультимодальность/зрение). |
| stream | boolean | Нет | Возвращать ответ потоково через SSE. По умолчанию false. |
| web_search | boolean | Нет | Установите true, чтобы включить веб-поиск: шлюз дополняет промпт актуальными результатами (со ссылками на источники) перед тем, как модель формирует ответ. Также можно включить через элемент tools вида {"type":"web_search"}. |
| reasoning_effort | string | Нет | Уровень рассуждения: none / low / medium / high / xhigh / max. Значение none полностью отключает рассуждение — это самый быстрый вариант, но многошаговые задачи иногда решаются неверно. Если параметр не указан, шлюз запрашивает medium (значение по умолчанию у самой модели) и возвращает краткое изложение рассуждений в message.reasoning_content. Значение minimal обрабатывается как low. |
| tools | array | Нет | Вызов функций. Передайте стандартный массив tools, как в OpenAI; когда модель решает вызвать функцию, она возвращает finish_reason=tool_calls вместе с tool_calls. Используйте вместе с tool_choice, чтобы принудительно указать конкретный инструмент. |
| response_format | object | Нет | Структурированный вывод. Передайте {"type":"json_object"}, чтобы модель возвращала только корректный JSON. |
Пример запроса
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-6-sol", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'Ответ
{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "gpt-6-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "**Weighing the options** ... (a summary of how the model reasoned)",
"content": "Hello!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 11,
"completion_tokens": 105,
"total_tokens": 116,
"completion_tokens_details": {"reasoning_tokens": 43}
}
}Ввод изображений (Vision)
Поместите изображение в массив content сообщения, и модель проанализирует его (визуальные вопрос-ответ, распознавание текста / OCR, …). Поле image_url принимает публичную ссылку на изображение или встроенный base64 data URL (data:image/png;base64,...). Доступно для мультимодальных моделей (gpt-5.5, серия gemini, …).
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-6-sol", "messages": [{"role": "user", "content": [{"type": "text", "text": "Что изображено на этой картинке?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'Коды ошибок
Каждое тело ошибки содержит error.message / error.type / error.code / error.param — ветвите логику по code; полный список — в руководстве по интеграции.
| HTTP | code | Описание |
|---|---|---|
| 401 | invalid_api_key | API-ключ отсутствует или недействителен |
| 402 | insufficient_quota | Недостаточно средств на балансе или превышена квота ключа |
| 400 | invalid_request | Неподдерживаемая модель или параметр |
| 429 | rate_limit_exceeded | Лимит запросов у провайдера |
| 502 | upstream_error | Все маршруты к провайдерам не сработали |