> ## 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.

# Grok Build

> Grok Build is a text-only, tool-native model optimized for fast, agentic coding workflows. Developers building automated debugging pipelines or multi-step software agents should use it for rapid tool execution and structured reasoning.

## Overview

Created by xAI, this model specializes in software development tasks. It handles tool calls natively, supports structured outputs, and includes built-in reasoning capabilities. It operates exclusively with text inputs and outputs, with a 256,000-token context window and a 32,768-token maximum output limit.

On Kyma, requests route through an OpenAI-compatible endpoint using a single API key. The platform provides automatic failover if a serving path degrades, and every response returns the exact token cost in usage.cost alongside the X-Kyma-Model header. Prompt caching is supported, billing repeated prefixes at this model's cached input rate.

It does not process images, audio, or other non-text modalities. While optimized for speed and tool use, its output length caps at 32,768 tokens, which may require chunking for very long codebase generation or extensive documentation tasks.

## Specs

| Field              | Value                                    |
| ------------------ | ---------------------------------------- |
| Model ID           | `grok-build`                             |
| Best for           | Agentic coding, debugging, fast tool use |
| Context window     | 256,000                                  |
| Max output tokens  | 33K                                      |
| Input modalities   | Text                                     |
| Output modalities  | Text                                     |
| Tool calling       | Yes                                      |
| Structured outputs | Yes                                      |
| Prompt caching     | Yes                                      |
| Speed              | Fast                                     |
| Cost band          | Balanced                                 |
| Release stage      | Preview                                  |

## Pricing

|        | Per 1M tokens |
| ------ | :-----------: |
| Input  |    \$1.389    |
| Output |    \$2.777    |

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             | \$1.389 | \$2.777 |
| Above 200,000 tokens |  \$2.70 |  \$5.40 |

## Use this when

* **Agentic Software Development** — Automates multi-step coding tasks by chaining tool calls and reasoning loops.
* **Rapid Debugging Workflows** — Identifies and patches code errors quickly using native tool integration.
* **Structured API Responses** — Generates valid JSON or schema-compliant outputs for downstream system integration.
* **Fast Chat Interactions** — Delivers low-latency conversational responses for developer-focused assistants.

## Not ideal for

Do not use this model for tasks requiring image analysis, audio processing, or outputs longer than 32,768 tokens.

## Pick something else when

* You need to analyze images or process multimodal data: use [`gemini-3.5-flash`](/models/gemini-3.5-flash) or [`qwen-3.7-plus`](/models/qwen-3.7-plus).
* You require output sequences exceeding 32,768 tokens: use [`deepseek-v3`](/models/deepseek-v3) or [`qwen-3.7-max`](/models/qwen-3.7-max).

## 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="grok-build",
    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=chat&tools=true&quality_tier=strong"
```

## FAQ

**Does Grok Build support image inputs?**

No, it only accepts and generates text. Use a multimodal model if your workflow requires vision.

**How does prompt caching affect my costs?**

Repeated prompt prefixes are billed at this model's cached input rate, reducing costs for stable system prompts or long conversation histories.

**What happens if the serving endpoint fails during a request?**

Kyma automatically reroutes the request to a healthy serving path, and the response includes the exact cost in usage.cost and the active model in the X-Kyma-Model header.
