simple_object.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: 608
10    host: ""
11    body: '{"messages":[{"content":"Generate information about a person named Alice who is 30 years old and lives in Paris.","role":"user"}],"model":"o4-mini","max_completion_tokens":4000,"response_format":{"json_schema":{"name":"Person","strict":true,"description":"A person with name, age, and city","schema":{"additionalProperties":false,"properties":{"age":{"description":"The person''s age","type":"integer"},"city":{"description":"The city where the person lives","type":"string"},"name":{"description":"The person''s name","type":"string"}},"required":["name","age","city"],"type":"object"}},"type":"json_schema"}}'
12    headers:
13      Accept:
14      - application/json
15      Content-Type:
16      - application/json
17      User-Agent:
18      - OpenAI/Go 2.7.1
19    url: https://api.openai.com/v1/chat/completions
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": "chatcmpl-CZkhy2Semw4FSy9i59cUlONdYx0mh",
30        "object": "chat.completion",
31        "created": 1762637062,
32        "model": "o4-mini-2025-04-16",
33        "choices": [
34          {
35            "index": 0,
36            "message": {
37              "role": "assistant",
38              "content": "{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}",
39              "refusal": null,
40              "annotations": []
41            },
42            "finish_reason": "stop"
43          }
44        ],
45        "usage": {
46          "prompt_tokens": 95,
47          "completion_tokens": 162,
48          "total_tokens": 257,
49          "prompt_tokens_details": {
50            "cached_tokens": 0,
51            "audio_tokens": 0
52          },
53          "completion_tokens_details": {
54            "reasoning_tokens": 128,
55            "audio_tokens": 0,
56            "accepted_prediction_tokens": 0,
57            "rejected_prediction_tokens": 0
58          }
59        },
60        "service_tier": "default",
61        "system_fingerprint": null
62      }
63    headers:
64      Content-Type:
65      - application/json
66    status: 200 OK
67    code: 200
68    duration: 3.135977959s