Home / Servers / OpenAI API / create_response

Create a model response

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create a model response Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own… [POST /responses]

Name on the gateway: openai_api__create_response · may change things.

Parameters

NameTypeDescription
metadataobjectSet of 16 key-value pairs that can be attached to an object. This can be…
top_logprobsintegerAn integer between 0 and 20 specifying the maximum number of most likely…
temperaturenumberWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will…
top_pnumberAn alternative to sampling with temperature, called nucleus sampling, where…
userstringThis field is being replaced by safety_identifier and prompt_cache_key. Use…
safety_identifierstringA stable identifier used to help detect users of your application that may be…
prompt_cache_keystringUsed by OpenAI to cache responses for similar requests to optimize your cache…
prompt_cache_retentionin_memory | 24hDeprecated. Use prompt_cache_options.ttl instead. The retention policy for the…
previous_response_idstringThe unique ID of the previous response to the model. Use this to create…
modelstringModel ID used to generate the response, like gpt-6-astra. OpenAI offers a wide…
backgroundbooleanWhether to run the model response in the background. Learn more.
max_tool_callsintegerThe maximum number of total calls to built-in tools that can be processed in a…
textobjectConfiguration options for a text response from the model. Can be plain text or…
toolsarrayAn array of tools the model may call while generating a response. You can…
tool_choiceobjectHow the model should select which tool (or tools) to use when generating a…
promptobjectReference to a prompt template and its variables. Learn more.
access_programsobjectDomain-specific access programs to use for this request.
imageobjectRequest level image options.
prompt_cache_optionsobjectOptions for prompt caching. Supported for gpt-5.6 and later models. By…
service_tierauto | default | flex | scale | priority | fast | ultrafastSpecifies the processing type used for serving the request. - If set to…
truncationauto | disabledThe truncation strategy to use for the model response. - auto: If the input to…
reasoningobjectConfiguration options for reasoning models.
inputstringText, image, or file inputs to the model, used to generate a response. Learn…
includearraySpecify additional output data to include in the model response. Currently…
parallel_tool_callsbooleanWhether to allow the model to run tool calls in parallel.
storebooleanWhether to store the generated model response for later retrieval via API.…
instructionsstringA system (or developer) message inserted into the model's context. When using…
moderationobjectConfiguration for running moderation on the input and output of this response.
streambooleanIf set to true, the model response data will be streamed to the client as it…
stream_optionsobjectOptions for streaming responses. Only set this when you set stream: true.
conversationobjectThe conversation that this response belongs to. Items from this conversation…
context_managementarrayContext management configuration for this request.
max_output_tokensintegerAn upper bound for the number of tokens that can be generated for a response…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__create_response",
  "arguments": {}
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create a model response tool with metadata set to ….

More from OpenAI API