
Wraps the Coze API from ByteDance for building integrations with their AI agent platform. You get both streaming and non-streaming chat endpoints, workflow execution, and conversation history management. The skill includes complete Python examples showing how to authenticate with personal access tokens, poll for completion status in non-streaming mode, and handle server-sent events when streaming responses. One thing to note: streaming mode forces auto_save_history to false, while non-streaming requires it true, which feels like an odd API design choice. The documentation is thorough with actual code you can copy, including the full polling loop pattern you'll need since their non-streaming endpoint doesn't block until completion.
$ npx -y skills add smallnest/langgraphgo --skill coze-api --agent claude-codeInstalls into .claude/skills of the current project.
扣子(Coze)是字节跳动推出的 AI 智能体开发平台,本 Skill 提供完整的 Coze API 调用指南。
在使用 Coze API 前需要完成以下准备:
获取访问令牌 (Personal Access Token)
获取 Bot ID
https://www.coze.cn/space/123/bot/73482933347348293334发布 Bot 为 API 服务
API 基础 URL
https://api.coze.cn认证方式
Authorization: Bearer {YOUR_PAT_TOKEN}
Content-Type: application/json
使用限制
发起一次完整对话,等待完整结果后返回。
API 端点
POST https://api.coze.cn/v3/chat
Python 示例代码
import requests
import json
API_URL = "https://api.coze.cn/v3/chat"
RETRIEVE_URL = "https://api.coze.cn/v3/chat/retrieve"
MESSAGE_LIST_URL = "https://api.coze.cn/v3/chat/message/list"
# 配置参数
PAT_TOKEN = "YOUR_PAT_TOKEN"
BOT_ID = "YOUR_BOT_ID"
USER_ID = "unique_user_id"
Sponsors