xai
Grok Beta
xai/grok-beta
Grok-2 Beta introduces two advanced language models, with superior performance in reasoning, coding, and understanding tasks compared to prior models. Grok-2 outperforms competitors like GPT-4 Turbo on key benchmarks and includes state-of-the-art capabilities in multimodal and real-time applications. It's accessible via the platform for Premium users and will soon be available through a secure, low-latency enterprise API. These updates mark significant advancements in xAI's pursuit of cutting-edge AI development.
Tools
Function Calling
Context Window
131,072
Max Output Tokens
131,072
Using Grok Beta with Python API
Using Grok Beta with OpenAI compatible API
import openai
client = openai.Client(
api_key= '{your_api_key}',
base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="xai/grok-beta",
messages: [
{
role: 'user',
content:
'introduce your self',
},
]
)
print(response)