Skip to content

Grok โ€‹

Updated

Endpoint: https://mmu.vod-qcloud.com/v1Authentication: VOD ApiToken / Bearer

Grok is a text generation / chat model called through an OpenAI-compatible API, with JSON and SSE streaming responses. It supports the Chat Completions, Responses, and Messages protocols, with both reasoning and non-reasoning versions.

Basic Information โ€‹

ItemValue
Call endpointhttps://mmu.vod-qcloud.com
AuthenticationVOD Application-issued ApiToken / Bearer
OutputText / Structured response
Response modeJSON / SSE

Supported Protocols โ€‹

SpecPathTarget
Chat CompletionsPOST /v1/chat/completionsAll models below
ResponsesPOST /v1/responsesAll models below
MessagesPOST /v1/messagesAll models below

The model IDs below use the corresponding spec. Authentication and common fields follow API Reference.

Sampling Options โ€‹

Commonly applies to all models listed in this document.

ParameterSetting
temperatureConfigurable
top_pConfigurable

temperature specifies the sampling temperature, and top_p specifies the cumulative probability range. Adjust centered on one method.

Per-Version Reasoning Settings โ€‹

Model IDConfigurationDisable
gk-4.6reasoning_effortNo dedicated disable option
gk-4.3reasoning_effortNo dedicated disable option
gk-4.1-fast-non-reasoningNon-reasoning modelSelected by model ID
gk-4-20-reasoningreasoning_effortSelected by model ID
gk-4-20-non-reasoningNon-reasoning modelSelected by model ID
gk-4-1-fast-reasoningreasoning_effortSelected by model ID

Based on Chat Completions. Reasoning content is read from reasoning_content, and the final answer from content. Do not pass a disable option to versions that cannot be disabled.

Request Parameters โ€‹

ParameterRequiredTypeDescription
modelRequiredStringA model ID from the per-version options table
messagesRequiredArrayConversation input for Chat Completions / Messages
inputRequiredString / ArrayInput for Responses. Used instead of messages
max_tokensOptionalIntegerGeneration limit for Chat Completions / Messages. Required in Messages
max_output_tokensOptionalIntegerGeneration limit for Responses
streamOptionalBooleantrue: SSE / false: JSON

Request Examples โ€‹

Chat Completions โ€‹

json
{
  "model": "gk-4.6",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 2048,
  "stream": false,
  "reasoning_effort": "low"
}

Response โ€‹

json
{
  "id": "01a0de40-a5ff-78b0-ba00-93d96f5698c7",
  "object": "chat.completion",
  "model": "grok-4.6",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "OK"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 0,
      "text_tokens": 12
    },
    "prompt_cached_tokens_details": {
      "audio_tokens": 0
    },
    "completion_tokens": 1,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 114,
      "rejected_prediction_tokens": 0
    },
    "total_tokens": 127
  }
}

Responses โ€‹

json
{
  "model": "gk-4.6",
  "input": "Reply with exactly OK and nothing else.",
  "max_output_tokens": 512,
  "stream": false
}

Response โ€‹

json
{
  "id": "resp_0c703ed2c27d9a19006ab7dc7cd99481949e814740a80465ed",
  "object": "response",
  "model": "grok-4.6",
  "status": "completed",
  "output": [
    {
      "id": "msg_0c703ed2c27d9a19006ab7dc80bf7481948c2eaf253c24e43e",
      "type": "message",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "annotations": ,
          "logprobs": ,
          "text": "OK"
        }
      ],
      "role": "assistant"
    }
  ],
  "usage": {
    "input_tokens": 8,
    "input_tokens_details": {
      "cache_write_tokens": 0,
      "cached_tokens": 0
    },
    "output_tokens": 116,
    "output_tokens_details": {
      "reasoning_tokens": 115
    },
    "total_tokens": 124
  }
}

Messages โ€‹

json
{
  "model": "gk-4.6",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 512,
  "stream": false
}

Response โ€‹

json
{
  "id": "01a0de33-5952-783e-9e51-bb6ca79ca5b8",
  "model": "grok-4.6",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "text": "OK",
      "type": "text"
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 12,
    "output_tokens": 1
  }
}

Special Settings โ€‹

In Chat Completions, use reasoning_effort to specify the reasoning effort. Reasoning tokens are included in the output token usage. In responses that return reasoning content, reasoning_content and the final content are handled separately.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages