环境变量shell
export APIYP_BASE_URL="https://api.example.com/v1"
export APIYP_API_KEY="YOUR_API_KEY"
export APIYP_MODEL="YOUR_MODEL_NAME"API Connection Kit
输入服务商参数后,本页会把 Base URL 和模型名代入配置。默认不保存、不上传 API Key;开启直拷模式才会把 Key 写入复制结果。
Cline · macOS
选择 OpenAI Compatible provider 后填入 Base URL、API Key 和模型名。
export APIYP_BASE_URL="https://api.example.com/v1"
export APIYP_API_KEY="YOUR_API_KEY"
export APIYP_MODEL="YOUR_MODEL_NAME"Provider: OpenAI Compatible
Base URL: https://api.example.com/v1
API Key: YOUR_API_KEY
Model ID: YOUR_MODEL_NAMEcurl "https://api.example.com/v1/chat/completions" \
-H "Authorization: Bearer $APIYP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_MODEL_NAME","messages":[{"role":"user","content":"Say ok in one short sentence."}]}'