目前没有其他比较好的方式免费使用claude-sonnet-4-20250514模型了, 但是使用其他模型效果没有这么好, 我也是刚开始使用, 可能会封号.
使用方法:
- 先登录kiro编辑器
- GitHub - zhalice2011/ki2api: RT 运行docker
https://github.com/zhalice2011/ki2api.git
git clone https://github.com/zhalice2011/ki2api.git
cd ki2api
docker-compose up -d

启动起来就可以得到如下的API
“api_base_url”: “http://localhost:8989/v1/chat/completions”,
“api_key”: “ki2api-key-2024”,
对API进行测试
curl -X POST http://localhost:8989/v1/chat/completions \
-H "Authorization: Bearer ki2api-key-2024" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{"role": "user", "content": "你好,请介绍一下自己"}
],
"max_tokens": 1000
}'
可以搭配claude-code-router进行使用claude code

claude code 使用效果

可以参考两位大佬的项目
GitHub - justhil/kiro2api
https://github.com/justhil/kiro2api
GitHub - bestK/kiro2cc: kiro to claude code
https://github.com/bestK/kiro2cc
Kiro安装包
Win:https://prod.download.desktop.kiro.dev/releases/202507162021-Kiro-win32-x64.exe
Mac:https://prod.download.desktop.kiro.dev/releases/202507152330-Kiro-dmg-darwin-arm64.dmg
Cherry Studio
配置:

使用效果:

重新编译docker, 重新运行
关闭
docker-compose down
编译&重启
docker-compose up -d --build
查看日志:
docker logs -f ki2api-ki2api-1