比較 Anthropic API 與 AWS Bedrock 的費用
· 4 分鐘閱讀
Claude 若要透過 API 使用,除了直接使用 Anthropic API 外,也能經由 AWS Bedrock、Google Vertex AI、Microsoft Azure (Azure AI Foundry) 使用。基本價格各路徑幾乎相同,但在批次處理與與雲端生態系統整合面會有差異。
Claude 若要透過 API 使用,除了直接使用 Anthropic API 外,也能經由 AWS Bedrock、Google Vertex AI、Microsoft Azure (Azure AI Foundry) 使用。基本價格各路徑幾乎相同,但在批次處理與與雲端生態系統整合面會有差異。
將「技能」加入 AI 代理人,就像在應用程式安裝功能擴充一樣,可以增加它能做的事情。本文解說 Agent Skills 的運作方式,以及代理人在內部如何處理任務。
GPT-5 已經公開了,所以我用 PowerShell 試著呼叫它的 API。
$uri = "https://api.openai.com/v1/chat/completions"
$headers = @{
"Authorization" = "Bearer $env:OPENAI_API_KEY"
"Content-Type" = "application/json"
}
$body = @{
model = "gpt-5"
messages = @(
@{
role = "user"
content = "筆記本和鉛筆合計是100元。鉛筆比筆記本便宜40元。鉛筆多少錢?"
}
)
} | ConvertTo-Json -Depth 2
$response = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -Body $body
foreach($choice in $response.choices){
$choice.message.content
}
30元
理由:
- 設筆記本為 x 元、鉛筆為 y 元,則
- x + y = 100
- y = x - 40
- 代入得 2x - 40 = 100 → x = 70 → y = 30
- 驗算: 70 + 30 = 100,且鉛筆比筆記本便宜 40 元。