generate.yaml

  1---
  2version: 2
  3interactions:
  4- id: 0
  5  request:
  6    proto: HTTP/1.1
  7    proto_major: 1
  8    proto_minor: 1
  9    content_length: 297
 10    host: ""
 11    body: '{"max_output_tokens":4000,"store":false,"input":[{"content":"You are a helpful assistant","role":"system"},{"content":[{"text":"What is the current population of Tokyo? Cite your source.","type":"input_text"}],"role":"user"}],"model":"gpt-4.1","tool_choice":"auto","tools":[{"type":"web_search"}]}'
 12    headers:
 13      Accept:
 14      - application/json
 15      Content-Type:
 16      - application/json
 17      User-Agent:
 18      - Charm-Fantasy/0.12.3 (https://charm.land/fantasy)
 19    url: https://api.openai.com/v1/responses
 20    method: POST
 21  response:
 22    proto: HTTP/2.0
 23    proto_major: 2
 24    proto_minor: 0
 25    content_length: -1
 26    uncompressed: true
 27    body: |-
 28      {
 29        "id": "resp_07bce1382dabd6c50169b960ccf2d481969a4addb2d83e8781",
 30        "object": "response",
 31        "created_at": 1773756620,
 32        "status": "completed",
 33        "background": false,
 34        "billing": {
 35          "payer": "developer"
 36        },
 37        "completed_at": 1773756625,
 38        "error": null,
 39        "frequency_penalty": 0.0,
 40        "incomplete_details": null,
 41        "instructions": null,
 42        "max_output_tokens": 4000,
 43        "max_tool_calls": null,
 44        "model": "gpt-4.1-2025-04-14",
 45        "output": [
 46          {
 47            "id": "ws_07bce1382dabd6c50169b960cdd08c8196820826087ad7361b",
 48            "type": "web_search_call",
 49            "status": "completed",
 50            "action": {
 51              "type": "search",
 52              "queries": [
 53                "current population of Tokyo 2024"
 54              ],
 55              "query": "current population of Tokyo 2024"
 56            }
 57          },
 58          {
 59            "id": "msg_07bce1382dabd6c50169b960cf63b881969452b2b9ab51a3a7",
 60            "type": "message",
 61            "status": "completed",
 62            "content": [
 63              {
 64                "type": "output_text",
 65                "annotations": [
 66                  {
 67                    "type": "url_citation",
 68                    "end_index": 566,
 69                    "start_index": 488,
 70                    "title": "Tokyo Third in UN Ranking of Global Megacities at 33.4 Million | Nippon.com",
 71                    "url": "https://www.nippon.com/en/japan-data/h02639/?utm_source=openai"
 72                  },
 73                  {
 74                    "type": "url_citation",
 75                    "end_index": 898,
 76                    "start_index": 807,
 77                    "title": "Demographics of Tokyo",
 78                    "url": "https://en.wikipedia.org/wiki/Demographics_of_Tokyo?utm_source=openai"
 79                  },
 80                  {
 81                    "type": "url_citation",
 82                    "end_index": 1240,
 83                    "start_index": 1152,
 84                    "title": "Greater Tokyo Area",
 85                    "url": "https://en.wikipedia.org/wiki/Greater_Tokyo_Area?utm_source=openai"
 86                  }
 87                ],
 88                "logprobs": [],
 89                "text": "Here is the most current and reliable information on Tokyo\u2019s population as of early 2026, based on authoritative sources:\n\nFirst, if you're referring to Tokyo as a broader **urban agglomeration** (commonly defined by the United Nations as the metropolitan area including Tokyo and surrounding prefectures like Saitama, Chiba, and Kanagawa), the population is approximately **33.4 million** as of 2025. This makes Tokyo the **third-largest megacity** in the world behind Jakarta and Dhaka ([nippon.com](https://www.nippon.com/en/japan-data/h02639/?utm_source=openai)).\n\nIf your interest is in the **administrative population** of **Tokyo Metropolis** (which includes the 23 special wards, as well as the western Tama area and outlying islands), the estimated population is about **14.20 million** as of 2025 ([en.wikipedia.org](https://en.wikipedia.org/wiki/Demographics_of_Tokyo?utm_source=openai)).\n\nAdditionally, if someone refers to the **Greater Tokyo Area** (which includes a wider region encompassing additional prefectures beyond Tokyo Metropolis), the United Nations estimates its total population at approximately **36.95 million** as of 2026 ([en.wikipedia.org](https://en.wikipedia.org/wiki/Greater_Tokyo_Area?utm_source=openai)).\n\nTo summarize, depending on how \"Tokyo\" is defined:\n\n\u2022 Urban agglomeration (metro area including adjacent prefectures): **\u2248\u202f33.4 million** (2025)  \n\u2022 Tokyo Metropolis (actual administrative area): **\u2248\u202f14.20 million** (2025)  \n\u2022 Greater Tokyo Area (extensive metropolitan region): **\u2248\u202f36.95 million** (2026)\n\nLet me know which specific definition you're interested in if you'd like further details."
 90              }
 91            ],
 92            "role": "assistant"
 93          }
 94        ],
 95        "parallel_tool_calls": true,
 96        "presence_penalty": 0.0,
 97        "previous_response_id": null,
 98        "prompt_cache_key": null,
 99        "prompt_cache_retention": null,
100        "reasoning": {
101          "effort": null,
102          "summary": null
103        },
104        "safety_identifier": null,
105        "service_tier": "default",
106        "store": false,
107        "temperature": 1.0,
108        "text": {
109          "format": {
110            "type": "text"
111          },
112          "verbosity": "medium"
113        },
114        "tool_choice": "auto",
115        "tools": [
116          {
117            "type": "web_search",
118            "search_context_size": "medium",
119            "user_location": {
120              "type": "approximate",
121              "city": null,
122              "country": "US",
123              "region": null,
124              "timezone": null
125            }
126          }
127        ],
128        "top_logprobs": 0,
129        "top_p": 1.0,
130        "truncation": "disabled",
131        "usage": {
132          "input_tokens": 17106,
133          "input_tokens_details": {
134            "cached_tokens": 0
135          },
136          "output_tokens": 386,
137          "output_tokens_details": {
138            "reasoning_tokens": 0
139          },
140          "total_tokens": 17492
141        },
142        "user": null,
143        "metadata": {}
144      }
145    headers:
146      Content-Type:
147      - application/json
148    status: 200 OK
149    code: 200
150    duration: 5.104430812s