POST /v1/responses
Responses (для Codex)
Responses API OpenAI для Codex CLI: состояние диалога, инструменты, reasoning.effort у GPT.
- • В Codex: wire_api = "responses" в config.toml, base_url = https://api.morsmorii.ru/v1.
- • previous_response_id — продолжение диалога (состояние хранится 30 дней); GET и DELETE /v1/responses/{id}.
- • reasoning.effort передаётся моделям OpenAI (minimal → low, xhigh → high).
- • Чтение из кэша считается по цене кэша, как в chat/completions.
Параметры
| model* | string | например gpt-6.1-sol |
| input* | string | array | вопрос или список элементов Responses |
| instructions | string | системная инструкция |
| previous_response_id | string | продолжить диалог |
| reasoning | object | {effort: low|medium|high} |
| stream | boolean | события Responses |
Пример
curl https://api.morsmorii.ru/v1/responses \
-H "Authorization: Bearer $MORSMORII_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6-luna","input":"Назови три планеты одной строкой."}'Ответ:
{
"id": "resp_…",
"object": "response",
"status": "completed",
"model": "gpt-6-luna",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Марс, Венера, Юпитер."
}
]
}
]
}Попробовать со своим ключом
Ключ не сохраняется. Запрос — настоящий и стоит как обычно: ≈ 0,01 ₽ на GPT-6 Luna.