GET
/
responses
/
{response_id}
curl --request GET \
  --url https://api.portkey.ai/v1/responses/{response_id} \
  --header 'x-portkey-api-key: <api-key>'
{
  "metadata": {},
  "temperature": 1,
  "top_p": 1,
  "user": "user-1234",
  "previous_response_id": "<string>",
  "model": "gpt-4o",
  "reasoning": {
    "effort": "medium",
    "generate_summary": "concise"
  },
  "max_output_tokens": 123,
  "instructions": "<string>",
  "text": {
    "format": {
      "type": "text"
    }
  },
  "tools": [
    {
      "type": "file_search",
      "vector_store_ids": [
        "<string>"
      ],
      "max_num_results": 123,
      "filters": {
        "type": "eq",
        "key": "<string>",
        "value": "<string>"
      },
      "ranking_options": {
        "ranker": "auto",
        "score_threshold": 0
      }
    }
  ],
  "tool_choice": "none",
  "truncation": "disabled",
  "id": "<string>",
  "object": "response",
  "status": "completed",
  "created_at": 123,
  "error": {
    "code": "server_error",
    "message": "<string>"
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "output": [
    {
      "id": "<string>",
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "<string>",
          "annotations": [
            {
              "type": "file_citation",
              "index": 123,
              "file_id": "<string>"
            }
          ]
        }
      ],
      "status": "in_progress"
    }
  ],
  "output_text": "<string>",
  "usage": {
    "input_tokens": 123,
    "input_tokens_details": {
      "cached_tokens": 123
    },
    "output_tokens": 123,
    "output_tokens_details": {
      "reasoning_tokens": 123
    },
    "total_tokens": 123
  },
  "parallel_tool_calls": true
}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

response_id
string
required

The ID of the response to retrieve.

Example:

"resp_677efb5139a88190b512bc3fef8e535d"

Query Parameters

include
enum<string>[]

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

  • 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.
  • computer_call_output.output.image_url: Include image urls from the computer call output.

Response

200 - application/json

OK

The response is of type object.