Grok 4.20 Multi-Agent

    xai/grok-4.20-multi-agent
    试验场

    Multi-agent variant that dispatches sub-agents in parallel for deep research, multi-step reasoning, and tool orchestration.

    推理Deep AnalysisComplex PlanningAgent
    模态
    输入 / 输出价格
    $4 / $12M tokens
    上下文
    2M
    发布时间
    2026-03-31

    价格

    规格价格
    输入$4/ M tokens
    输出$12/ M tokens
    缓存读$0.4/ M tokens
    缓存写--

    快速开始

    可直接粘贴运行下方示例代码。Gate.AI API 与 OpenAI 兼容,多数 SDK 只需替换 base URL;切换模型时,只需修改模型 ID。

    1

    Get your API key

    Sign in to the Gate.AI console and create a new key under "API Keys". Keep it safe and send it via the Authorization header on every request.

    前往控制台创建密钥
    2

    Make a request

    Send a POST request to the Chat Completions endpoint with a model ID and an array of messages to get a reply.

    POSThttps://api.gate.ai/openai/v1/responses
    curl --location "https://api.gate.ai/openai/v1/responses" \
      --header "Authorization: Bearer {API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
      "model": "grok-4.20-multi-agent",
      "input": "Hello",
      "max_output_tokens": 256
    }'
    3

    Handle the response \& streaming

    By default a full JSON response is returned. Add "stream": true to the request body to receive incremental chunks over SSE.

    POSThttps://api.gate.ai/openai/v1/responses
    curl --no-buffer --location "https://api.gate.ai/openai/v1/responses" \
      --header "Authorization: Bearer {API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
      "model": "grok-4.20-multi-agent",
      "input": "Hello",
      "max_output_tokens": 256,
      "stream": true
    }'

    端点

    以 OpenAI Responses API 格式建立流式或非流式响应。

    POSThttps://api.gate.ai/openai/v1/responses
    字段
    值
    Authorization
    认证请求头,使用 Bearer {API_KEY} 格式传递 API Key
    Content-Type
    请求内容类型,固定为 application/json
    model
    Model ID; the current model is grok-4.20-multi-agent
    input
    Text or structured input submitted to the model
    max_output_tokens
    Maximum number of output tokens the model may generate
    stream
    Whether to return the result as an SSE stream

    相关模型