> Discover all available pages from the documentation index: https://mastra.ai/llms.txt

# ![GreenPT logo](https://models.dev/logos/greenpt.svg)GreenPT

Access 37 GreenPT models through Mastra's model router. Authentication is handled automatically using the `GREENPT_API_KEY` environment variable.

Learn more in the [GreenPT documentation](https://docs.greenpt.ai).

```bash
GREENPT_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: "greenpt/deepseek-v4-flash-0731"
});

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

> **Note:** Mastra uses the OpenAI-compatible `/chat/completions` endpoint. Some provider-specific features may not be available. Check the [GreenPT documentation](https://docs.greenpt.ai) for details.

## Models

| Model                                         | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
| --------------------------------------------- | ------- | ----- | --------- | ----- | ----- | ----- | ---------- | ----------- |
| `greenpt/deepseek-v4-flash-0731`              | 1.0M    |       |           |       |       |       | $0.16      | $0.40       |
| `greenpt/devstral-2-123b-instruct-2512`       | 200K    |       |           |       |       |       | $0.57      | $3          |
| `greenpt/gemma-3-27b-it`                      | 40K     |       |           |       |       |       | $0.34      | $0.68       |
| `greenpt/gemma4`                              | 262K    |       |           |       |       |       | $0.57      | $2          |
| `greenpt/glm-5.2`                             | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-caveman`                     | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-caveman-lite`                | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-caveman-ultra`               | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-honey`                       | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-honey-lite`                  | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-honey-ultra`                 | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-ponytail`                    | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-ponytail-lite`               | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/glm-5.2-ponytail-ultra`              | 1.0M    |       |           |       |       |       | $1         | $5          |
| `greenpt/gpt-oss-120b`                        | 131K    |       |           |       |       |       | $0.23      | $0.80       |
| `greenpt/green-l`                             | 128K    |       |           |       |       |       | $0.28      | $0.91       |
| `greenpt/green-l-raw`                         | 128K    |       |           |       |       |       | $0.28      | $0.91       |
| `greenpt/green-r`                             | 131K    |       |           |       |       |       | $0.40      | $1          |
| `greenpt/green-r-raw`                         | 131K    |       |           |       |       |       | $0.40      | $1          |
| `greenpt/green-s`                             | —       |       |           |       |       |       | $0.00      | —           |
| `greenpt/green-s-pro`                         | —       |       |           |       |       |       | $0.00      | —           |
| `greenpt/holo2-30b-a3b`                       | 22K     |       |           |       |       |       | $0.40      | $0.97       |
| `greenpt/kimi-k2.6`                           | 262K    |       |           |       |       |       | $0.75      | $4          |
| `greenpt/kimi-k2.7-code`                      | 262K    |       |           |       |       |       | $0.90      | $4          |
| `greenpt/kimi-k3`                             | 1.0M    |       |           |       |       |       | $4         | $19         |
| `greenpt/llama-3.3-70b-instruct`              | 100K    |       |           |       |       |       | $1         | $1          |
| `greenpt/minimax-m2.5`                        | 205K    |       |           |       |       |       | $0.19      | $1          |
| `greenpt/mistral-medium-3.5-128b`             | 262K    |       |           |       |       |       | $2         | $10         |
| `greenpt/mistral-small-3.2-24b-instruct-2506` | 128K    |       |           |       |       |       | $0.23      | $0.46       |
| `greenpt/pixtral-12b-2409`                    | 128K    |       |           |       |       |       | $0.28      | $0.28       |
| `greenpt/qwen3-235b-a22b-instruct-2507`       | 262K    |       |           |       |       |       | $1         | $3          |
| `greenpt/qwen3-coder-30b-a3b-instruct`        | 128K    |       |           |       |       |       | $0.28      | $1          |
| `greenpt/qwen3.5-397b-a17b`                   | 262K    |       |           |       |       |       | $0.80      | $5          |
| `greenpt/qwen3.6-35b-a3b`                     | 262K    |       |           |       |       |       | $0.34      | $2          |
| `greenpt/voxtral-small-24b-2507`              | 33K     |       |           |       |       |       | $0.23      | $0.51       |

## Advanced configuration

### Custom headers

```typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.greenpt.ai/v1",
    id: "greenpt/deepseek-v4-flash-0731",
    apiKey: process.env.GREENPT_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
      ? "greenpt/voxtral-small-24b-2507"
      : "greenpt/deepseek-v4-flash-0731";
  }
});
```