Poe
Access 100 Poe models through Mastra's model router. Authentication is handled automatically using the POE_API_KEY environment variable.
Learn more in the Poe documentation.
POE_API_KEY=your-api-key
import { Agent } from "@mastra/core";
const agent = new 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);
}
info
Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Poe documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
poe/anthropic/claude-haiku-3 | 189K | $0.21 | $1 | |||||
poe/anthropic/claude-haiku-3.5 | 189K | $0.68 | $3 | |||||
poe/anthropic/claude-haiku-3.5-search | 189K | $0.68 | $3 | |||||
poe/anthropic/claude-haiku-4.5 | 192K | $0.85 | $4 | |||||
poe/anthropic/claude-opus-3 | 189K | $13 | $64 | |||||
poe/anthropic/claude-opus-4 | 193K | $13 | $64 | |||||
poe/anthropic/claude-opus-4-reasoning | 197K | $13 | $64 | |||||
poe/anthropic/claude-opus-4-search | 197K | $13 | $64 | |||||
poe/anthropic/claude-opus-4.1 | 197K | $13 | $64 | |||||
poe/anthropic/claude-sonnet-3.5 | 189K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-3.5-june | 189K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-3.7 | 197K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-3.7-reasoning | 197K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-3.7-search | 197K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-4 | 983K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-4-reasoning | 983K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-4-search | 983K | $3 | $13 | |||||
poe/anthropic/claude-sonnet-4.5 | 983K | $3 | $13 | |||||
poe/elevenlabs/elevenlabs-music | 2K | — | — | |||||
poe/elevenlabs/elevenlabs-v2.5-turbo | 128K | — | — | |||||
poe/elevenlabs/elevenlabs-v3 | 128K | — | — | |||||
poe/facebook/llama-3.1-405b | 8K | $3 | $3 | |||||
poe/facebook/llama-3.1-70b | 8K | $0.90 | $0.90 | |||||
poe/facebook/llama-3.1-8b | 8K | $0.20 | $0.20 | |||||
poe/google/gemini-2.0-flash | 990K | $0.10 | $0.42 | |||||
poe/google/gemini-2.0-flash-lite | 990K | $0.05 | $0.21 | |||||
poe/google/gemini-2.5-flash | 1.1M | $0.21 | $2 | |||||
poe/google/gemini-2.5-flash-lite | 1.0M | $0.07 | $0.28 | |||||
poe/google/gemini-2.5-pro | 1.1M | $0.87 | $7 | |||||
poe/google/gemini-3.0-pro | 1.0M | $2 | $10 | |||||
poe/google/imagen-3 | 480 | — | — | |||||
poe/google/imagen-3-fast | 480 | — | — | |||||
poe/google/imagen-4 | 480 | — | — | |||||
poe/google/imagen-4-fast | 480 | — | — | |||||
poe/google/imagen-4-ultra | 480 | — | — | |||||
poe/google/lyria | — | — | — | |||||
poe/google/nano-banana | 33K | $0.21 | $2 | |||||
poe/google/veo-2 | 480 | — | — | |||||
poe/google/veo-3 | 480 | — | — | |||||
poe/google/veo-3-fast | 480 | — | — | |||||
poe/google/veo-3.1 | 480 | — | — | |||||
poe/google/veo-3.1-fast | 480 | — | — | |||||
poe/ideogramai/ideogram | 150 | — | — | |||||
poe/ideogramai/ideogram-v2 | 150 | — | — | |||||
poe/ideogramai/ideogram-v2a | 150 | — | — | |||||
poe/ideogramai/ideogram-v2a-turbo | 150 | — | — | |||||
poe/lumalabs/dream-machine | 5K | — | — | |||||
poe/lumalabs/ray2 | 5K | — | — | |||||
poe/novita/glm-4.6 | — | — | — | |||||
poe/openAi/chatgpt-4o-latest | 128K | $5 | $13 | |||||
poe/openAi/dall-e-3 | 800 | — | — | |||||
poe/openAi/gpt-3.5-turbo | 16K | $0.45 | $1 | |||||
poe/openAi/gpt-3.5-turbo-instruct | 4K | $1 | $2 | |||||
poe/openAi/gpt-3.5-turbo-raw | 5K | $0.45 | $1 | |||||
poe/openAi/gpt-4-classic | 8K | $27 | $54 | |||||
poe/openAi/gpt-4-classic-0314 | 8K | $27 | $54 | |||||
poe/openAi/gpt-4-turbo | 128K | $9 | $27 | |||||
poe/openAi/gpt-4.1 | 1.0M | $2 | $7 | |||||
poe/openAi/gpt-4.1-mini | 1.0M | $0.36 | $1 | |||||
poe/openAi/gpt-4.1-nano | 1.0M | $0.09 | $0.36 | |||||
poe/openAi/gpt-4o | 128K | — | — | |||||
poe/openAi/gpt-4o-aug | 128K | $2 | $9 | |||||
poe/openAi/gpt-4o-mini | 128K | $0.14 | $0.54 | |||||
poe/openAi/gpt-4o-mini-search | 128K | $0.14 | $0.54 | |||||
poe/openAi/gpt-4o-search | 128K | $2 | $9 | |||||
poe/openAi/gpt-5 | 400K | $1 | $9 | |||||
poe/openAi/gpt-5-chat | 128K | $1 | $9 | |||||
poe/openAi/gpt-5-codex | 400K | $1 | $9 | |||||
poe/openAi/gpt-5-mini | 400K | $0.22 | $2 | |||||
poe/openAi/gpt-5-nano | 400K | $0.04 | $0.36 | |||||
poe/openAi/gpt-5-pro | 400K | $13 | $110 | |||||
poe/openai/gpt-5.1 | 400K | $1 | $9 | |||||
poe/openai/gpt-5.1-codex | 400K | $1 | $9 | |||||
poe/openai/gpt-5.1-codex-mini | 400K | $0.22 | $2 | |||||
poe/openai/gpt-5.1-instant | 128K | $1 | $9 | |||||
poe/openAi/gpt-image-1 | 128K | — | — | |||||
poe/openAi/gpt-image-1-mini | — | — | — | |||||
poe/openAi/o1 | 200K | $13 | $54 | |||||
poe/openAi/o1-pro | 200K | $140 | $540 | |||||
poe/openAi/o3 | 200K | $2 | $7 | |||||
poe/openAi/o3-deep-research | 200K | $9 | $36 | |||||
poe/openAi/o3-mini | 200K | $0.99 | $4 | |||||
poe/openAi/o3-mini-high | 200K | $0.99 | $4 | |||||
poe/openAi/o3-pro | 200K | $18 | $72 | |||||
poe/openAi/o4-mini | 200K | $0.99 | $4 | |||||
poe/openAi/o4-mini-deep-research | 200K | $2 | $7 | |||||
poe/openAi/sora-2 | — | — | — | |||||
poe/openAi/sora-2-pro | — | — | — | |||||
poe/runwayml/runway | 256 | — | — | |||||
poe/runwayml/runway-gen-4-turbo | 256 | — | — | |||||
poe/stabilityai/stablediffusionxl | 200 | — | — | |||||
poe/topazlabs-co/topazlabs | 204 | — | — | |||||
poe/trytako/tako | 2K | — | — | |||||
poe/xai/grok-2 | 131K | $2 | $10 | |||||
poe/xai/grok-3 | 131K | $3 | $15 | |||||
poe/xai/grok-3-mini | 131K | $0.30 | $0.50 | |||||
poe/xai/grok-4 | 256K | $3 | $15 | |||||
poe/xai/grok-4-fast-non-reasoning | 256K | $0.20 | $0.50 | |||||
poe/xai/grok-4-fast-reasoning | 256K | $0.20 | $0.50 | |||||
poe/xai/grok-code-fast-1 | 256K | $0.20 | $2 |
Advanced ConfigurationDirect link to Advanced Configuration
Custom HeadersDirect link to Custom Headers
const agent = new 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"
}
}
});
Dynamic Model SelectionDirect link to Dynamic Model Selection
const agent = new Agent({
name: "dynamic-agent",
model: ({ runtimeContext }) => {
const useAdvanced = runtimeContext.task === "complex";
return useAdvanced
? "poe/xai/grok-code-fast-1"
: "poe/anthropic/claude-haiku-3";
}
});