xAI: Grok Latest
This model always redirects to the latest Grok model from xAI.
Specifications
| Context Window | 500K |
| Modalities | text |
| Input | $2.40 / M tokens |
| Output | $7.20 / M tokens |
| Status | available |
| Category | third-party |
| Model ID | ~x-ai/grok-latest |
Quick Start
Test right now from your terminal. No credentials needed:
curl https://api.hanzo.ai/v1/chat/completions \
-H "Authorization: Bearer guest_temp_key" \
-d '{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}'import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.HANZO_API_KEY,
baseURL: 'https://api.hanzo.ai/v1'
})
const response = await client.chat.completions.create({
model: '~x-ai/grok-latest',
messages: [{ role: 'user', content: 'Hello!' }]
})
console.log(response.choices[0].message.content)from openai import OpenAI
client = OpenAI(
api_key=os.environ["HANZO_API_KEY"],
base_url="https://api.hanzo.ai/v1"
)
response = client.chat.completions.create(
model="~x-ai/grok-latest",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)curl https://api.hanzo.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HANZO_API_KEY" \
-d '{
"model": "~x-ai/grok-latest",
"messages": [{"role": "user", "content": "Hello!"}]
}'package main
import (
"context"
"fmt"
"os"
"github.com/sashabaranov/go-openai"
)
func main() {
cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY"))
cfg.BaseURL = "https://api.hanzo.ai/v1"
client := openai.NewClientWithConfig(cfg)
resp, _ := client.CreateChatCompletion(context.Background(),
openai.ChatCompletionRequest{
Model: "~x-ai/grok-latest",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello!"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}More from xAI
Grok 4.20 is a reasoning model from SpaceXAI with industry-leading speed and agentic tool calling capabilities. It combines the lowest hallucination rate on the market with strict prompt adherance, delivering...
Grok 4.20 Multi-Agent is a variant of SpaceXAI’s Grok 4.20 designed for collaborative, agent-based workflows. Multiple agents operate in parallel to conduct deep research, coordinate tool use, and synthesize information...
Grok 4.3 is a reasoning model from SpaceXAI. It accepts text and image inputs with text output, and is suited for agentic workflows, instruction-following tasks, and applications requiring high factual...
Grok 4.5 is a model from SpaceXAI with frontier performance on coding, knowledge work, and STEM.
Grok 4.6 is SpaceXAI's smartest model with frontier performance on coding, knowledge work, and STEM.
Use xAI: Grok Latest via Hanzo AI
One API key. Every major model. OpenAI-compatible. Start free.