# Ternary Bonsai 2 27B

> Bonsai 2 27B is PrismML's 27B reasoning model derived from Qwen3.8-27B and compressed to ternary weights. It supports coding, math, tool calling, and image input with a 262K-token context window.

**ID**: `prism-ml/ternary-bonsai-2-27b`  
**Creator**: prism-ml  
**Category**: multimodal  
**Context**: 262K tokens  
**Pricing**: $0.07 / $0.50 per 1M · billed by your provider (BYOK)  
**Released**: 2026-09-18  
**Web page**: https://anyrouter.dev/model/prism-ml/ternary-bonsai-2-27b

**Input modalities**: text, image  
**Output modalities**: text  

**Capabilities**: chat, reasoning, streaming, function-calling, vision

**Supported parameters**: frequency_penalty, include_reasoning, logprobs, max_tokens, presence_penalty, reasoning, reasoning_effort, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_k, top_logprobs, top_p

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/chat/completions`

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "prism-ml/ternary-bonsai-2-27b",
  "messages": [
    {
      "role": "user",
      "content": "Say hi in 3 words."
    }
  ]
}'
```

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| openrouter-byok | $0.07/M (list) | $0.50/M (list) |

BYOK routes are billed by your own provider key — AnyRouter charges $0. Rates marked (list) are the provider's published list price.

## Source

- Upstream docs: https://huggingface.co/prism-ml/Ternary-Bonsai-2-27B-gguf
