# ![Poe logo](https://models.dev/logos/poe.svg)Poe

Access 125 Poe models through Mastra's model router. Authentication is handled automatically using the `POE_API_KEY` environment variable.

Learn more in the [Poe documentation](https://creator.poe.com/docs/external-applications/openai-compatible-api).

```bash
POE_API_KEY=your-api-key
```

```typescript
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](https://creator.poe.com/docs/external-applications/openai-compatible-api) for details.

## 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-4.5`       | 192K    |       |           |       |       |       | $0.85      | $4          |
| `poe/anthropic/claude-opus-4`          | 193K    |       |           |       |       |       | $13        | $64         |
| `poe/anthropic/claude-opus-4.1`        | 197K    |       |           |       |       |       | $13        | $64         |
| `poe/anthropic/claude-opus-4.5`        | 197K    |       |           |       |       |       | $4         | $21         |
| `poe/anthropic/claude-opus-4.6`        | 983K    |       |           |       |       |       | $4         | $21         |
| `poe/anthropic/claude-opus-4.7`        | 1.0M    |       |           |       |       |       | $4         | $21         |
| `poe/anthropic/claude-sonnet-3.7`      | 197K    |       |           |       |       |       | $3         | $13         |
| `poe/anthropic/claude-sonnet-4`        | 983K    |       |           |       |       |       | $3         | $13         |
| `poe/anthropic/claude-sonnet-4.5`      | 983K    |       |           |       |       |       | $3         | $13         |
| `poe/anthropic/claude-sonnet-4.6`      | 983K    |       |           |       |       |       | $3         | $13         |
| `poe/cerebras/gpt-oss-120b-cs`         | 128K    |       |           |       |       |       | $0.35      | $0.75       |
| `poe/cerebras/llama-3.1-8b-cs`         | 128K    |       |           |       |       |       | $0.10      | $0.10       |
| `poe/elevenlabs/elevenlabs-music`      | 2K      |       |           |       |       |       | —          | —           |
| `poe/elevenlabs/elevenlabs-v2.5-turbo` | 128K    |       |           |       |       |       | —          | —           |
| `poe/elevenlabs/elevenlabs-v3`         | 128K    |       |           |       |       |       | —          | —           |
| `poe/empiriolabs/deepseek-v4-flash-el` | 1.0M    |       |           |       |       |       | $0.14      | $0.28       |
| `poe/empiriolabs/deepseek-v4-pro-el`   | 1.0M    |       |           |       |       |       | $2         | $3          |
| `poe/fireworks-ai/kimi-k2.5-fw`        | 262K    |       |           |       |       |       | —          | —           |
| `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-flash`            | 1.0M    |       |           |       |       |       | $0.40      | $2          |
| `poe/google/gemini-3.1-flash-lite`     | 1.0M    |       |           |       |       |       | $0.25      | $2          |
| `poe/google/gemini-3.1-pro`            | 1.0M    |       |           |       |       |       | $2         | $12         |
| `poe/google/gemini-3.5-flash`          | 1.0M    |       |           |       |       |       | $2         | $9          |
| `poe/google/gemma-4-31b`               | 262K    |       |           |       |       |       | —          | —           |
| `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`               | 66K     |       |           |       |       |       | $0.21      | $2          |
| `poe/google/nano-banana-pro`           | 66K     |       |           |       |       |       | $2         | $12         |
| `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/ray2`                    | 5K      |       |           |       |       |       | —          | —           |
| `poe/novita/deepseek-v3.2`             | 128K    |       |           |       |       |       | $0.27      | $0.40       |
| `poe/novita/glm-4.6`                   | —       |       |           |       |       |       | —          | —           |
| `poe/novita/glm-4.6v`                  | 131K    |       |           |       |       |       | —          | —           |
| `poe/novita/glm-4.7-flash`             | 200K    |       |           |       |       |       | —          | —           |
| `poe/novita/glm-4.7-n`                 | 205K    |       |           |       |       |       | —          | —           |
| `poe/novita/glm-5`                     | 205K    |       |           |       |       |       | $1         | $3          |
| `poe/novita/kimi-k2-thinking`          | 256K    |       |           |       |       |       | —          | —           |
| `poe/novita/kimi-k2.5`                 | 128K    |       |           |       |       |       | $0.60      | $3          |
| `poe/novita/kimi-k2.6`                 | 262K    |       |           |       |       |       | $0.96      | $4          |
| `poe/novita/minimax-m2.1`              | 205K    |       |           |       |       |       | —          | —           |
| `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-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`               | 124K    |       |           |       |       |       | $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    |       |           |       |       |       | $14        | $110        |
| `poe/openai/gpt-5.1`                   | 400K    |       |           |       |       |       | $1         | $9          |
| `poe/openai/gpt-5.1-codex`             | 400K    |       |           |       |       |       | $1         | $9          |
| `poe/openai/gpt-5.1-codex-max`         | 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-5.2`                   | 400K    |       |           |       |       |       | $2         | $13         |
| `poe/openai/gpt-5.2-codex`             | 400K    |       |           |       |       |       | $2         | $13         |
| `poe/openai/gpt-5.2-instant`           | 128K    |       |           |       |       |       | $2         | $13         |
| `poe/openai/gpt-5.2-pro`               | 400K    |       |           |       |       |       | $19        | $150        |
| `poe/openai/gpt-5.3-codex`             | 400K    |       |           |       |       |       | $2         | $13         |
| `poe/openai/gpt-5.3-codex-spark`       | 128K    |       |           |       |       |       | —          | —           |
| `poe/openai/gpt-5.3-instant`           | 128K    |       |           |       |       |       | $2         | $13         |
| `poe/openai/gpt-5.4`                   | 1.1M    |       |           |       |       |       | $2         | $14         |
| `poe/openai/gpt-5.4-mini`              | 400K    |       |           |       |       |       | $0.68      | $4          |
| `poe/openai/gpt-5.4-nano`              | 400K    |       |           |       |       |       | $0.18      | $1          |
| `poe/openai/gpt-5.4-pro`               | 1.1M    |       |           |       |       |       | $27        | $160        |
| `poe/openai/gpt-5.5`                   | 400K    |       |           |       |       |       | $5         | $27         |
| `poe/openai/gpt-5.5-pro`               | 400K    |       |           |       |       |       | $27        | $164        |
| `poe/openai/gpt-image-1`               | 128K    |       |           |       |       |       | —          | —           |
| `poe/openai/gpt-image-1-mini`          | —       |       |           |       |       |       | —          | —           |
| `poe/openai/gpt-image-1.5`             | 128K    |       |           |       |       |       | —          | —           |
| `poe/openai/gpt-image-2`               | —       |       |           |       |       |       | $5         | $32         |
| `poe/openai/o1`                        | 200K    |       |           |       |       |       | $14        | $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/poetools/claude-code`             | —       |       |           |       |       |       | —          | —           |
| `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-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`    | 2.0M    |       |           |       |       |       | $0.20      | $0.50       |
| `poe/xai/grok-4-fast-reasoning`        | 2.0M    |       |           |       |       |       | $0.20      | $0.50       |
| `poe/xai/grok-4.1-fast-non-reasoning`  | 2.0M    |       |           |       |       |       | —          | —           |
| `poe/xai/grok-4.1-fast-reasoning`      | 2.0M    |       |           |       |       |       | —          | —           |
| `poe/xai/grok-4.20-multi-agent`        | 128K    |       |           |       |       |       | $2         | $6          |
| `poe/xai/grok-code-fast-1`             | 256K    |       |           |       |       |       | $0.20      | $2          |

## Advanced configuration

### Custom headers

```typescript
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

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