# Grok 4

> Grok 4 on Clonvo: 256K context, $3.00 input and $15.00 output per 1M tokens.

Latest Grok 4 with vision and tool support.

-   Model id: `x-ai/grok-4`
-   Provider: xAI
-   Released: Jul 9, 2025
-   Context: 256K tokens
-   Max output: 256K tokens

## Pricing

The provider’s list price in USD. Requests on credits are charged exactly this; each response reports its cost in usage.cost.

| Charge | Price | Unit |
| --- | --- | --- |
| Input (prompt) | $3.00 | per 1M tokens |
| Output (completion) | $15.00 | per 1M tokens |
| Cache read | $0.75 | per 1M tokens |

### Prices by prompt length

The tier is chosen by the number of prompt tokens in the request. USD per 1M tokens.

| Charge | Up to 128K | Over 128K |
| --- | --- | --- |
| Input (prompt) | $3.00 | $6.00 |
| Output (completion) | $15.00 | $30.00 |
| Cache read | $0.75 | $1.50 |

## Capabilities

-   Tools
-   Vision
-   Reasoning

### Supported parameters

Upstream parameters this model honours. Others may be ignored.

-   `temperature`
-   `max_tokens`
-   `top_p`
-   `response_format`
-   `tools`
-   `tool_choice`
-   `reasoning_effort`

## Quick start

Use the OpenAI SDK with Clonvo’s base URL and this model id.

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.clonvo.com/v1",
    api_key=os.environ["CLONVO_API_KEY"],
)

completion = client.chat.completions.create(
    model="x-ai/grok-4",
    messages=[{"role": "user", "content": "Summarise the plot of Hamlet in one sentence."}],
)
print(completion.choices[0].message.content)
```

## Data policy

Requests to this model are sent to xAI, whose API terms govern how they handle your data: [xAI data policy](https://x.ai/legal/privacy-policy). Clonvo doesn’t store prompts or responses unless your organization turns on retention.

## Bring your own key

From Pay as you go up, a xAI key added under Provider keys is used for this model before your credits: $25,000 a month free, then 4% of list price. [How bring-your-own-key works](https://clonvo.com/docs/byok.md).
