---
title: XAI: Grok 3 Beta API | Text Generation | ModelsLab
description: Build with XAI: Grok 3 Beta API by X Ai. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab.com/models/x-ai/x-ai-grok-3-beta/api.md
canonical: https://modelslab.com/models/x-ai/x-ai-grok-3-beta/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-28T12:53:55.976670Z
---

xAI: Grok 3 Beta
---

 [LLMs.txt](https://modelslab.com/models/open_router/x-ai-grok-3-beta/llms.txt) [.md](https://modelslab.com/models/x-ai/x-ai-grok-3-beta.md)

x-ai-grok-3-beta x-ai Closed Source Model $9.000000 / call

xAI: Grok 3 Beta
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### xAI: Grok 3 Beta

x-ai x-ai-grok-3-beta

Copy model ID

PricingInput $3.00 / 1M tokens

Output $15.00 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[DD](https://modelslab.com/models/open_router/deepseek-deepseek-v3.1-terminus)[Open Router](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V3.1 Terminus

Closed Source Model](https://modelslab.com/models/open_router/deepseek-deepseek-v3.1-terminus)

[MM](https://modelslab.com/models/open_router/mistralai-mixtral-8x22b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Mixtral 8x22B Instruct

Closed Source Model](https://modelslab.com/models/open_router/mistralai-mixtral-8x22b-instruct)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-coder-free)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 Coder 480B A35B (free)

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-coder-free)

[ZG](https://modelslab.com/models/open_router/z-ai-glm-4-32b)[Open Router](https://modelslab.com/models/open_router)

 [Z.ai: GLM 4 32B

Closed Source Model](https://modelslab.com/models/open_router/z-ai-glm-4-32b)

[M8](https://modelslab.com/models/together_ai/mistralai-Mixtral-8x22B-Instruct-v0.1)[Together AI](https://modelslab.com/models/together_ai)

 [Mixtral 8X22b Instruct V0.1

Closed Source Model](https://modelslab.com/models/together_ai/mistralai-Mixtral-8x22B-Instruct-v0.1)

[TH](https://modelslab.com/models/open_router/tencent-hunyuan-a13b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Tencent: Hunyuan A13B Instruct

Closed Source Model](https://modelslab.com/models/open_router/tencent-hunyuan-a13b-instruct)

[MM](https://modelslab.com/models/open_router/minimax-minimax-m2.5)[Open Router](https://modelslab.com/models/open_router)

 [MiniMax: MiniMax M2.5

Closed Source Model](https://modelslab.com/models/open_router/minimax-minimax-m2.5)

[DV](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-V3-Base)[Together AI](https://modelslab.com/models/together_ai)

 [Deepseek V3 Base

Closed Source Model](https://modelslab.com/models/together_ai/deepseek-ai-DeepSeek-V3-Base)

[MM](https://modelslab.com/models/open_router/mistralai-ministral-8b-2512)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Ministral 3 8B 2512

Closed Source Model](https://modelslab.com/models/open_router/mistralai-ministral-8b-2512)

[MS](https://modelslab.com/models/together_ai/mistralai-Mistral-Small-24B-Instruct-2501)[Together AI](https://modelslab.com/models/together_ai)

 [Mistral Small (24B) Instruct 25.01

Closed Source Model](https://modelslab.com/models/together_ai/mistralai-Mistral-Small-24B-Instruct-2501)

[G5](https://modelslab.com/models/together_ai/zai-org-GLM-5.1)[Together AI](https://modelslab.com/models/together_ai)

 [GLM 5.1 FP4

Closed Source Model](https://modelslab.com/models/together_ai/zai-org-GLM-5.1)

[OG](https://modelslab.com/models/open_router/openai-gpt-4o-audio-preview)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: GPT-4o Audio

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-4o-audio-preview)

[QC](https://modelslab.com/models/together_ai/Qwen-Qwen3-Coder-Next-FP8)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3 Coder Next Fp8

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3-Coder-Next-FP8)

[![Anthropic: Claude Sonnet 4.5](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/aae18a61-9b88-43f7-83f5-4ec4ead6d4b6.png)](https://modelslab.com/models/open_router/anthropic-claude-sonnet-4.5)[Open Router](https://modelslab.com/models/open_router)

 [Anthropic: Claude Sonnet 4.5

Closed Source Model](https://modelslab.com/models/open_router/anthropic-claude-sonnet-4.5)

[FC](https://modelslab.com/models/together_ai/facebook-cwm)[Together AI](https://modelslab.com/models/together_ai)

 [Facebook CWM

Closed Source Model](https://modelslab.com/models/together_ai/facebook-cwm)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-235b-a22b)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 235B A22B

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-235b-a22b)

[DD](https://modelslab.com/models/open_router/deepseek-deepseek-chat)[Open Router](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V3

Closed Source Model](https://modelslab.com/models/open_router/deepseek-deepseek-chat)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-32b)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 32B

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-32b)

About XAI: Grok 3 Beta
---

Grok 3 is the latest model from xAI. It's their flagship model that excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in...

### Technical Specifications

Model IDx-ai-grok-3-betaCategoryLLM ModelsTaskText GenerationPrice$9.000000 per million tokensAddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate XAI: Grok 3 Beta into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "x-ai-grok-3-beta",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab.com/models/x-ai/x-ai-grok-3-beta/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

XAI: Grok 3 Beta API costs $9.000000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from X Ai](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

XAI: Grok 3 Beta FAQ
---

### What is XAI: Grok 3 Beta?

Grok 3 is the latest model from xAI. It's their flagship model that excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in...

### How do I use the XAI: Grok 3 Beta API?

You can integrate XAI: Grok 3 Beta into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "x-ai-grok-3-beta" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does XAI: Grok 3 Beta cost?

XAI: Grok 3 Beta costs $9.000000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the XAI: Grok 3 Beta model ID?

The model ID for XAI: Grok 3 Beta is "x-ai-grok-3-beta". Use this ID in your API requests to specify this model.

### Does XAI: Grok 3 Beta have a free tier?

Yes, ModelsLab offers a free tier that lets you try XAI: Grok 3 Beta and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-04-28*