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

# Amazon Ergo 1.0

> 在 MixRoute 呼叫 Amazon Ergo 1.0，並讀取目前回傳的 OpenAI 格式正文。

Amazon Ergo 1.0 是面向程式設計與長程代理任務的開放權重推理模型，輸入和輸出皆為文字。AWS 公布的上下文視窗為 1M Token，最大輸出為 128K Token。

Console 登記了 `POST /v1/messages` 和 `POST /v1/chat/completions`。實測 `/v1/messages` 回傳正文，但回應是 OpenAI 的 `chat.completion`，而非 Anthropic Messages 格式。`/v1/chat/completions` 回傳 HTTP 200，但正文為空。

請依下方範例直接發送 HTTP 請求，並從 `choices[0].message.content` 讀取正文。不要用 Anthropic SDK 的回應解析器處理這條路由。

## 請求範例

執行範例前，請設定 `MIXROUTE_API_KEY`。

```bash theme={null}
curl https://api.mixroute.ai/v1/messages \
  -H "x-api-key: $MIXROUTE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ergo-1.0",
    "messages": [{"role": "user", "content": "只回覆 MODEL_OK。"}],
    "max_tokens": 1024,
    "stream": false
  }'
```

範例僅驗證非串流文字。Console 端點目錄另列登記的端點，不代表上述實測行為。

## 參考資料

* [Console 模型端點目錄](https://mixroute.ai/docs/zh-Hant/api-reference/model-endpoints.md)
* [Amazon Bedrock 型號頁](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.