# Responses API

> Request fields for LLMoxy POST /v1/responses, default filtering, and a live streaming check of grok-4.6 and grok-4.7.

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

```txt
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

| Field | Type | Required | Gateway behavior |
| --- | --- | --- | --- |
| `model` | string | yes | Non-empty model ID. |
| `input` | string or array | yes | Must 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`. |
| `include` | JSON | no | Kept as received. |
| `conversation` | JSON | no | Kept as received. |
| `context_management` | JSON | no | Kept as received. |
| `instructions` | JSON | no | Kept as received. A string is the usual form. |
| `max_output_tokens` | number | no | Nullable. Explicit `0` is kept. |
| `top_logprobs` | number | no | Nullable. Explicit `0` is kept. |
| `metadata` | JSON | no | Kept as received. |
| `parallel_tool_calls` | JSON | no | Kept as received. Explicit `false` is kept. |
| `previous_response_id` | string | no | An empty string is omitted. |
| `reasoning.effort` | string | no | An empty string is omitted. Values are not validated. |
| `reasoning.summary` | string | no | An empty string is omitted. Values are not validated. |
| `service_tier` | string | no | Removed by default. |
| `store` | JSON | no | Kept by default. Explicit `false` is kept. |
| `prompt_cache_key` | JSON | no | Kept as received. |
| `prompt_cache_retention` | JSON | no | Kept as received. |
| `safety_identifier` | JSON | no | Removed by default. |
| `stream` | boolean | no | Omitted means a non-streaming request. Explicit `false` is kept. |
| `stream_options.include_usage` | boolean | no | `false` is omitted when the body is rebuilt. |
| `stream_options.include_obfuscation` | boolean | no | Removed by default. `false` is omitted when the body is rebuilt. |
| `temperature` | number | no | Nullable. Explicit `0` is kept. |
| `text` | JSON | no | Kept as received. |
| `tool_choice` | JSON | no | Kept as received. |
| `tools` | JSON | no | Kept as received. |
| `top_p` | number | no | Nullable. Explicit `0` is kept. |
| `truncation` | JSON | no | Kept as received. |
| `user` | JSON | no | Kept as received. |
| `max_tool_calls` | number | no | Nullable. Explicit `0` is kept. |
| `prompt` | JSON | no | Kept as received. |
| `enable_thinking` | JSON | no | Kept as received. |
| `preset` | JSON | no | Kept 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.

| Model | HTTP | Response `model` | `status` | Text | input / output / total |
| --- | --- | --- | --- | --- | --- |
| `grok-4.6` | 200 | `grok-4.6` | `completed` | `pong` | 212 / 98 / 310 |
| `grok-4.7` | 200 | `grok-4.7` | `completed` | `pong` | 1248 / 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`.

```bash
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
  }'
```

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.

```txt
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

```txt
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.

This is the markdown version of https://en.llmoxy.com/docs/api-reference/responses.
