Grok

grok-4.20-beta-0309-non-reasoning

xAIToken-based
Create API Key

xAI 的 grok-4.20-beta-0309-non-reasoning 模型。支持文本、图像输入和文本输出。

textimagefunction_callingtoolsstructured_outputjson_modevisioncontext:1000000
Starting price
Input / Output · 1M
Context
1M
Maximum input window
Modalities
→
Released
Mar 2026

Pricing by Supplier

xAI
-50%
xAI 官方
Input$2$1/ 1M
Output$6$3/ 1M
Cache Read$0.2$0.1/ 1M

Capabilities / Supported modalities

Function callingToolsStructured outputJSON modeVision
Input
Output

Provider & data privacy

Provider
xAIDocs
Tokenizer
Grok tokenizer (BPE)
License
Proprietary (commercial)Proprietary
Data retention15 daysNot used for upstream training by default

Performance

API access

Code samples

RequestPOST/v1/chat/completions
Example request
Parameters
ParameterTypeDefault / rangeDescription
reasoning_effort
enum
=medium
Controls how much the model thinks before answering
max_completion_tokens
integer>= 1Maximum tokens including hidden reasoning tokens
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
user
string—End-user identifier for abuse monitoring

Replace <YOUR_API_KEY> with the API key from your token settings.

Authentication

All requests must include Authorization: Bearer <TOKEN> header. Anthropic-formatted endpoints accept the x-api-key header instead.

Generate tokens from the Tokens page; you can scope them to specific models, groups, IPs, and rate-limits.

Supported parameters

Generation parameters
ParameterTypeDefault / rangeDescription
reasoning_effort
enum
=medium
Controls how much the model thinks before answering
max_completion_tokens
integer>= 1Maximum tokens including hidden reasoning tokens
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
user
string—End-user identifier for abuse monitoring

Rate limits

SupplierRPMTPMRPD
xAI780311K16K

RPM = requests per minute, TPM = tokens per minute, RPD = requests per day. Limits apply per token group.

API access questions

Everything you need to decide before creating an account.

Discover more models