Skip to main content

Poe logoPoe

Access 108 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/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);
}
info

Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Poe documentation for details.

Models
Direct link to Models

ModelContextToolsReasoningImageAudioVideoInput $/1MOutput $/1M
poe/anthropic/claude-haiku-3189K$0.21$1
poe/anthropic/claude-haiku-3.5189K$0.68$3
poe/anthropic/claude-haiku-3.5-search189K$0.68$3
poe/anthropic/claude-haiku-4.5192K$0.85$4
poe/anthropic/claude-opus-3189K$13$64
poe/anthropic/claude-opus-4193K$13$64
poe/anthropic/claude-opus-4-reasoning197K$13$64
poe/anthropic/claude-opus-4-search197K$13$64
poe/anthropic/claude-opus-4.1197K$13$64
poe/anthropic/claude-opus-4.5197K$4$21
poe/anthropic/claude-sonnet-3.5189K$3$13
poe/anthropic/claude-sonnet-3.5-june189K$3$13
poe/anthropic/claude-sonnet-3.7197K$3$13
poe/anthropic/claude-sonnet-3.7-reasoning197K$3$13
poe/anthropic/claude-sonnet-3.7-search197K$3$13
poe/anthropic/claude-sonnet-4983K$3$13
poe/anthropic/claude-sonnet-4-reasoning983K$3$13
poe/anthropic/claude-sonnet-4-search983K$3$13
poe/anthropic/claude-sonnet-4.5983K$3$13
poe/elevenlabs/elevenlabs-music2K
poe/elevenlabs/elevenlabs-v2.5-turbo128K
poe/elevenlabs/elevenlabs-v3128K
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-pro1.0M$2$10
poe/google/gemini-deep-research1.0M$2$10
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-banana33K$0.21$2
poe/google/nano-banana-pro66K$2$10
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/dream-machine5K
poe/lumalabs/ray25K
poe/novita/glm-4.6
poe/novita/kimi-k2-thinking256K
poe/openai/chatgpt-4o-latest128K$5$14
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-classic8K$27$54
poe/openai/gpt-4-classic-03148K$27$54
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-mini128K$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-instant128K$2$13
poe/openai/gpt-5.2-pro400K$19$150
poe/openai/gpt-image-1128K
poe/openai/gpt-image-1-mini
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-2131K$2$10
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-code-fast-1256K$0.20$2
108 available models

Advanced Configuration
Direct link to Advanced Configuration

Custom Headers
Direct link to Custom Headers

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"
}
}
});

Dynamic Model Selection
Direct link to Dynamic Model Selection

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";
}
});

On this page