Grok 4.7

Write and review code, plan multi-step work and analyze long documents with xAI's reasoning model: text and image input, 500K-token context and private mode.

Price: $2.00 per 1M input tokens, $6.00 per 1M output tokens, cached input $0.50 per 1M.

Run Grok 4.7 via API

curl -X POST https://api.flymy.ai/api/v1/flymyai/grok-4_7/predict \
  -H "X-API-KEY: $FLYMYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Explain in two sentences why the sky is blue.","reasoning_effort":"low"}'

OpenAI-compatible API

Grok 4.7 also speaks the OpenAI Chat Completions protocol: use the official OpenAI SDK with base URL https://api.flymy.ai/api/v1/flymyai/grok-4_7/openai/v1 and your FlyMy.AI API key.

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.flymy.ai/api/v1/flymyai/grok-4_7/openai/v1", api_key=os.environ["FLYMYAI_API_KEY"])
response = client.chat.completions.create(
    model="flymyai/grok-4_7",
    messages=[{"role": "user", "content": "What is a vector database?"}],
)
print(response.choices[0].message.content)

OpenAI-compatible API docs

API documentation · Create a free account · Pricing

Related models