---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 853
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"grok-4-fast","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"stream":true}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
    url: https://api.x.ai/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    body: |+
      data: {"id":"028e638f-d1c1-678c-a2c8-81b3f8a84090","object":"chat.completion.chunk","created":1773345560,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"role":"assistant","tool_calls":[{"id":"call_55070233","function":{"name":"add","arguments":"{\"a\":2,\"b\":3}"},"index":0,"type":"function"}]}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"028e638f-d1c1-678c-a2c8-81b3f8a84090","object":"chat.completion.chunk","created":1773345560,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"tool_calls":[{"id":"call_12016531","function":{"name":"multiply","arguments":"{\"a\":2,\"b\":3}"},"index":1,"type":"function"}]}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"028e638f-d1c1-678c-a2c8-81b3f8a84090","object":"chat.completion.chunk","created":1773345560,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"028e638f-d1c1-678c-a2c8-81b3f8a84090","object":"chat.completion.chunk","created":1773345560,"model":"grok-4-fast-reasoning","choices":[],"usage":{"prompt_tokens":432,"completion_tokens":68,"total_tokens":636,"prompt_tokens_details":{"text_tokens":432,"audio_tokens":0,"image_tokens":0,"cached_tokens":153},"completion_tokens_details":{"reasoning_tokens":136,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"num_sources_used":0,"cost_in_usd_ticks":1654500},"system_fingerprint":"fp_3d7ed3b779"}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 687.329417ms
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 1214
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"},{"tool_calls":[{"id":"call_55070233","function":{"arguments":"{\"a\":2,\"b\":3}","name":"add"},"type":"function"},{"id":"call_12016531","function":{"arguments":"{\"a\":2,\"b\":3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_55070233","role":"tool"},{"content":"6","tool_call_id":"call_12016531","role":"tool"}],"model":"grok-4-fast","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"stream":true}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
    url: https://api.x.ai/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    body: |+
      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"The","role":"assistant"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" sum"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" of"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"2"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" and"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"3"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" is"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"5"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"."}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"  \n"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"The"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" product"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" of"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"2"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" and"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"3"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" is"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":" "}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"6"}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{"content":"."}}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"system_fingerprint":"fp_3d7ed3b779"}

      data: {"id":"fd43b2e6-5868-9d79-e814-e0d66a46a317","object":"chat.completion.chunk","created":1773345561,"model":"grok-4-fast-reasoning","choices":[],"usage":{"prompt_tokens":654,"completion_tokens":25,"total_tokens":731,"prompt_tokens_details":{"text_tokens":654,"audio_tokens":0,"image_tokens":0,"cached_tokens":602},"completion_tokens_details":{"reasoning_tokens":52,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"num_sources_used":0,"cost_in_usd_ticks":790000},"system_fingerprint":"fp_3d7ed3b779"}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 620.315167ms
