跳至主要內容

Poe 標誌Poe

透過 Mastra 的模型路由器存取 137 個 Poe 模型。系統會自動使用 POE_API_KEY 環境變數進行驗證。

詳情請參閱Poe 文件

.env
POE_API_KEY=your-api-key
src/mastra/agents/my-agent.ts
import { Agent } from '@mastra/core/agent'

const agent = new Agent({
id: 'my-agent',
name: 'My Agent',
instructions: 'You are a helpful assistant',
model: 'poe/anthropic/claude-haiku-3',
})

// Generate a response
const response = await agent.generate('Hello!')

// Stream a response
const stream = await agent.stream('Tell me a story')
for await (const chunk of stream) {
console.log(chunk)
}
資訊

Mastra 使用與 OpenAI 相容的 /chat/completions 端點。部分 Provider 專屬功能可能無法使用,詳情請參閱Poe 文件

模型
模型 的直接連結

ModelContextToolsReasoningImageAudioVideoInput $/1MOutput $/1M
poe/anthropic/claude-haiku-3189K$0.21$1
poe/anthropic/claude-haiku-3.5189K$0.68$3
poe/anthropic/claude-haiku-4.5192K$0.85$4
poe/anthropic/claude-opus-4193K$13$64
poe/anthropic/claude-opus-4.1197K$13$64
poe/anthropic/claude-opus-4.5197K$4$21
poe/anthropic/claude-opus-4.6983K$4$21
poe/anthropic/claude-opus-4.71.0M$4$21
poe/anthropic/claude-opus-4.81.0M$4$21
poe/anthropic/claude-sonnet-3.7197K$3$13
poe/anthropic/claude-sonnet-4983K$3$13
poe/anthropic/claude-sonnet-4.5983K$3$13
poe/anthropic/claude-sonnet-4.6983K$3$13
poe/cerebras/gpt-oss-120b-cs128K$0.35$0.75
poe/cerebras/llama-3.1-8b-cs128K$0.10$0.10
poe/elevenlabs/elevenlabs-music2K
poe/elevenlabs/elevenlabs-v2.5-turbo128K
poe/elevenlabs/elevenlabs-v3128K
poe/empiriolabs/deepseek-v4-flash-el1.0M$0.14$0.28
poe/empiriolabs/deepseek-v4-pro-el1.0M$2$3
poe/fireworks-ai/kimi-k2.5-fw262K
poe/google/gemini-2.0-flash990K$0.10$0.42
poe/google/gemini-2.0-flash-lite990K$0.05$0.21
poe/google/gemini-2.5-flash1.1M$0.21$2
poe/google/gemini-2.5-flash-lite1.0M$0.07$0.28
poe/google/gemini-2.5-pro1.1M$0.87$7
poe/google/gemini-3-flash1.0M$0.40$2
poe/google/gemini-3.1-flash-lite1.0M$0.25$2
poe/google/gemini-3.1-pro1.0M$2$12
poe/google/gemini-3.5-flash1.0M$2$9
poe/google/gemma-4-31b262K
poe/google/imagen-3480
poe/google/imagen-3-fast480
poe/google/imagen-4480
poe/google/imagen-4-fast480
poe/google/imagen-4-ultra480
poe/google/lyria
poe/google/nano-banana66K$0.21$2
poe/google/nano-banana-pro66K$2$12
poe/google/veo-2480
poe/google/veo-3480
poe/google/veo-3-fast480
poe/google/veo-3.1480
poe/google/veo-3.1-fast480
poe/ideogramai/ideogram150
poe/ideogramai/ideogram-v2150
poe/ideogramai/ideogram-v2a150
poe/ideogramai/ideogram-v2a-turbo150
poe/lumalabs/ray25K
poe/novita/deepseek-v3.2128K$0.27$0.40
poe/novita/glm-4.6
poe/novita/glm-4.6v131K
poe/novita/glm-4.7-flash200K
poe/novita/glm-4.7-n205K
poe/novita/glm-5205K$1$3
poe/novita/kimi-k2-thinking256K
poe/novita/kimi-k2.5128K$0.60$3
poe/novita/kimi-k2.6262K$0.96$4
poe/novita/minimax-m2.1205K
poe/openai/dall-e-3800
poe/openai/gpt-3.5-turbo16K$0.45$1
poe/openai/gpt-3.5-turbo-instruct4K$1$2
poe/openai/gpt-3.5-turbo-raw5K$0.45$1
poe/openai/gpt-4-turbo128K$9$27
poe/openai/gpt-4.11.0M$2$7
poe/openai/gpt-4.1-mini1.0M$0.36$1
poe/openai/gpt-4.1-nano1.0M$0.09$0.36
poe/openai/gpt-4o128K
poe/openai/gpt-4o-aug128K$2$9
poe/openai/gpt-4o-mini124K$0.14$0.54
poe/openai/gpt-4o-mini-search128K$0.14$0.54
poe/openai/gpt-4o-search128K$2$9
poe/openai/gpt-5400K$1$9
poe/openai/gpt-5-chat128K$1$9
poe/openai/gpt-5-codex400K$1$9
poe/openai/gpt-5-mini400K$0.22$2
poe/openai/gpt-5-nano400K$0.04$0.36
poe/openai/gpt-5-pro400K$14$110
poe/openai/gpt-5.1400K$1$9
poe/openai/gpt-5.1-codex400K$1$9
poe/openai/gpt-5.1-codex-max400K$1$9
poe/openai/gpt-5.1-codex-mini400K$0.22$2
poe/openai/gpt-5.1-instant128K$1$9
poe/openai/gpt-5.2400K$2$13
poe/openai/gpt-5.2-codex400K$2$13
poe/openai/gpt-5.2-instant128K$2$13
poe/openai/gpt-5.2-pro400K$19$150
poe/openai/gpt-5.3-codex400K$2$13
poe/openai/gpt-5.3-codex-spark128K
poe/openai/gpt-5.3-instant128K$2$13
poe/openai/gpt-5.41.1M$2$14
poe/openai/gpt-5.4-mini400K$0.68$4
poe/openai/gpt-5.4-nano400K$0.18$1
poe/openai/gpt-5.4-pro1.1M$27$160
poe/openai/gpt-5.5400K$5$27
poe/openai/gpt-5.5-pro400K$27$164
poe/openai/gpt-image-1128K
poe/openai/gpt-image-1-mini
poe/openai/gpt-image-1.5128K
poe/openai/gpt-image-2$5$32
poe/openai/o1200K$14$54
poe/openai/o1-pro200K$140$540
poe/openai/o3200K$2$7
poe/openai/o3-deep-research200K$9$36
poe/openai/o3-mini200K$0.99$4
poe/openai/o3-mini-high200K$0.99$4
poe/openai/o3-pro200K$18$72
poe/openai/o4-mini200K$0.99$4
poe/openai/o4-mini-deep-research200K$2$7
poe/openai/sora-2
poe/openai/sora-2-pro
poe/poetools/claude-code
poe/runwayml/runway256
poe/runwayml/runway-gen-4-turbo256
poe/stabilityai/stablediffusionxl200
poe/topazlabs-co/topazlabs204
poe/trytako/tako2K
poe/xai/grok-3131K$3$15
poe/xai/grok-3-mini131K$0.30$0.50
poe/xai/grok-4256K$3$15
poe/xai/grok-4-fast-non-reasoning2.0M$0.20$0.50
poe/xai/grok-4-fast-reasoning2.0M$0.20$0.50
poe/xai/grok-4.1-fast-non-reasoning2.0M
poe/xai/grok-4.1-fast-reasoning2.0M
poe/xai/grok-4.20-multi-agent128K$2$6
poe/xai/grok-code-fast-1256K$0.20$2
126 available models

進階設定
進階設定 的直接連結

自訂標頭
自訂標頭 的直接連結

src/mastra/agents/my-agent.ts
const agent = new Agent({
id: 'custom-agent',
name: 'custom-agent',
model: {
url: 'https://api.poe.com/v1',
id: 'poe/anthropic/claude-haiku-3',
apiKey: process.env.POE_API_KEY,
headers: {
'X-Custom-Header': 'value',
},
},
})

動態選擇模型
動態選擇模型 的直接連結

src/mastra/agents/my-agent.ts
const agent = new Agent({
id: 'dynamic-agent',
name: 'Dynamic Agent',
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === 'complex'
return useAdvanced ? 'poe/xai/grok-code-fast-1' : 'poe/anthropic/claude-haiku-3'
},
})