> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kymaapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT-5.6 Terra

> GPT-5.6 Terra is OpenAI’s balanced tier, positioned between the high-capability Sol and the budget-focused Luna. It targets developers who need reliable reasoning, tool use, and vision support for everyday coding and agentic workflows without flagship pricing.

## Overview

This frontier-class model accepts text and image inputs and returns text. It supports tool calling, extended reasoning, structured outputs, and prompt caching. With a 1,050,000-token context window and an 8,192-token maximum output, it handles long documents and multi-step tasks.

On Kyma, the model runs through an OpenAI-compatible endpoint using a single API key. Requests benefit from automatic failover, and the response headers include the exact model that executed the prompt via X-Kyma-Model. Usage costs are returned in the usage.cost field, and repeated prompt prefixes are billed at this model's cached input rate when caching is active.

The model operates at a medium speed tier and a premium cost tier. It does not support audio or video inputs, and the maximum output length is capped at 8,192 tokens, which restricts very long-form generation tasks.

## Specs

| Field              | Value                                                                             |
| ------------------ | --------------------------------------------------------------------------------- |
| Model ID           | `gpt-5.6-terra`                                                                   |
| Best for           | Everyday coding, reasoning and agentic work where capability and cost both matter |
| Context window     | 1.05M                                                                             |
| Max output tokens  | 8K                                                                                |
| Input modalities   | Text, Image                                                                       |
| Output modalities  | Text                                                                              |
| Tool calling       | Yes                                                                               |
| Structured outputs | Yes                                                                               |
| Prompt caching     | Yes                                                                               |
| Speed              | Medium                                                                            |
| Cost band          | Premium                                                                           |
| Release stage      | Stable                                                                            |

## Pricing

|        | Per 1M tokens |
| ------ | :-----------: |
| Input  |     \$2.70    |
| Output |    \$16.20    |

Above a long prompt this model costs more per token, because the infrastructure
serving it charges more there. The threshold is on the **prompt**, so you know which
rate applies before you send.

| Prompt length        |  Input  |  Output |
| -------------------- | :-----: | :-----: |
| Standard             |  \$2.70 | \$16.20 |
| Above 272,000 tokens | \$10.80 | \$48.60 |

## Use this when

* **Everyday Code Generation** — Handles routine scripting, refactoring, and debugging tasks with reliable tool integration.
* **Multi-Step Agent Workflows** — Executes chained function calls and maintains state across complex operational loops.
* **Technical Document Analysis** — Processes long text and image inputs within a million-token context window.
* **Interactive Chat Applications** — Delivers consistent conversational responses with structured output formatting.

## Not ideal for

It is not suited for high-throughput batch processing or tasks requiring ultra-low latency, as it operates at a medium speed tier and premium cost tier.

## Pick something else when

* You need faster, lower-cost inference for simple prompts: use [`gemini-3.6-flash`](/models/gemini-3.6-flash).
* You need deeper reasoning for complex research or math: use [`deepseek-r1`](/models/deepseek-r1).
* You need specialized code generation and repository-level tasks: use [`qwen-3-coder`](/models/qwen-3-coder).

## Example

```python theme={null}
from openai import OpenAI

client = OpenAI(base_url="https://kymaapi.com/v1", api_key="kyma-...")

response = client.chat.completions.create(
    model="gpt-5.6-terra",
    messages=[{"role": "user", "content": "..."}],
    tools=[...],  # function calling supported
)
```

## Agent query example

Ask the API which models fit, instead of hardcoding an id:

```bash theme={null}
curl "https://kymaapi.com/v1/models?recommended_for=write-code&tools=true&quality_tier=frontier-open"
```

## FAQ

**Does this model support image inputs?**

Yes, it accepts both text and image inputs and returns text-only outputs.

**How does prompt caching work on Kyma?**

When enabled, repeated prompt prefixes are billed at this model's cached input rate, reducing costs for conversational or template-heavy workloads.

**Can I rely on a single API key for this model?**

Yes, Kyma uses one API key across all models and routes requests through an OpenAI-compatible endpoint at [https://kymaapi.com/v1](https://kymaapi.com/v1).
