Grok 4
Grok logo

Grok 4

grok-4
Grok
Grok, their latest and greatest flagship model, offers unparalleled performance in natural language, math, and reasoning – the perfect jack of all trades. The current pointing model version is grok-4-0709.

Pricing

  • Input Tokens: $3.300 /M tokens
  • Output Tokens: $16.500 /M tokens
  • Cache Read: $0.825 /M tokens

Input Modalities

  • Text
  • Vision

Output Modalities

  • Text

Capabilities

  • Thinking
  • Tool calling
  • Structured outputs

Try this model

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIHUBMIX_API_KEY"],
    base_url="https://aihubmix.com/v1",
)

response = client.chat.completions.create(
    model="grok-4",
    messages=[
      {
        "role": "user",
        "content": "Hello, how are you?"
      }
    ],
    max_tokens=1024,
    stream=False,
)

print(response.choices[0].message.content)

Frequently asked questions

What is Grok 4?

Grok, their latest and greatest flagship model, offers unparalleled performance in natural language, math, and reasoning – the perfect jack of all trades. The current pointing model version is grok-4-0709.