Responses

Responses

POST /api/v1/responses

The OpenAI Responses API. Codex CLI speaks this one; a Codex client pointed at
/chat/completions fails to parse the reply rather than reporting a configuration error.

Request

Field Type Notes
model string An id from GET /models.
messages array Same message shapes as chat completions.
max_tokens integer Leave it out unless you need a specific cap.
stream boolean Server-sent events.
tools array Tool schemas, same shape as the chat path.
curl https://hisoka.ai/api/v1/responses \
  -H "Authorization: Bearer $HISOKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-1017",
    "messages": [{ "role": "user", "content": "ping" }]
  }'

Response

The envelope follows the Responses shape. The usage figures and the hisoka block carry
the same meaning as on the chat path, so billing is read the same way:

{
  "hisoka": {
    "model": "deepseek-v4.1-flash-1017",
    "usd_charged": 0.000021,
    "usd_micro_charged": 21,
    "balance": "4.819965"
  }
}

Streaming

Streamed frames arrive as they are produced. The terminator is always emitted, including
on a turn whose only output was reasoning, so a client never waits on a stream that has
already finished.

Same billing path as chat

All three wire protocols settle through one pricing path, so a call costs the same here as
it would on /chat/completions for the same model and tokens. The protocol is a
formatting choice, not a price tier.

Errors

Identical codes to the chat path, in the OpenAI error envelope. See
Errors.