when:
  path: /v1/responses
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"input":[{"content":"You are a helpful assistant. When asked about weather, use the weather tool to get the current conditions. After calling the tool, respond with ONLY minified JSON matching this schema: {\"city\": string, \"weather\": string}. DO NOT wrap the JSON in markdown or add explanatory text. DO NOT modify the weather description from the tool result.","role":"system","type":"message"},{"content":"Hello, whats the weather in London?","role":"user","type":"message"}],"model":"grok-4-0709","tools":[{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"type":"function"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"background":false,"completed_at":0,"created_at":0,"error":null,"frequency_penalty":0.0,"id":"resp_REDACTED_1","incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"metadata":{"system_fingerprint":"fp_REDACTED_1"},"model":"grok-4.3","object":"response","output":[{"id":"rs_REDACTED_1","status":"completed","summary":[{"text":"The user asked: \"Hello, whats the weather in London?\"\n","type":"summary_text"}],"type":"reasoning"},{"arguments":"{\"city\":\"London\"}","call_id":"call_REDACTED_1","id":"fc_REDACTED_1","name":"weather","status":"completed","type":"function_call"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"low","summary":"detailed"},"safety_identifier":null,"service_tier":"default","status":"completed","store":true,"temperature":0.7,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":0.95,"truncation":"disabled","usage":{"context_details":{"input_tokens":302,"output_tokens":399},"cost_in_usd_ticks":12406000,"input_tokens":302,"input_tokens_details":{"cached_tokens":128},"num_server_side_tools_used":0,"num_sources_used":0,"output_tokens":399,"output_tokens_details":{"reasoning_tokens":389},"total_tokens":701},"user":null}'
---
when:
  path: /v1/responses
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"input":[{"content":"You are a helpful assistant. When asked about weather, use the weather tool to get the current conditions. After calling the tool, respond with ONLY minified JSON matching this schema: {\"city\": string, \"weather\": string}. DO NOT wrap the JSON in markdown or add explanatory text. DO NOT modify the weather description from the tool result.","role":"system","type":"message"},{"content":"Hello, whats the weather in London?","role":"user","type":"message"},{"id":"rs_REDACTED_1","summary":[{"text":"The user asked: \"Hello, whats the weather in London?\"\n","type":"summary_text"}],"type":"reasoning"},{"arguments":"{\"city\":\"London\"}","call_id":"call_REDACTED_1","name":"weather","type":"function_call"},{"call_id":"call_REDACTED_1","output":"The weather in London is all fire and brimstone","type":"function_call_output"}],"model":"grok-4-0709","tools":[{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"type":"function"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"background":false,"completed_at":0,"created_at":0,"error":null,"frequency_penalty":0.0,"id":"resp_REDACTED_2","incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"metadata":{"system_fingerprint":"fp_REDACTED_1"},"model":"grok-4.3","object":"response","output":[{"id":"rs_REDACTED_2","status":"completed","summary":[{"text":"The tool result is: \"The weather in London is all fire and brimstone\"\n","type":"summary_text"}],"type":"reasoning"},{"content":[{"annotations":[],"logprobs":[],"text":"{\"city\":\"London\",\"weather\":\"all fire and brimstone\"}","type":"output_text"}],"id":"msg_REDACTED_1","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"low","summary":"detailed"},"safety_identifier":null,"service_tier":"default","status":"completed","store":true,"temperature":0.7,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"strict":false,"type":"function"}],"top_logprobs":0,"top_p":0.95,"truncation":"disabled","usage":{"context_details":{"input_tokens":718,"output_tokens":126},"cost_in_usd_ticks":10781000,"input_tokens":718,"input_tokens_details":{"cached_tokens":128},"num_server_side_tools_used":0,"num_sources_used":0,"output_tokens":126,"output_tokens_details":{"reasoning_tokens":113},"total_tokens":844},"user":null}'
