メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt

Use this file to discover all available pages before exploring further.

これをいつ使用するか

  • クロード固有の思考やツール選択のコントロールを転送する必要があります
  • ゲートウェイは、生の Anthropic 固有のフィールドを直接公開しないでください。

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の例

curl https://maas.apigo.ai/v1/messages \
  -H "Authorization: Bearer $YOUR 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 の例

import requests

response = requests.post(
    "https://maas.apigo.ai/v1/messages",
    headers={
        "Authorization": "Bearer <YOUR 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 の例

const response = await fetch("https://maas.apigo.ai/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YOUR 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());

ベストプラクティス

  • サーバー側でのベータ関連の設定を考え続ける
  • プロバイダー固有のフィールドを転送する前にモデルのサポートを検証する