Skip to main content

When to use this

  • You need to forward Claude-specific thinking or tool-choice controls
  • Your gateway should not expose raw Anthropic-specific fields directly

Example

{
  "model": "claude-sonnet-4-20250514",
  "messages": [
    { "role": "user", "content": "Summarize this report." }
  ],
  "model_extra": {
    "thinking": { "type": "enabled", "budget_tokens": 1024 },
    "tool_choice": { "type": "auto" }
  }
}

cURL example

curl https://mass.apigo.ai/v1/messages \
  -H "Authorization: Bearer $TIDEMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "messages": [
      { "role": "user", "content": "Summarize this report." }
    ],
    "model_extra": {
      "thinking": { "type": "enabled", "budget_tokens": 1024 },
      "tool_choice": { "type": "auto" }
    }
  }'

Python example

import requests

response = requests.post(
    "https://mass.apigo.ai/v1/messages",
    headers={
        "Authorization": "Bearer <TIDEMIND_API_KEY>",
        "Content-Type": "application/json",
    },
    json={
        "model": "claude-sonnet-4-20250514",
        "messages": [
            {"role": "user", "content": "Summarize this report."}
        ],
        "model_extra": {
            "thinking": {"type": "enabled", "budget_tokens": 1024},
            "tool_choice": {"type": "auto"},
        },
    },
)

print(response.json())

Node.js example

const response = await fetch("https://mass.apigo.ai/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIDEMIND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "claude-sonnet-4-20250514",
    messages: [
      { role: "user", content: "Summarize this report." }
    ],
    model_extra: {
      thinking: { type: "enabled", budget_tokens: 1024 },
      tool_choice: { type: "auto" }
    }
  }),
});

console.log(await response.json());

Best practices

  • Keep thinking- and beta-related settings server-side
  • Validate model support before forwarding provider-specific fields