xai/grok-4 🔢📝 → 📝

⭐ Official ▶️ 56.3K runs 📅 Oct 2025 ⚙️ Cog 0.16.12
code-generation question-answering text-generation text-translation

About

Grok 4 is xAI’s most advanced reasoning model. Excels at logical thinking and in-depth analysis. Ideal for insightful discussions and complex problem-solving.

Example Output

Prompt:

"Shawn has 3 apples and gives 1 to John. How many apples does Shawn have left?"

Output

Shawn has 2 apples left.

Performance Metrics

4.06s Prediction Time
4.08s Total Time
All Input Parameters
{
  "top_p": 1,
  "prompt": "Shawn has 3 apples and gives 1 to John. How many apples does Shawn have left?",
  "max_tokens": 2048,
  "temperature": 0.1,
  "presence_penalty": 0,
  "frequency_penalty": 0
}
Input Parameters
top_p Type: numberDefault: 1
Top-p (nucleus) sampling
prompt Type: stringDefault:
Prompt
max_tokens Type: integerDefault: 2048
The maximum number of tokens the model should generate as output.
temperature Type: numberDefault: 0.1
The value used to modulate the next token probabilities.
presence_penalty Type: numberDefault: 0
Presence penalty
frequency_penalty Type: numberDefault: 0
Frequency penalty
Output Schema

Output

Type: arrayItems Type: string

Version Details
Version ID
56f17471947d6bed7b61ef0e0c4e796db2aa8276a6f534a06a1a0c1955fb0f01
Version Created
March 3, 2026
Run on Replicate →