Skip to main content
GET
/
responses
/
{response_id}
Error
A valid request URL is required to generate request examples
{
  "metadata": {},
  "temperature": 1,
  "top_p": 0.5,
  "user": "<string>",
  "id": "<string>",
  "object": "response",
  "created_at": 123,
  "error": {
    "code": "server_error",
    "message": "<string>"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "output": [
    {
      "type": "message",
      "id": "<string>"
    }
  ],
  "instructions": "<string>",
  "parallel_tool_calls": true,
  "model": "<string>",
  "top_logprobs": 123,
  "previous_response_id": "<string>",
  "reasoning": {
    "effort": "medium",
    "summary": "auto",
    "generate_summary": null
  },
  "background": false,
  "max_output_tokens": 123,
  "max_tool_calls": 123,
  "text": {},
  "tools": [
    {
      "type": "<string>"
    }
  ],
  "tool_choice": "none",
  "truncation": "disabled",
  "status": "completed",
  "output_text": "<string>"
}

Authorizations

api-key
string
header
required

Path Parameters

response_id
string
required

Query Parameters

api-version
enum<string>
default:v1

The explicit Azure AI Foundry Models API version to use for this request. v1 if not otherwise specified.

Available options:
v1,
preview
include_obfuscation
boolean
default:true

When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an obfuscation field on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are included by default, but add a small amount of overhead to the data stream. You can set include_obfuscation to false to optimize for bandwidth if you trust the network links between your application and the OpenAI API.

include[]
enum<string>[]

Specify additional output data to include in the model response. Currently supported values are:

  • code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.
  • computer_call_output.output.image_url: Include image urls from the computer call output.
  • file_search_call.results: Include the search results of the file search tool call.
  • message.input_image.image_url: Include image urls from the input message.
  • message.output_text.logprobs: Include logprobs with assistant messages.
  • reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program).
Available options:
code_interpreter_call.outputs,
computer_call_output.output.image_url,
file_search_call.results,
message.input_image.image_url,
message.output_text.logprobs,
reasoning.encrypted_content

Response

The request has succeeded.

metadata
object
required

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

temperature
number<float> | null
required

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

Required range: 0 <= x <= 2
top_p
number<float> | null
required

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

Required range: 0 <= x <= 1
user
string | null
required

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

id
string
required

Unique identifier for this Response.

object
enum<string>
required

The object type of this resource - always set to response.

Available options:
response
created_at
integer<unixtime>
required

Unix timestamp (in seconds) of when this Response was created.

error
object
required

An error object returned when the model fails to generate a Response.

incomplete_details
object
required

Details about why the response is incomplete.

output
object[]
required

An array of content items generated by the model.

  • The length and order of items in the output array is dependent on the model's response.
  • Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.
instructions
required

A system (or developer) message inserted into the model's context.

When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

parallel_tool_calls
boolean
default:true
required

Whether to allow the model to run tool calls in parallel.

model
string
required

The model used to generate this response.

top_logprobs
integer<int32> | null

An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.

previous_response_id
string | null

The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.

reasoning
object

o-series models only

Configuration options for reasoning models.

background
boolean | null
default:false

Whether to run the model response in the background. Learn more.

max_output_tokens
integer<int32> | null

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

max_tool_calls
integer<int32> | null

The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

text
object

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:

tools
object[]

An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter.

The two categories of tools you can provide the model are:

  • Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
  • Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
tool_choice

How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.

Available options:
none,
auto,
required
prompt
object

Reference to a prompt template and its variables. Learn more.

truncation
enum<string> | null
default:disabled

The truncation strategy to use for the model response.

  • auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.
  • disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Available options:
auto,
disabled
status
enum<string>

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

Available options:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
output_text
string | null

SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs.

usage
object

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.