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.

POST/responses

Creates 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
AuthorizationBearer <token>

Your HopsAPI key, sent as Authorization: Bearer sk-YOUR_KEY.

In: header

Header Parameters

ParameterTypeRequiredDefaultDescription
AuthorizationstringRequired–

Your HopsAPI key as a bearer token.

ParameterTypeRequiredDefaultDescription
session-idstringOptional–

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.

ParameterTypeRequiredDefaultDescription
thread-idstringOptional–

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: session-id alone is sufficient).

ParameterTypeRequiredDefaultDescription
conversation-idstringOptional–

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: session-id alone is sufficient).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

ParameterTypeRequiredDefaultDescription
modelstringRequired–

Model ID used to generate the response. Use an ID returned by GET /v1/models.

Unlike the OpenAI API, this field is required. An unknown model ID returns HTTP 400.

inputstring | arrayRequired–

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, EasyInputMessage array, input_text content blocks, the developer role, input_image as a base64 data URL, and input_file with inline file_data. Remote HTTPS URLs in input_image do not work.

input[].rolestringConditional–

Instruction-following hierarchy. developer and system take precedence over user.

Values: "user" "assistant" "system" "developer"

input[].contentstring | arrayConditional–

A string, or a list of content blocks.

input[].content[].typestringConditional–

Values: "input_text" "input_image" "input_file"

input[].content[].textstringOptional–

Used when type is input_text.

input[].content[].image_urlstringOptional–

Used when type is input_image. Only data: base64 URLs work.

input[].content[].filenamestringOptional–

Used when type is input_file.

input[].content[].file_datastringOptional–

Used when type is input_file. Inline base64 file content.

instructionsstringOptional–

A system message inserted into the model's context.

Note that when this field is omitted, the gateway injects a default system prompt (You are a helpful coding assistant.), which influences model behaviour and counts toward input tokens. Send this field explicitly to override it.

streambooleanOptionalfalse

Stream the response as native Responses SSE events. Event names and structures follow the official specification.

textobjectOptional–

Configuration for the text response. Both format and verbosity are verified to take effect.

text.formatobjectOptional–

Output format, defaulting to {"type":"text"}. All three forms work.

text.format.typestringConditional–

text for free-form output, json_object for legacy JSON mode, json_schema for structured outputs.

Values: "text" "json_object" "json_schema"

text.format.namestringOptional–

Required when type is json_schema. a-z, A-Z, 0-9, underscores and dashes, max 64 characters.

text.format.schemaobjectOptional–

Required when type is json_schema. The JSON Schema the output must follow.

text.format.descriptionstringOptional–

What the format is for; used by the model.

text.format.strictbooleanOptional–

Enforce exact schema adherence. Verified to work.

text.verbositystringOptional"medium"

Controls output length. Verified to produce a real difference in output token count.

Values: "low" "medium" "high"

toolsarrayOptional–

⚠️ Partially supported. Tools the model may call.

Four of the 16 official tool types work: function, web_search, custom and namespace.

image_generation returns HTTP 200 and is echoed back with defaults filled in, but the tool is dropped before the request reaches the model, so it never takes effect. Do not rely on it.

The remaining types return HTTP 400: file_search, computer, computer_use_preview, code_interpreter, shell, mcp, programmatic_tool_calling, apply_patch and web_search_preview return a bare Bad Request; local_shell returns The local_shell tool is no longer supported.; tool_search must be sent alongside at least one deferred tool and on its own returns tools.tool_search requires at least one deferred tool.

tools[].typestringConditional–

function for your own code, web_search for live web results, custom for free-form tool input, namespace to group tools.

Values: "function" "web_search" "custom" "namespace"

tools[].namestringOptional–

Tool name. Required for function and custom.

tools[].descriptionstringOptional–

What the tool does; used by the model to decide when to call it.

tools[].parametersobjectOptional–

JSON Schema for the function arguments.

tools[].strictbooleanOptional–

Enforce exact adherence to parameters.

tool_choicestring | objectOptional–

⚠️ Partially supported. How the model selects a tool.

Working: the string modes none, auto, required, plus the {"type":"function"}, {"type":"custom"} and {"type":"allowed_tools"} object forms.

Not supported: object forms naming a hosted tool type (file_search, web_search_preview, computer_use_preview, code_interpreter, image_generation, mcp, shell, apply_patch, programmatic_tool_calling) — these return HTTP 400 with Tool choice 'X' not found in 'tools' parameter.

tool_choice.typestringConditional–

Values: "function" "custom" "allowed_tools"

tool_choice.namestringOptional–

The tool to force, for function and custom.

tool_choice.modestringOptional–

Used with allowed_tools.

Values: "auto" "required"

tool_choice.toolsarrayOptional–

Used with allowed_tools. The subset the model may pick from.

parallel_tool_callsbooleanOptionaltrue

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, true returns 2 function_call items and false returns 1.

reasoningobjectOptional–

⚠️ Partially supported. Reasoning configuration.

effort, summary and context all work. mode accepts only its default standard, and generate_summary returns HTTP 400.

reasoning.effortstringOptional–

Reasoning budget. Verified to take effect: usage.output_tokens_details.reasoning_tokens rises monotonically with the level (measured 2026-08-30: 0 at none, about 349 at xhigh, about 516 at max).

Note that minimal from the official enum is not supported by this model and returns HTTP 400 with Unsupported value: 'minimal' is not supported with the 'gpt-5.6-sol' model.

Values: "none" "low" "medium" "high" "xhigh" "max"

reasoning.summarystringOptional–

Detail level of the reasoning summary. Non-streaming responses include a reasoning item whose summary field carries the text.

Note that auto resolves to detailed in testing.

Values: "auto" "concise" "detailed"

reasoning.contextstringOptional–

Which turns the model reasons over. The gpt-5.6 family defaults to all_turns.

Values: "auto" "current_turn" "all_turns"

reasoning.generate_summarystringOptional–

❌ Not supported. Returns HTTP 400. Deprecated upstream — use reasoning.summary.

Values: "auto" "concise" "detailed"

reasoning.modestringOptional–

⚠️ Only the default standard is accepted. standard returns HTTP 200 and is echoed back (the response echoes standard even when the field is omitted); pro returns HTTP 400 with `reasoning.mode` is not supported with this model.

Values: "standard" "pro"

includearrayOptional–

⚠️ Partially supported. Most enum values return HTTP 200; message.output_text.logprobs returns HTTP 400 with logprobs are not supported with reasoning models.

storebooleanRequired–

⚠️ Only false is accepted. Responses are not stored and there is no GET /v1/responses/{id} retrieval endpoint (that path returns 404).

Sending true — or omitting the field — returns HTTP 400, so pass false explicitly. Build multi-turn conversations by resending the input array.

Values: false

stream_optionsobjectOptional–

⚠️ Partially supported. The value is accepted, but no observable difference was measured for include_obfuscation, and sending it while stream is false raises no error.

stream_options.include_obfuscationbooleanOptional–

Add random padding to streaming delta events, mitigating length-based side-channel attacks.

backgroundbooleanOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: run the response in the background. This endpoint exposes no task-polling endpoint, so the mode cannot work.

context_managementarrayOptional–

⚠️ Partially available. [{"type": "compaction", "compact_threshold": 1000}] returns HTTP 200 (verified 2026-08-26 and 2026-08-30); the field is not echoed in the response. compact_threshold below 1000 returns 400; type values compact and auto return 400 with Unsupported context_management type: 'X'..

Official purpose: configure context compaction.

context_management[].typestringConditional–

Entry type. Only compaction is supported.

context_management[].compact_thresholdnumberOptional–

Token threshold that triggers compaction.

conversationstringOptional–

❌ Not supported. Returns HTTP 400; the /v1/conversations endpoint is unavailable as well.

Official purpose: attach the response to a conversation that accumulates context automatically. Build multi-turn conversations by resending the input array instead.

max_output_tokensintegerOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: cap the tokens generated for a response. This endpoint cannot use it for cost control — constrain output length with text.verbosity and reasoning.effort instead.

max_tool_callsintegerOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: cap the total number of built-in tool calls.

metadataobjectOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: attach custom key-value pairs to the response object.

moderationobjectOptional–

❌ Not supported. Returns HTTP 400, including the form that carries a policy.

Official purpose: configure input and output moderation.

moderation.modelstringOptional–

Moderation model ID.

moderation.policyobjectOptional–

Input and output moderation policy.

previous_response_idstringOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: continue from a prior response. This endpoint forces store=false, so responses are never persisted and cannot be resumed by ID. Build multi-turn conversations by resending the input array.

promptobjectOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: reference a server-side prompt template and its variables.

prompt.idstringOptional–

Prompt template ID.

prompt.versionstringOptional–

Template version.

prompt.variablesobjectOptional–

Values substituted into the template.

prompt_cache_keystringOptional–

❌ 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 session-id request header instead — see the header parameters above.

prompt_cache_optionsobjectOptional–

❌ Not supported. Returns HTTP 400 for both implicit and explicit modes. The content-block-level prompt_cache_breakpoint is rejected too, as an invalid content-block type.

Official purpose: control prompt cache breakpoints and lifetime.

prompt_cache_options.modestringOptional–

Cache breakpoint mode.

Values: "implicit" "explicit"

prompt_cache_options.ttlstringOptional–

Minimum lifetime of each cache breakpoint.

Values: "30m"

prompt_cache_retentionstringOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: maximum prompt cache retention (deprecated upstream in favour of prompt_cache_options.ttl).

Values: "in_memory" "24h"

safety_identifierstringOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: a stable identifier for detecting policy-violating users.

service_tierstringOptional–

❌ Not supported. There is no way to select a processing tier through this parameter.

Two different behaviours: auto, flex, scale and fast return HTTP 400; default, priority and ultrafast return HTTP 200 but the response always echoes default.

Values: "auto" "default" "flex" "scale" "priority" "fast" "ultrafast"

temperaturenumberOptional–

❌ Not supported. Returns HTTP 400, for both in-range and out-of-range values.

Official purpose: sampling temperature between 0 and 2. Constrain randomness through the prompt instead.

top_logprobsintegerOptional–

❌ Not supported. Returns HTTP 400, and pairing it with include does not help — reasoning models do not support logprobs.

Official purpose: return the most likely tokens per position, 0 to 20.

top_pnumberOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: nucleus sampling, an alternative to temperature.

truncationstringOptional–

❌ Not supported. Sending either auto or disabled explicitly returns HTTP 400, although the response echoes disabled when the field is omitted.

Official purpose: truncation strategy when the input exceeds the context window.

Values: "auto" "disabled"

userstringOptional–

❌ Not supported. Returns HTTP 400.

Official purpose: a stable end-user identifier (being replaced upstream by safety_identifier and prompt_cache_key).

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    }  }}