xai/grok-4.7
xAI
Prices
As of Nov 22, 2026. Prices in euros, final amounts with no VAT shown.
| Price | € per 1M tokens |
|---|---|
| Input | 2.2781 |
| Cached | 0.5695 |
| Output | 6.8344 |
Limits
| Context | 128,000 tokens |
| Maximum output | 32,768 tokens |
Capabilities
| Tools | Yes |
| Images | Yes |
| Reasoning | Yes |
| Web search | Yes |
| JSON schema | Yes |
| JSON object | Yes |
| Streaming | Yes |
| Reasoning levels | low, medium, high |
How to call it
Put your key in FLOWMODELS_API_KEY and this call runs as is.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.flowmodels.one/v1",
api_key=os.environ["FLOWMODELS_API_KEY"],
)
response = client.chat.completions.create(
model="xai/grok-4.7",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)