Agent skill

API Provider Setup

by aAAaqwq in aAAaqwq/AGI-Super-Team

添加和配置第三方 API 中转站供应商到 OpenClaw。当用户需要添加新的 API 供应商、配置中转站、设置自定义模型端点时使用此技能。支持 Anthropic 兼容和 OpenAI 兼容的 API 格式。

MITAuto-check passedAI & LLM Engineering

Install API Provider Setup

skills CLI
$ npx skills add aAAaqwq/AGI-Super-Team --skill api-provider-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aAAaqwq/AGI-Super-Team api-provider-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aAAaqwq/AGI-Super-Team.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/api-provider-setup .claude/skills/api-provider-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-provider-setup
GitHub stars
105
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
265 words
Files
2 (incl. scripts)
Skills in repo
161
Repo updated
First seen
Licence
MIT

At a glance

添加和配置第三方 API 中转站供应商到 OpenClaw。当用户需要添加新的 API 供应商、配置中转站、设置自定义模型端点时使用此技能。支持 Anthropic 兼容和 OpenAI 兼容的 API 格式。

  • Works in 4 steps: 获取供应商信息 → 使用 gateway config.patch 添加 → 重启 Gateway 生效 → …
  • Tasks that involve LLM API integration
  • SKILL.md covers 配置位置, 配置模板, 关键字段说明 and 添加模型别名, plus 6 more sections
  • Runs Shell scripts from its folder; calls curl; reaches anapi.9w7.cn and open.bigmodel.cn

What it does

API Provider Setup is an agent skill from aAAaqwq/AGI-Super-Team. 添加和配置第三方 API 中转站供应商到 OpenClaw。当用户需要添加新的 API 供应商、配置中转站、设置自定义模型端点时使用此技能。支持 Anthropic 兼容和 OpenAI 兼容的 API 格式。

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/sync-agent-auth.sh`).

It sits in AI & LLM Engineering, covering LLM API integration. It works with OpenAI. The repository describes itself as: An installable, cross-framework AI organization: C-suite agents, expert subagents, curated skills, independent review, and one-command setup across 18 AI client/runtime adapters. The licence is MIT.

When your agent uses it

  • Tasks that involve LLM API integration

Example prompts

  • “/api-provider-setup”

Requirements

  • A Bash shell
  • A credential in YOUR_API_KEY

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 获取供应商信息
  2. 使用 gateway config.patch 添加
  3. 重启 Gateway 生效
  4. 测试新模型

What it can do on your machine

Read from SKILL.md and the folder at commit 331ecd3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • anapi.9w7.cn
    • open.bigmodel.cn
    • openrouter.vip
    • linuxdoapi-api-wow.223387.xyz

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Provider Setup loads about 1.8k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 265 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aAAaqwq/AGI-Super-Team at commit 331ecd3, republished under its MIT licence (© aAAaqwq). 265 words, ~1,761 tokens.

Download SKILL.mdSave it as .claude/skills/api-provider-setup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
api-provider-setup
description
添加和配置第三方 API 中转站供应商到 OpenClaw。当用户需要添加新的 API 供应商、配置中转站、设置自定义模型端点时使用此技能。支持 Anthropic 兼容和 OpenAI 兼容的 API 格式。
author
Daniel Li

API Provider Setup

为 OpenClaw 添加和配置第三方 API 中转站供应商。

配置位置

配置文件:~/.openclaw/openclaw.json

在 models.providers 部分添加自定义供应商。

配置模板

Anthropic 兼容 API(如 anapi、智谱)
json
{
  "models": {
    "mode": "merge",
    "providers": {
      "供应商名称": {
        "baseUrl": "https://api.example.com",
        "apiKey": "sk-your-api-key",
        "auth": "api-key",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "model-id",
            "name": "显示名称",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 200000,
            "maxTokens": 8192,
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            }
          }
        ]
      }
    }
  }
}
OpenAI 兼容 API(如 OpenRouter)
json
{
  "models": {
    "mode": "merge",
    "providers": {
      "供应商名称": {
        "baseUrl": "https://api.example.com/v1",
        "apiKey": "sk-your-api-key",
        "auth": "api-key",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-4",
            "name": "GPT-4",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 128000,
            "maxTokens": 4096
          }
        ]
      }
    }
  }
}

关键字段说明

字段必填说明
baseUrl✅API 端点地址(不含 /v1/messages 等路径)
apiKey✅API 密钥
auth✅认证方式,通常为 api-key
api✅API 格式:anthropic-messages 或 openai-completions
models✅该供应商支持的模型列表
models[].id✅模型 ID(调用时使用)
models[].name❌显示名称
models[].contextWindow❌上下文窗口大小
models[].maxTokens❌最大输出 token 数
models[].reasoning❌是否支持推理模式

添加模型别名

在 agents.defaults.models 中添加别名:

json
{
  "agents": {
    "defaults": {
      "models": {
        "供应商/模型id": {
          "alias": "简短别名"
        }
      }
    }
  }
}

⚠️ 重要约束:alias 字段必须是字符串,不能是数组!

json
// ✅ 正确
"alias": "opus46"

// ❌ 错误 - 会导致 Config validation failed
"alias": ["opus46", "<provider>/model"]

如果需要多个别名指向同一模型,需要在 models 中添加多条记录:

json
"供应商/模型id": { "alias": "别名1" }

设置为默认模型

在 agents.defaults.model 中设置:

json
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "供应商/模型id",
        "fallbacks": [
          "备选供应商1/模型id",
          "备选供应商2/模型id"
        ]
      }
    }
  }
}

添加流程

  1. 获取供应商信息

    • Base URL
    • API Key
    • API 格式(Anthropic 或 OpenAI 兼容)
    • 支持的模型列表
  2. 使用 gateway config.patch 添加

    gateway config.patch 添加供应商配置
  3. 重启 Gateway 生效

    gateway restart
  4. 测试新模型

    session_status(model="新供应商/模型id")

常见中转站配置示例

Anapi (Anthropic 中转)
json
"anapi": {
  "baseUrl": "https://anapi.9w7.cn",
  "apiKey": "sk-xxx",
  "auth": "api-key",
  "api": "anthropic-messages",
  "models": [{"id": "opus-4.5", "name": "Opus 4.5", "contextWindow": 200000}]
}
智谱 ZAI
json
"zai": {
  "baseUrl": "https://open.bigmodel.cn/api/anthropic",
  "apiKey": "xxx.xxx",
  "auth": "api-key",
  "api": "anthropic-messages",
  "models": [{"id": "glm-4.7", "name": "GLM-4.7", "contextWindow": 200000}]
}
OpenRouter VIP
json
"openrouter-vip": {
  "baseUrl": "https://openrouter.vip/v1",
  "apiKey": "sk-xxx",
  "auth": "api-key",
  "api": "openai-completions",
  "models": [{"id": "gpt-5.2", "name": "GPT-5.2", "contextWindow": 200000}]
}
WOW (LinuxDo API 中转 - OpenAI 兼容)
json
"wow": {
  "baseUrl": "https://linuxdoapi-api-wow.223387.xyz/v1",
  "apiKey": "pass show api/wow",
  "auth": "api-key",
  "api": "openai-completions",
  "models": [
    {"id": "grok-4.1-thinking", "name": "grok-4.1-thinking", "reasoning": true, "contextWindow": 128000},
    {"id": "grok-imagine-1.0", "name": "grok-imagine-1.0", "input": ["text","image"], "contextWindow": 128000},
    {"id": "kimi-k2.5", "name": "kimi-k2.5", "contextWindow": 128000}
  ]
}

别名配置(agents.defaults.models):

json
"<provider>/kimi-k2.5": { "alias": "wow-k2.5" },
"<provider>/grok-4.1-thinking": { "alias": "wow-grok-4.1-thinking" },
"<provider>/grok-imagine-1.0": { "alias": "wow-grok-imagine-1.0" }

⚡ 同步 Auth Profiles(改 Key 后必做)

背景:OpenClaw 运行时优先读 ~/.openclaw/agents/<agent>/agent/auth-profiles.json 中缓存的 key,而非 openclaw.json。改了 openclaw.json 的 apiKey 后必须同步。

脚本:~/clawd/skills/api-provider-setup/scripts/sync-agent-auth.sh

bash
# 改了 openclaw.json 的 key 后,一键同步所有 agent
~/clawd/skills/api-provider-setup/scripts/sync-agent-auth.sh

# 只同步指定 provider(如改了 zai 的 key)
~/clawd/skills/api-provider-setup/scripts/sync-agent-auth.sh --provider zai

# 只同步指定 agent
~/clawd/skills/api-provider-setup/scripts/sync-agent-auth.sh --agent quant

# 预览(不实际修改)
~/clawd/skills/api-provider-setup/scripts/sync-agent-auth.sh --dry-run

# 同步后重启
openclaw gateway restart

配置优先级链:

auth-profiles.json (缓存key) > models.json (provider定义) > openclaw.json (全局配置)

完整改 Key 流程:

  1. 改 openclaw.json → models.providers.<provider>.apiKey
  2. 运行 sync-agent-auth.sh [--provider <name>]
  3. openclaw gateway restart

完整改模型流程:

  1. 改 openclaw.json → agents.list[] 或 agents.defaults.model
  2. 运行 sync-agent-auth.sh(清除旧 auth 缓存+错误计数)
  3. openclaw gateway restart

故障排查

  1. 401 Unauthorized - API Key 错误或过期
  2. 404 Not Found - baseUrl 路径错误或 API 格式不匹配
  3. 模型不存在 - 检查 models[].id 是否正确
  4. 格式错误 - 检查 api 字段是否匹配供应商的 API 格式

常见问题与解决方案

API 格式不匹配导致 404

症状:消息发送成功,但 AI 返回 404 status code (no body)

原因:供应商的 API 格式配置错误。

诊断:

bash
# 测试 Anthropic Messages API 格式
curl -X POST "https://your-api-endpoint/v1/messages" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"model-id","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'

# 测试 OpenAI Completions API 格式
curl -X POST "https://your-api-endpoint/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"model":"model-id","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'

解决:

  1. 确认供应商使用的 API 格式:

    • Anthropic 格式:使用 /v1/messages,请求体包含 messages 数组
    • OpenAI 格式:使用 /v1/chat/completions,请求体包含 messages 数组
  2. 修改 models.json 中的 api 字段:

    json
    {
      "providers": {
        "your-provider": {
          "api": "anthropic-messages"  // 或 "openai-completions"
        }
      }
    }
  3. 重启 Gateway:

    bash
    openclaw gateway restart

案例:

  • Anapi 使用 Anthropic Messages API,必须设置 "api": "anthropic-messages"
  • OpenRouter VIP 使用 OpenAI Completions API,必须设置 "api": "openai-completions"
  • 智谱 ZAI 使用 Anthropic Messages API,必须设置 "api": "anthropic-messages"

© aAAaqwq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/api-provider-setup of aAAaqwq/AGI-Super-Team.

  • SKILL.md
  • scripts/sync-agent-auth.sh

Open the folder on GitHubat commit 331ecd3

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in aAAaqwq/AGI-Super-Team, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Provider Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Provider Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Provider Setup this skillaAAaqwq/AGI-Super-Team1051 repos~1.8kAutomated safety check: PassMIT
Azure AI Projects Python SDKmicrosoft/skills3.1k6 repos~2.8kAutomated safety check: PassMIT
Dingo VerifyMigoXLab/dingo757—~833Automated safety check: PassApache-2.0
Agnes Free Textkangarooking/agnes-free-model-skills198—~630Automated safety check: PassMIT
Openai Docstheowenyoung/home1151 repos~1.4kAutomated safety check: PassApache-2.0
Instructor Structured LLM OutputsOrchestra-Research/AI-Research-SKILLs13k7 repos~4.2kAutomated safety check: PassMIT

Similar skills

  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub starsUsed in 6 repos~2.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~833 tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Agnes Free Text

    kangarooking/agnes-free-model-skills

    Call the free Agnes text model API for chat completions, streaming answers, coding help, tool-calling experiments, and OpenAI-compatible text generation.

    198 GitHub stars~630 tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • Openai Docs

    theowenyoung/home

    A skill your agent uses for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or…

    115 GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Instructor Structured LLM Outputs

    Orchestra-Research/AI-Research-SKILLs

    Shows how to pull validated, typed data out of LLM responses with Instructor and Pydantic models, including retries on failure and partial streaming.

    13k GitHub starsUsed in 7 repos~4.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Fastllm Gateway

    azrtydxb/Fastllm-proxy

    Send inference requests through the FastLLM OpenAI-compatible gateway — chat completions, completions, embeddings, rerank, score, responses, moderations, audio speech and transcription, image…

    108 GitHub stars~926 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from aAAaqwq/AGI-Super-Team

All 161 skills in this repo
  • Content Creator

    aAAaqwq/AGI-Super-Team

    Create SEO-optimized marketing content with consistent brand voice.

    105 GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • Financial Calculator

    aAAaqwq/AGI-Super-Team

    Advanced financial calculator with future value tables, present value, discount calculations, markup pricing, and compound interest.

    105 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Performing Security Code Review

    aAAaqwq/AGI-Super-Team

    This skill provides automated assistance for security agent tasks Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    105 GitHub starsUsed in 1 repo~920 tokens
    Auto-check passed
  • Frontend Design Ultimate

    aAAaqwq/AGI-Super-Team

    Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed.

    105 GitHub starsUsed in 2 repos~2.7k tokens
    Auto-check passed
  • Sysadmin Toolbox

    aAAaqwq/AGI-Super-Team

    Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks.

    105 GitHub starsUsed in 2 repos~775 tokens
    Auto-check passed
  • Zsxq Smart Publish

    aAAaqwq/AGI-Super-Team

    Publish and manage content on 知识星球 (zsxq.com). An agent skill from aAAaqwq/AGI-Super-Team.

    105 GitHub stars~1.5k tokensUpdated 10 days ago
    Auto-check passed

Works with

Questions about API Provider Setup

What does API Provider Setup do?

添加和配置第三方 API 中转站供应商到 OpenClaw。当用户需要添加新的 API 供应商、配置中转站、设置自定义模型端点时使用此技能。支持 Anthropic 兼容和 OpenAI 兼容的 API 格式。. API Provider Setup is an agent skill from aAAaqwq/AGI-Super-Team.

When should I use API Provider Setup?

API Provider Setup fits situations like: tasks that involve LLM API integration.

How do I install API Provider Setup in Claude Code?

Run `npx skills add aAAaqwq/AGI-Super-Team --skill api-provider-setup -a claude-code`. Or copy the skill folder (skills/api-provider-setup in aAAaqwq/AGI-Super-Team) into .claude/skills/api-provider-setup in your project. Claude Code loads it when a task matches its description.

How do I install API Provider Setup in Codex?

Run `npx skills add aAAaqwq/AGI-Super-Team --skill api-provider-setup -a codex`. Or copy the skill folder (skills/api-provider-setup in aAAaqwq/AGI-Super-Team) into .agents/skills/api-provider-setup in your project. Codex loads it when a task matches its description.

Can I use API Provider Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aAAaqwq/AGI-Super-Team --skill api-provider-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-provider-setup, .gemini/skills/api-provider-setup, .github/skills/api-provider-setup and .opencode/skills/api-provider-setup in your project.

What does API Provider Setup need to run?

Going by SKILL.md and its folder, API Provider Setup needs a shell for the scripts in its folder and the command-line tools its instructions call (curl). Our summary lists: A Bash shell; A credential in YOUR_API_KEY.

Does API Provider Setup access the network?

SKILL.md names 4 domains. In commands or code: anapi.9w7.cn, open.bigmodel.cn, openrouter.vip and linuxdoapi-api-wow.223387.xyz; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is API Provider Setup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does API Provider Setup use?

API Provider Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Provider Setup use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Provider Setup?

Skills that share tags, products or a category with API Provider Setup: Azure AI Projects Python SDK (microsoft/skills, 3.1k stars), Dingo Verify (MigoXLab/dingo, 757 stars), Agnes Free Text (kangarooking/agnes-free-model-skills, 198 stars) and Openai Docs (theowenyoung/home, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Provider Setup?

aAAaqwq (a GitHub user) maintains it in aAAaqwq/AGI-Super-Team, which has 105 GitHub stars. The repository holds 161 skills in this directory. The repository was last updated on September 27, 2026.

Source: aAAaqwq/AGI-Super-Team on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.