Responses API

POST https://llmoxy.com/v1/responses accepts a JSON body. Request headers:

Authorization: Bearer <LLMOXY_API_KEY>
Content-Type: application/json

The gateway parses the body into a fixed structure. A request is rejected when model is empty, when input is absent, or when max_output_tokens is greater than 1,073,741,823. background is not part of this structure.

Without request-body pass-through, only the fields in the table below are kept. service_tier, safety_identifier, and stream_options.include_obfuscation are removed by default. store is kept. An explicit 0 on a nullable number and an explicit false on stream are still sent. A false boolean inside stream_options is omitted when the body is rebuilt. Fields outside the table are not sent.

Request fields

FieldTypeRequiredGateway behavior
modelstringyesNon-empty model ID.
inputstring or arrayyesMust be present. A string counts as one piece of input text. Array items may include role. String content counts as input text. Array content recognizes input_text, input_image, and input_file. image_url and file_url may be a string or an object with url.
includeJSONnoKept as received.
conversationJSONnoKept as received.
context_managementJSONnoKept as received.
instructionsJSONnoKept as received. A string is the usual form.
max_output_tokensnumbernoNullable. Explicit 0 is kept.
top_logprobsnumbernoNullable. Explicit 0 is kept.
metadataJSONnoKept as received.
parallel_tool_callsJSONnoKept as received. Explicit false is kept.
previous_response_idstringnoAn empty string is omitted.
reasoning.effortstringnoAn empty string is omitted. Values are not validated.
reasoning.summarystringnoAn empty string is omitted. Values are not validated.
service_tierstringnoRemoved by default.
storeJSONnoKept by default. Explicit false is kept.
prompt_cache_keyJSONnoKept as received.
prompt_cache_retentionJSONnoKept as received.
safety_identifierJSONnoRemoved by default.
streambooleannoOmitted means a non-streaming request. Explicit false is kept.
stream_options.include_usagebooleannofalse is omitted when the body is rebuilt.
stream_options.include_obfuscationbooleannoRemoved by default. false is omitted when the body is rebuilt.
temperaturenumbernoNullable. Explicit 0 is kept.
textJSONnoKept as received.
tool_choiceJSONnoKept as received.
toolsJSONnoKept as received.
top_pnumbernoNullable. Explicit 0 is kept.
truncationJSONnoKept as received.
userJSONnoKept as received.
max_tool_callsnumbernoNullable. Explicit 0 is kept.
promptJSONnoKept as received.
enable_thinkingJSONnoKept as received.
presetJSONnoKept as received.

grok-4.6 and grok-4.7

On 2026-10-03, streaming calls to https://llmoxy.com/v1/responses for grok-4.6 and grok-4.7 both returned HTTP 200 and the same event sequence.

ModelHTTPResponse modelstatusTextinput / output / total
grok-4.6200grok-4.6completedpong212 / 98 / 310
grok-4.7200grok-4.7completedpong1248 / 55 / 1303

For grok-4.6, input_tokens_details.cached_tokens was 128 and output_tokens_details.reasoning_tokens was 97. For grok-4.7, those values were 1152 and 54.

The visible text is output[] where type is message, then content[] where type is output_text, field text. Both models first emit an output item whose type is reasoning. In response.completed, that reasoning item still has status in_progress.

Requests for these two models have request-body pass-through enabled, so the minimal JSON in the next section is sent as the client wrote it.

Minimal successful request

Use the same body for grok-4.6 and set model to grok-4.6.

curl https://llmoxy.com/v1/responses \
  -H "Authorization: Bearer <LLMOXY_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.7",
    "input": "Reply with exactly: pong",
    "max_output_tokens": 64,
    "stream": true
  }'
BASH

The response Content-Type is text/event-stream. Each event is one event: line and one data: line. The gateway forwards the original JSON of each parsed event, and the event name is the JSON type. The stream ends with the final response.completed event.

Both models emit the same event names, in this order:

response.created, response.in_progress, response.output_item.added, response.reasoning_summary_part.added, response.reasoning_summary_text.delta, response.reasoning_summary_text.delta, response.reasoning_summary_text.done, response.reasoning_summary_part.done, response.output_item.done, response.output_item.added, response.content_part.added, response.output_text.delta, response.output_text.done, response.content_part.done, response.output_item.done, response.completed.

The capture below is the grok-4.7 response. Response and item IDs are placeholders. The other fields match that response.

event: response.created
data: {"type":"response.created","sequence_number":0,"response":{"object":"response","id":"resp_example","created_at":1791015238,"model":"grok-4.7","output":[],"status":"in_progress"},"output_index":0}

event: response.in_progress
data: {"type":"response.in_progress","sequence_number":1,"response":{"object":"response","id":"resp_example","created_at":1791015238,"model":"grok-4.7","output":[],"status":"in_progress"},"output_index":0}

event: response.output_item.added
data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"id":"item_reasoning","type":"reasoning","status":"in_progress","summary":[]}}

event: response.reasoning_summary_part.added
data: {"type":"response.reasoning_summary_part.added","sequence_number":3,"output_index":0,"item_id":"item_reasoning","part":{"type":"summary_text","text":""},"summary_index":0}

event: response.reasoning_summary_text.delta
data: {"type":"response.reasoning_summary_text.delta","sequence_number":4,"output_index":0,"item_id":"item_reasoning","delta":"The user wants a reply","summary_index":0}

event: response.reasoning_summary_text.delta
data: {"type":"response.reasoning_summary_text.delta","sequence_number":5,"output_index":0,"item_id":"item_reasoning","delta":" of exactly \"pong\".","summary_index":0}

event: response.reasoning_summary_text.done
data: {"type":"response.reasoning_summary_text.done","sequence_number":6,"output_index":0,"item_id":"item_reasoning","text":"The user wants a reply of exactly \"pong\".","summary_index":0}

event: response.reasoning_summary_part.done
data: {"type":"response.reasoning_summary_part.done","sequence_number":7,"output_index":0,"item_id":"item_reasoning","part":{"type":"summary_text","text":"The user wants a reply of exactly \"pong\"."},"summary_index":0}

event: response.output_item.done
data: {"type":"response.output_item.done","sequence_number":8,"output_index":0,"item":{"id":"item_reasoning","type":"reasoning","summary":[{"text":"The user wants a reply of exactly \"pong\".","type":"summary_text"}]}}

event: response.output_item.added
data: {"type":"response.output_item.added","sequence_number":9,"output_index":1,"item":{"id":"item_message","type":"message","role":"assistant","content":[],"status":"in_progress"}}

event: response.content_part.added
data: {"type":"response.content_part.added","sequence_number":10,"output_index":1,"item_id":"item_message","content_index":0,"part":{"type":"output_text","text":"","annotations":[]}}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":11,"output_index":1,"item_id":"item_message","content_index":0,"delta":"pong"}

event: response.output_text.done
data: {"type":"response.output_text.done","sequence_number":12,"output_index":1,"item_id":"item_message","content_index":0,"text":"pong"}

event: response.content_part.done
data: {"type":"response.content_part.done","sequence_number":13,"output_index":1,"item_id":"item_message","content_index":0,"part":{"type":"output_text","text":"pong","annotations":[]}}

event: response.output_item.done
data: {"type":"response.output_item.done","sequence_number":14,"output_index":1,"item":{"id":"item_message","type":"message","role":"assistant","content":[{"type":"output_text","annotations":[],"text":"pong"}],"status":"completed"}}

event: response.completed
data: {"type":"response.completed","sequence_number":15,"response":{"object":"response","id":"resp_example","created_at":1791015238,"model":"grok-4.7","output":[{"id":"item_reasoning","type":"reasoning","status":"in_progress","summary":[{"text":"The user wants a reply of exactly \"pong\".","type":"summary_text"}]},{"id":"item_message","type":"message","role":"assistant","content":[{"type":"output_text","text":"pong"}],"status":"completed"}],"status":"completed","usage":{"input_tokens":1248,"input_tokens_details":{"cached_tokens":1152},"output_tokens":55,"output_tokens_details":{"reasoning_tokens":54},"total_tokens":1303}},"output_index":0}

Conversation compaction

POST https://llmoxy.com/v1/responses/compact

The fields are model (required), input, instructions, and previous_response_id. The grok calls above did not use this route.