> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses Function Calling

> Responses tool calling verified against Crazyrouter production on 2026-03-23

> Last updated: 2026-06-06

# Responses Function Calling

```
POST /v1/responses
```

As of March 23, 2026, Crazyrouter production has verified that `gpt-5.5` on the Responses API reliably returns `function_call`.

<Note>
  Claude does not currently support `POST /v1/responses`. If you need Claude tool calling, use `POST /v1/messages` or `POST /v1/chat/completions`.
</Note>

***

## Step 1: Let the Model Produce a Function Call

```bash theme={null}
curl https://api.crazyrouter.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-5.5",
    "input": "What is the weather in Beijing? Use the tool.",
    "tools": [
      {
        "type": "function",
        "name": "get_weather",
        "description": "Get weather info for a city",
        "parameters": {
          "type": "object",
          "properties": {
            "city": {"type": "string"}
          },
          "required": ["city"],
          "additionalProperties": false
        }
      }
    ]
  }'
```

Observed production response shape:

```json theme={null}
{
  "output": [
    {
      "type": "function_call",
      "name": "get_weather",
      "arguments": "{\"city\":\"Beijing\"}"
    }
  ]
}
```

***

## Step 2: Return the Tool Result

Once you receive the `function_call`, send your actual tool result back as `function_call_output`:

```json theme={null}
{
  "model": "gpt-5.5",
  "input": [
    {
      "type": "function_call",
      "call_id": "call_123",
      "name": "get_weather",
      "arguments": "{\"city\":\"Beijing\"}"
    },
    {
      "type": "function_call_output",
      "call_id": "call_123",
      "output": "{\"temperature\":22,\"condition\":\"sunny\"}"
    }
  ],
  "tools": [
    {
      "type": "function",
      "name": "get_weather",
      "description": "Get weather info for a city",
      "parameters": {
        "type": "object",
        "properties": {
          "city": {"type": "string"}
        },
        "required": ["city"],
        "additionalProperties": false
      }
    }
  ]
}
```

<Note>
  This page keeps only the `function_call` path that was reproduced in production. For more complex multi-tool chains or streamed argument deltas, revalidate on the same day before depending on them.
</Note>
