Grok Build 自定义API配置

2026-07-19 11:12 1

发现 grok build 的配置教程还是比较少的,分享一下我的配置


主要配置


# 开启后会跳过内置模型目录,只走代理 / 显式 [model.*]
[endpoints]
models_base_url = "你的API"

[models]
default = "grok-4.5"
default_reasoning_effort = "high"

# 模型 ID 含点号时必须加引号:[model."grok-4.5"]
# 自定义模型要出思考等级,需显式打开 supports_reasoning_effort

[model."grok-4.5"]
model = "grok-4.5"
base_url = "你的API"
name = "Grok 4.5"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

# 代理上实际模型 ID 是 grok-build-0.1;section 名保持 grok-build 便于 /model 与 fork
[model.grok-build]
model = "grok-build-0.1"
base_url = "你的API"
name = "Grok Build"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

[model."grok-composer-2.5-fast"]
model = "grok-composer-2.5-fast"
base_url = "你的API"
name = "Grok Composer 2.5 Fast"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

# 图像/视频:不需要思考等级
[model.grok-imagine-image]
model = "grok-imagine-image"
base_url = "你的API"
name = "Grok Imagine Image"
api_backend = "chat_completions"
api_key = "sk-..."

[model.grok-imagine-image-quality]
model = "grok-imagine-image-quality"
base_url = "你的API"
name = "Grok Imagine Image Quality"
api_backend = "chat_completions"
api_key = "sk-..."

[model.grok-imagine-video]
model = "grok-imagine-video"
base_url = "你的API"
name = "Grok Imagine Video"
api_backend = "chat_completions"
api_key = "sk-..."

完整配置


[cli]
installer = "npm"

[marketplace]
official_marketplace_auto_installed = true

[[marketplace.sources]]
name = "xAI Official"
git = "https://github.com/xai-org/plugin-marketplace.git"

[ui]
max_thoughts_width = 120
fork_secondary_model = "grok-build"
yolo = false
compact_mode = false
permission_mode = "always-approve"

# 开启后会跳过内置模型目录,只走代理 / 显式 [model.*]
[endpoints]
models_base_url = "你的API"

[models]
default = "grok-4.5"
default_reasoning_effort = "high"

# 模型 ID 含点号时必须加引号:[model."grok-4.5"]
# 自定义模型要出思考等级,需显式打开 supports_reasoning_effort

[model."grok-4.5"]
model = "grok-4.5"
base_url = "你的API"
name = "Grok 4.5"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

# 代理上实际模型 ID 是 grok-build-0.1;section 名保持 grok-build 便于 /model 与 fork
[model.grok-build]
model = "grok-build-0.1"
base_url = "你的API"
name = "Grok Build"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

[model."grok-composer-2.5-fast"]
model = "grok-composer-2.5-fast"
base_url = "你的API"
name = "Grok Composer 2.5 Fast"
api_backend = "chat_completions"
api_key = "sk-..."
supports_reasoning_effort = true
reasoning_efforts = ["low", "medium", "high", "xhigh"]
context_window = 256000

# 图像/视频:不需要思考等级
[model.grok-imagine-image]
model = "grok-imagine-image"
base_url = "你的API"
name = "Grok Imagine Image"
api_backend = "chat_completions"
api_key = "sk-..."

[model.grok-imagine-image-quality]
model = "grok-imagine-image-quality"
base_url = "你的API"
name = "Grok Imagine Image Quality"
api_backend = "chat_completions"
api_key = "sk-..."

[model.grok-imagine-video]
model = "grok-imagine-video"
base_url = "你的API"
name = "Grok Imagine Video"
api_backend = "chat_completions"
api_key = "sk-..."
最新回复 (3)
  • 吾是菜鸟 07-19 12:45
    1

    就是中转站可以用的吧 ccs比如配置了该中转站的claude或者codex配置 和ccs配置里不会冲突吧

  • 楼主 07-20 00:03
    2

    ccs 是不是还不支持 grok?


    配置文件地址是: ~/.grok/config.toml

  • 吾是菜鸟 07-20 00:04
    3

    试过了 很好用 不冲突 感谢佬分享

* 帖子来源Linux.do
返回