OpenAI Responses API (Subscription)
This page documents the parameter support verified on the subscription channel. Models called with a subscription-channel API key must follow the parameter statuses documented here.
/responsesCreates a model response through the native OpenAI Responses protocol.
Call GET /v1/models to check support: a model supports this endpoint when its item includes "responses_endpoint":"/v1/responses".
When calling GPT models, prompt-cache hits only require the session-id header: read its value from the response and send it unchanged with every LLM request in the same associated session (A/B verified 2026-08-25: sending session-id alone caches as reliably as sending all three headers). thread-id and conversation-id are optional, for conversation tracking only, and are not required for cache hits. None of these headers are required for other LLM requests. Media-task endpoints and other custom request headers are not forwarded. Do not place sensitive credentials in these headers.
Official parameters not supported on this channel (see each parameter's entry in the table below for the exact rejection behaviour): background, conversation, max_output_tokens, max_tool_calls, metadata, moderation, previous_response_id, prompt, prompt_cache_key, prompt_cache_options, prompt_cache_retention, safety_identifier, service_tier, temperature, top_logprobs, top_p, truncation, user. Partially available / restricted: store (only false), context_management, include, reasoning, stream_options, tools, tool_choice.
Authorization
bearerAuth Your HopsAPI key, sent as Authorization: Bearer sk-YOUR_KEY.
In: header
Header Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Authorization | string | Required | – | Your HopsAPI key as a bearer token. |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
session-id | string | Optional | – | Upstream session ID used to associate the conversation. Optional, but recommended on every request: for GPT prompt-cache hits, copy this value from the response and send it unchanged on every LLM request in the same associated session; A/B verified 2026-08-25, this header alone reliably hits the cache. |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
thread-id | string | Optional | – | Upstream thread ID used to associate the conversation, optional. May be echoed back for conversation tracking; cache hits do not depend on it (A/B verified 2026-08-25: |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
conversation-id | string | Optional | – | Upstream conversation ID used to associate the conversation, optional. May be echoed back for conversation tracking; cache hits do not depend on it (A/B verified 2026-08-25: |
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | – | Model ID used to generate the response. Use an ID returned by Unlike the OpenAI API, this field is required. An unknown model ID returns HTTP |
input | string | array | Required | – | Text, image, or file inputs to the model. Accepts a plain string or an array of input items. Unlike the OpenAI API, this field is required. Verified working: plain string, |
input[] | string | Conditional | – | Instruction-following hierarchy. Values: |
input[] | string | array | Conditional | – | A string, or a list of content blocks. |
input[] | string | Conditional | – | Values: |
input[] | string | Optional | – | Used when |
input[] | string | Optional | – | Used when |
input[] | string | Optional | – | Used when |
input[] | string | Optional | – | Used when |
instructions | string | Optional | – | A system message inserted into the model's context. Note that when this field is omitted, the gateway injects a default system prompt ( |
stream | boolean | Optional | false | Stream the response as native Responses SSE events. Event names and structures follow the official specification. |
text | object | Optional | – | Configuration for the text response. Both |
text. | object | Optional | – | Output format, defaulting to |
text. | string | Conditional | – |
Values: |
text. | string | Optional | – | Required when |
text. | object | Optional | – | Required when |
text. | string | Optional | – | What the format is for; used by the model. |
text. | boolean | Optional | – | Enforce exact schema adherence. Verified to work. |
text. | string | Optional | "medium" | Controls output length. Verified to produce a real difference in output token count. Values: |
tools | array | Optional | – | ⚠️ Partially supported. Tools the model may call. Four of the 16 official tool types work:
The remaining types return HTTP |
tools[] | string | Conditional | – |
Values: |
tools[] | string | Optional | – | Tool name. Required for |
tools[] | string | Optional | – | What the tool does; used by the model to decide when to call it. |
tools[] | object | Optional | – | JSON Schema for the function arguments. |
tools[] | boolean | Optional | – | Enforce exact adherence to |
tool_ | string | object | Optional | – | ⚠️ Partially supported. How the model selects a tool. Working: the string modes Not supported: object forms naming a hosted tool type ( |
tool_ | string | Conditional | – | Values: |
tool_ | string | Optional | – | The tool to force, for |
tool_ | string | Optional | – | Used with Values: |
tool_ | array | Optional | – | Used with |
parallel_ | boolean | Optional | true | Whether the model may call several tools in parallel within one turn. Verified to take effect: asked to look up the weather for two cities in one request, |
reasoning | object | Optional | – | ⚠️ Partially supported. Reasoning configuration.
|
reasoning. | string | Optional | – | Reasoning budget. Verified to take effect: Note that Values: |
reasoning. | string | Optional | – | Detail level of the reasoning summary. Non-streaming responses include a Note that Values: |
reasoning. | string | Optional | – | Which turns the model reasons over. The Values: |
reasoning. | string | Optional | – | ❌ Not supported. Returns HTTP Values: |
reasoning. | string | Optional | – | ⚠️ Only the default Values: |
include | array | Optional | – | ⚠️ Partially supported. Most enum values return HTTP |
store | boolean | Required | – | ⚠️ Only Sending Values: |
stream_ | object | Optional | – | ⚠️ Partially supported. The value is accepted, but no observable difference was measured for |
stream_ | boolean | Optional | – | Add random padding to streaming delta events, mitigating length-based side-channel attacks. |
background | boolean | Optional | – | ❌ Not supported. Returns HTTP Official purpose: run the response in the background. This endpoint exposes no task-polling endpoint, so the mode cannot work. |
context_ | array | Optional | – | ⚠️ Partially available. Official purpose: configure context compaction. |
context_ | string | Conditional | – | Entry type. Only |
context_ | number | Optional | – | Token threshold that triggers compaction. |
conversation | string | Optional | – | ❌ Not supported. Returns HTTP Official purpose: attach the response to a conversation that accumulates context automatically. Build multi-turn conversations by resending the |
max_ | integer | Optional | – | ❌ Not supported. Returns HTTP Official purpose: cap the tokens generated for a response. This endpoint cannot use it for cost control — constrain output length with |
max_ | integer | Optional | – | ❌ Not supported. Returns HTTP Official purpose: cap the total number of built-in tool calls. |
metadata | object | Optional | – | ❌ Not supported. Returns HTTP Official purpose: attach custom key-value pairs to the response object. |
moderation | object | Optional | – | ❌ Not supported. Returns HTTP Official purpose: configure input and output moderation. |
moderation. | string | Optional | – | Moderation model ID. |
moderation. | object | Optional | – | Input and output moderation policy. |
previous_ | string | Optional | – | ❌ Not supported. Returns HTTP Official purpose: continue from a prior response. This endpoint forces |
prompt | object | Optional | – | ❌ Not supported. Returns HTTP Official purpose: reference a server-side prompt template and its variables. |
prompt. | string | Optional | – | Prompt template ID. |
prompt. | string | Optional | – | Template version. |
prompt. | object | Optional | – | Values substituted into the template. |
prompt_ | string | Optional | – | ❌ Not supported. Sending it raises no error, but the value is overwritten with a gateway-generated random UUID, so this field cannot drive cache hits. Official purpose: improve prompt cache hit rates. On this endpoint, correlate the session with the |
prompt_ | object | Optional | – | ❌ Not supported. Returns HTTP Official purpose: control prompt cache breakpoints and lifetime. |
prompt_ | string | Optional | – | Cache breakpoint mode. Values: |
prompt_ | string | Optional | – | Minimum lifetime of each cache breakpoint. Values: |
prompt_ | string | Optional | – | ❌ Not supported. Returns HTTP Official purpose: maximum prompt cache retention (deprecated upstream in favour of Values: |
safety_ | string | Optional | – | ❌ Not supported. Returns HTTP Official purpose: a stable identifier for detecting policy-violating users. |
service_ | string | Optional | – | ❌ Not supported. There is no way to select a processing tier through this parameter. Two different behaviours: Values: |
temperature | number | Optional | – | ❌ Not supported. Returns HTTP Official purpose: sampling temperature between 0 and 2. Constrain randomness through the prompt instead. |
top_ | integer | Optional | – | ❌ Not supported. Returns HTTP Official purpose: return the most likely tokens per position, 0 to 20. |
top_ | number | Optional | – | ❌ Not supported. Returns HTTP Official purpose: nucleus sampling, an alternative to |
truncation | string | Optional | – | ❌ Not supported. Sending either Official purpose: truncation strategy when the input exceeds the context window. Values: |
user | string | Optional | – | ❌ Not supported. Returns HTTP Official purpose: a stable end-user identifier (being replaced upstream by |
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/responses" \ -H "Authorization: Bearer sk-YOUR_KEY" \ -H "session-id: sess_example" \ -H "thread-id: thread_example" \ -H "conversation-id: conv_example" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.6-sol", "input": "Go 快速排序一般为什么比较快", "store": false }'{ "id": "string", "object": "string", "created_at": 0, "completed_at": 0, "status": "completed", "model": "string", "error": {}, "incomplete_details": {}, "instructions": "string", "output": [ { "type": "string", "role": "string", "content": [ { "type": "string", "text": "string" } ] } ], "output_text": "string", "usage": { "input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "input_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 }, "output_tokens_details": { "reasoning_tokens": 0 } }}OpenAI format
Call text models that explicitly advertise compatibility through standard OpenAI Chat Completions.
Anthropic Message API (Subscription)
This page documents the parameter support verified on the subscription channel. Models called with a subscription-channel API key must follow the parameter statuses documented here.