> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve response

> Retrieves a previously created response by its ID.

Retrieves a previously created response by its ID. The response must have been created with `store: true` (the default).

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl https://api.orq.ai/v3/router/responses/resp_01KP6GDNJY5B0TT0R35KS23PYV \
    -H "Authorization: Bearer $ORQ_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6GDNJY5B0TT0R35KS23PYV",
    "object": "response",
    "created_at": 1776187529,
    "completed_at": 1776187529,
    "status": "completed",
    "model": "openai/gpt-4o",
    "input": [
      {
        "type": "message",
        "id": "msg_01KP6GDNK0TXBVMD3N5BWZ285J",
        "role": "user",
        "content": [
          { "type": "input_text", "text": "What time is it?" }
        ]
      }
    ],
    "output": [
      {
        "type": "orq:current_date",
        "id": "msg_01kp6gdppk31xp6qc1z92x132p",
        "call_id": "fc_888c598a-b519-421a-9904-e5f0e8c34a53",
        "name": "current_date",
        "status": "completed",
        "result": {
          "currentDate": "2026-04-14T17:25:29.175Z"
        }
      },
      {
        "type": "message",
        "id": "msg_01KP6GDPP6D57H9G7VVFKFW07H",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "It's currently 17:25 UTC (2026‑04‑14).",
            "annotations": []
          }
        ]
      }
    ],
    "tools": [
      { "type": "orq:current_date" }
    ],
    "usage": {
      "input_tokens": 352,
      "output_tokens": 126,
      "total_tokens": 478,
      "input_tokens_details": {
        "cached_tokens": 0,
        "cache_creation_tokens": 0
      },
      "output_tokens_details": {
        "reasoning_tokens": 76
      }
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml get /v3/router/responses/{response_id}
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://api.orq.ai
security:
  - ApiKey: []
tags:
  - name: Guardrail Rules
  - name: Policies
  - name: Routing Rules
  - name: Files
    description: File upload and retrieval operations.
  - name: FilesService
  - name: Projects
    description: Projects organize resources within a workspace
  - name: ProjectsService
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: SkillsService
  - name: Responses
  - description: >-
      Run agents on a cadence — cron, interval, or one-off. Minimum firing
      interval is 1 hour.
    name: Agent Schedules
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
  - name: ReportingService
    description: |-
      ReportingService exposes a single QueryReport RPC that maps allowlisted
       analytics payloads onto safe rollup queries. Callers never send SQL;
       the backend picks the rollup family and grain from the metric
       catalogue, the requested range, and the requested grouping.
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v3/router/responses/{response_id}:
    get:
      tags:
        - Responses
      summary: Retrieve response
      description: Retrieves a previously created response by its ID.
      operationId: retrieve-response
      parameters:
        - description: The ID of the response to retrieve
          in: path
          name: response_id
          required: true
          schema:
            description: The ID of the response to retrieve
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  background:
                    type: boolean
                  completed_at:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  conversation:
                    $ref: '#/components/schemas/ConversationParam'
                  created_at:
                    format: int64
                    type: integer
                  error:
                    $ref: '#/components/schemas/ResponseError'
                  frequency_penalty:
                    format: double
                    type: number
                  id:
                    type: string
                  incomplete_details:
                    $ref: '#/components/schemas/IncompleteDetails'
                  input:
                    description: >-
                      Array of input items (messages, function call outputs,
                      etc.)
                    items: {}
                    type:
                      - array
                      - 'null'
                  instructions:
                    type:
                      - string
                      - 'null'
                  max_output_tokens:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  max_tool_calls:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  memory:
                    $ref: '#/components/schemas/MemoryParam'
                  metadata:
                    additionalProperties:
                      type: string
                    description: >-
                      Developer-defined key-value pairs attached to the response
                      (OpenAI spec: Map<string, string>).
                    type: object
                  model:
                    type: string
                  object:
                    description: Always "response"
                    type: string
                  output:
                    description: >-
                      Array of output items (messages, function calls,
                      reasoning, etc.)
                    items: {}
                    type:
                      - array
                      - 'null'
                  parallel_tool_calls:
                    type: boolean
                  presence_penalty:
                    format: double
                    type: number
                  previous_response_id:
                    type:
                      - string
                      - 'null'
                  prompt_cache_key:
                    type:
                      - string
                      - 'null'
                  prompt_cache_retention:
                    type:
                      - string
                      - 'null'
                  reasoning:
                    $ref: '#/components/schemas/Reasoning'
                  safety_identifier:
                    type:
                      - string
                      - 'null'
                  service_tier:
                    enum:
                      - auto
                      - default
                      - flex
                      - priority
                    type: string
                  status:
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - incomplete
                      - requires_action
                    type: string
                  store:
                    type: boolean
                  temperature:
                    format: double
                    type: number
                  text:
                    description: Text output configuration including format and verbosity
                  tool_choice:
                    description: >-
                      Tool choice setting: "auto", "none", "required", or a
                      specific function
                  tools:
                    description: Array of tool configurations used in this response
                    items: {}
                    type:
                      - array
                      - 'null'
                  top_logprobs:
                    format: int64
                    type: integer
                  top_p:
                    format: double
                    type: number
                  truncation:
                    enum:
                      - disabled
                      - auto
                    type: string
                  usage:
                    $ref: '#/components/schemas/PublicUsage'
                  user:
                    type:
                      - string
                      - 'null'
                  variables:
                    type: object
                    additionalProperties: {}
                required:
                  - id
                  - object
                  - created_at
                  - completed_at
                  - status
                  - incomplete_details
                  - model
                  - previous_response_id
                  - instructions
                  - input
                  - output
                  - error
                  - tools
                  - tool_choice
                  - temperature
                  - top_p
                  - presence_penalty
                  - frequency_penalty
                  - top_logprobs
                  - max_output_tokens
                  - max_tool_calls
                  - reasoning
                  - text
                  - user
                  - usage
                  - truncation
                  - parallel_tool_calls
                  - store
                  - background
                  - metadata
                  - service_tier
                  - safety_identifier
                  - prompt_cache_key
                  - prompt_cache_retention
                type: object
          description: Response retrieved successfully.
        '404':
          description: Response not found.
components:
  schemas:
    ConversationParam:
      additionalProperties: false
      properties:
        id:
          type: string
      required:
        - id
      type: object
    ResponseError:
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    IncompleteDetails:
      additionalProperties: false
      properties:
        reason:
          type: string
      required:
        - reason
      type: object
    MemoryParam:
      additionalProperties: false
      properties:
        entity_id:
          type: string
      required:
        - entity_id
      type: object
    Reasoning:
      additionalProperties: false
      properties:
        effort:
          type: string
        summary:
          type: string
      type: object
    PublicUsage:
      additionalProperties: false
      properties:
        input_cost:
          description: >-
            Cost (USD) of input tokens. Present when billing was computed for
            this response.
          format: double
          type: number
        input_tokens:
          format: int64
          type: integer
        input_tokens_details:
          $ref: '#/components/schemas/InputTokensDetails'
        output_cost:
          description: >-
            Cost (USD) of output tokens. Present when billing was computed for
            this response.
          format: double
          type: number
        output_tokens:
          format: int64
          type: integer
        output_tokens_details:
          $ref: '#/components/schemas/OutputTokensDetails'
        total_cost:
          description: >-
            Total cost (USD) of the response. Present when billing was computed
            for this response.
          format: double
          type: number
        total_tokens:
          format: int64
          type: integer
        web_search_requests:
          format: int64
          type: integer
      required:
        - input_tokens
        - output_tokens
        - total_tokens
        - input_tokens_details
        - output_tokens_details
      type: object
    InputTokensDetails:
      additionalProperties: false
      properties:
        cache_creation_tokens:
          format: int64
          type: integer
        cached_tokens:
          format: int64
          type: integer
      required:
        - cached_tokens
        - cache_creation_tokens
      type: object
    OutputTokensDetails:
      additionalProperties: false
      properties:
        reasoning_tokens:
          format: int64
          type: integer
      required:
        - reasoning_tokens
      type: object
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````