apicheats.dev openai/llms.txt Raw .md
GET

GET /responses/{response_id} — OpenAI API

OpenAI API key (required); https://api.openai.com/v1

OpenAI API

Get a model response

Base URL
https://api.openai.com/v1
Auth
Authorization: Bearer <OPENAI_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 280 tokens · Vary: Accept

Critical gotchas

The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.

Audio transcription uploads use multipart form data rather than a JSON request body.

cURL

curl -X GET 'https://api.openai.com/v1/responses/resp_677efb5139a88190b512bc3fef8e535d?include=example&stream=true&starting_after=10&include_obfuscation=true' \  -H "Authorization: Bearer $OPENAI_API_KEY"

Parameters

Name In Type Required Description
response_id path string Yes The ID of the response to retrieve.
include query string[] No Additional fields to include in the response. See the `include` parameter for Response creation above for more information.
stream query boolean No If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format). See the [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events) for more information.
starting_after query integer No The sequence number of the event after which to start streaming.
include_obfuscation query boolean No 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.

Response 200 OK

{
  "metadata": {},
  "top_logprobs": 0,
  "temperature": 1,
  "top_p": 1,
  "user": "user-1234",
  "safety_identifier": "safety-identifier-1234",
  "prompt_cache_key": "prompt-cache-key-1234",
  "prompt_cache_retention": "in_memory",
  "previous_response_id": "string",
  "model": "gpt-6-astra",
  "background": false,
  "max_tool_calls": 0,
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "medium"
  },
  "tools": [
    {
      "type": "function",
      "name": "string",
      "async": true,
      "description": "string",
      "parameters": {},
      "output_schema": {},
      "strict": true,
      "defer_loading": true,
      "allowed_callers": [
        "direct"
      ]
    }
  ],
  "tool_choice": "none",
  "prompt": {
    "id": "string",
    "version": "string",
    "variables": {}
  },
  "service_tier": "auto",
  "truncation": "disabled",
  "id": "string",
  "object": "response",
  "status": "completed",
  "access_programs": {
    "cyber": "standard"
  },
  "created_at": 0,
  "completed_at": 0,
  "error": {
    "type": "string",
    "param": "string",
    "code": "server_error",
    "message": "string",
    "misalignment": {
      "review_target": "string",
      "error_type": "string",
      "detailed_explanation": "string",
      "steer": {
        "message": "string"
      }
    }
  },
  "incomplete_details": {
    "reason": "max_output_tokens"
  },
  "output": [
    {
      "id": "string",
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "string",
          "annotations": [
            "[recursive or deeply nested schema]"
          ],
          "logprobs": [
            "[recursive or deeply nested schema]"
          ]
        }
      ],
      "phase": "commentary",
      "status": "in_progress"
    }
  ],
  "reasoning": {
    "mode": "string",
    "effort": "medium",
    "summary": "auto",
    "context": "auto",
    "generate_summary": "auto"
  },
  "instructions": "string",
  "output_text": "string",
  "usage": {
    "input_tokens": 0,
    "input_tokens_details": {
      "cached_tokens": 0,
      "cache_write_tokens": 0
    },
    "output_tokens": 0,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 0
  },
  "prompt_cache_options": {
    "ttl": "30m",
    "mode": "implicit",
    "comparison_response_id": "string"
  },
  "prompt_cache_diagnostics": {
    "type": "cache_miss",
    "reason": "model_changed",
    "cache_missed_tokens": 0,
    "comparison_reusable_tokens": 0
  },
  "moderation": {
    "input": {
      "type": "moderation_result",
      "model": "string",
      "flagged": true,
      "categories": {},
      "category_scores": {},
      "category_applied_input_types": {}
    },
    "output": {
      "type": "moderation_result",
      "model": "string",
      "flagged": true,
      "categories": {},
      "category_scores": {},
      "category_applied_input_types": {}
    }
  },
  "parallel_tool_calls": true,
  "conversation": {
    "id": "string"
  },
  "max_output_tokens": 0
}
Get a free OpenAI API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.