Grok 4.3

    xai/grok-4.3
    試驗場

    Grok 4.3 is a reasoning model from xAI that supports text and image inputs with text output. It is suited for agentic workflows, instruction following, long-document analysis, and deep research. The model supports a 1M token context window. Requests above 200K total tokens are billed at a higher rate.

    Production CodeStructured Output推理
    模態
    輸入 / 輸出價格
    $2.5 / $5M tokens
    上下文
    1M
    發布時間
    2026-04-30

    價格

    規格價格
    輸入$2.5/ M tokens
    輸出$5/ 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/chat/completions
    curl --location "https://api.gate.ai/openai/v1/chat/completions" \
      --header "Authorization: Bearer {API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
      "model": "grok-4.3",
      "messages": [
        {"role": "user", "content": "Hello"}
      ]
    }'
    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/chat/completions
    curl --no-buffer --location "https://api.gate.ai/openai/v1/chat/completions" \
      --header "Authorization: Bearer {API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
      "model": "grok-4.3",
      "messages": [
        {"role": "user", "content": "Hello"}
      ],
      "stream": true
    }'

    端點

    基礎 URL、請求方法與必要請求頭,皆依當前模型的協議模板渲染。

    POSThttps://api.gate.ai/openai/v1/chat/completions
    欄位
    值
    Authorization
    驗證請求頭,使用 Bearer {API_KEY} 格式傳遞 API Key
    Content-Type
    請求內容型別,固定為 application/json
    model
    Model ID; the current model is grok-4.3
    messages
    Ordered array of conversation messages
    stream
    Whether to return the result as an SSE stream

    以 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.3
    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

    相關模型