@acedatacloud/skills 2026.629.3 → 2026.630.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.629.3",
3
+ "version": "2026.630.1",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -1,113 +1,81 @@
1
1
  ---
2
2
  name: ai-chat
3
- description: Access 50+ LLM models through a unified OpenAI-compatible API via AceDataCloud. Use when you need chat completions from GPT, Claude, Gemini, Kimi, Grok, or other models through a single endpoint. Supports streaming, function calling, and vision.
3
+ description: Access 50+ LLM models through AceDataCloud's unified chat APIs. Use when you need OpenAI-compatible chat/responses calls or the newer `/aichat2/conversations` API across GPT, Claude, Gemini, Grok, Kimi, GLM, and DeepSeek models. Supports streaming, multimodal input, and tool calling.
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: acedatacloud
7
7
  version: "1.0"
8
- compatibility: Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md). Works as a drop-in replacement for the OpenAI SDK.
8
+ compatibility: Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md). Works with OpenAI-compatible SDKs against the `/openai/*` routes.
9
9
  ---
10
10
 
11
11
  # AI Chat — Unified LLM Gateway
12
12
 
13
- Access 50+ language models through a single OpenAI-compatible endpoint via AceDataCloud.
13
+ AceDataCloud exposes two documented chat surfaces:
14
+
15
+ | Endpoint | Use For |
16
+ |----------|---------|
17
+ | `POST /aichat2/conversations` | Recommended stateful / multimodal / agentic conversations |
18
+ | `POST /aichat/conversations` | Legacy conversation endpoint |
19
+ | `POST /openai/chat/completions` | OpenAI-compatible stateless chat completions |
20
+ | `POST /openai/responses` | OpenAI-compatible responses API |
14
21
 
15
22
  > **Setup:** See [authentication](../_shared/authentication.md) for token setup.
16
23
 
17
24
  ## Quick Start
18
25
 
26
+ ### Recommended: stateful conversations
27
+
19
28
  ```bash
20
- curl -X POST https://api.acedata.cloud/v1/chat/completions \
21
- -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
29
+ curl -X POST https://api.acedata.cloud/aichat2/conversations \
30
+ -H "Authorization: ******ACEDATACLOUD_API_TOKEN" \
22
31
  -H "Content-Type: application/json" \
23
- -d '{"model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "Hello!"}]}'
32
+ -d '{"model":"gpt-4.1","question":"Summarize the latest release notes.","stateful":true}'
24
33
  ```
25
34
 
26
- ## OpenAI SDK Drop-in
35
+ ### OpenAI-compatible SDK
27
36
 
28
37
  ```python
29
38
  from openai import OpenAI
30
39
 
31
40
  client = OpenAI(
32
41
  api_key="your-token-here",
33
- base_url="https://api.acedata.cloud/v1"
42
+ base_url="https://api.acedata.cloud/openai"
34
43
  )
35
44
 
36
45
  response = client.chat.completions.create(
37
- model="gpt-4.1",
46
+ model="gpt-5.5",
38
47
  messages=[{"role": "user", "content": "Explain quantum computing"}]
39
48
  )
40
49
  print(response.choices[0].message.content)
41
50
  ```
42
51
 
43
- ## Available Models
44
-
45
- ### OpenAI GPT
46
-
47
- | Model | Type | Best For |
48
- |-------|------|----------|
49
- | `gpt-4.1` | Latest | General-purpose, high quality |
50
- | `gpt-4.1-mini` | Small | Fast, cost-effective |
51
- | `gpt-4.1-nano` | Tiny | Ultra-fast, lowest cost |
52
- | `gpt-4o` | Multimodal | Vision + text |
53
- | `gpt-4o-mini` | Small multimodal | Fast vision tasks |
54
- | `o1` | Reasoning | Complex reasoning tasks |
55
- | `o1-mini` | Small reasoning | Quick reasoning |
56
- | `o1-pro` | Pro reasoning | Advanced reasoning |
57
- | `gpt-5` | Latest gen | Next-gen intelligence |
58
- | `gpt-5.4` | Gen 5.4 | High-performance next-gen |
59
- | `gpt-5-mini` | Mini gen 5 | Fast next-gen |
60
-
61
- ### Anthropic Claude
62
-
63
- | Model | Type | Best For |
64
- |-------|------|----------|
65
- | `claude-opus-4-8` | Latest Opus | Highest capability |
66
- | `claude-opus-4-6` | Latest Opus | Highest capability |
67
- | `claude-sonnet-4-6` | Latest Sonnet | Balanced quality/speed |
68
- | `claude-opus-4-5-20251101` | Opus 4.5 | Premium tasks |
69
- | `claude-sonnet-4-5-20250929` | Sonnet 4.5 | High-quality balance |
70
- | `claude-sonnet-4-20250514` | Sonnet 4 | Reliable general-purpose |
71
- | `claude-haiku-4-5-20251001` | Haiku 4.5 | Fast, efficient |
72
- | `claude-3-5-sonnet-20241022` | Legacy 3.5 | Proven track record |
73
- | `claude-3-opus-20240229` | Legacy Opus | Maximum quality (legacy) |
74
-
75
- ### Google Gemini
76
-
77
- | Model | Best For |
78
- |-------|----------|
79
- | `gemini-1.5-pro` | Long context, complex tasks |
80
- | `gemini-1.5-flash` | Fast, efficient |
81
-
82
- ### xAI Grok
83
-
84
- | Model | Best For |
85
- |-------|----------|
86
- | `grok-4` | Latest, highest capability |
87
- | `grok-3` | General-purpose |
88
- | `grok-3-fast` | Speed-optimized |
89
- | `grok-3-mini` | Compact, efficient |
90
-
91
- ## Features
92
-
93
- ### Streaming
52
+ ## Currently Documented Model Families
94
53
 
95
- ```json
96
- POST /v1/chat/completions
97
- {
98
- "model": "claude-sonnet-4-20250514",
99
- "messages": [{"role": "user", "content": "Write a story"}],
100
- "stream": true
101
- }
102
- ```
54
+ The OpenAPI specs expose a broad, fast-moving model catalog. Representative current
55
+ models include:
56
+
57
+ | Family | Current examples |
58
+ |--------|------------------|
59
+ | OpenAI / reasoning | `gpt-5.5`, `gpt-5.5-pro`, `gpt-5.4`, `gpt-5.4-pro`, `gpt-5.2`, `gpt-5.1`, `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-4o`, `gpt-4o-mini`, `o1`, `o3`, `o4-mini` |
60
+ | OpenAI free-tier chat-completions | `gpt-5.5:free`, `gpt-5:free`, `gpt-4.1:free`, `gpt-4o:free`, `gpt-4o-mini:free`, `gpt-oss:free` |
61
+ | Claude | `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-opus-4-5-20251101`, `claude-sonnet-4-6`, `claude-sonnet-4-5-20250929`, `claude-sonnet-4-20250514`, `claude-haiku-4-5-20251001`, `claude-3-7-sonnet-20250219` |
62
+ | Gemini | `gemini-3.1-pro`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-image-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3-pro-preview`, `gemini-2.5-flash-lite`, `gemini-2.0-flash-lite` |
63
+ | Grok | `grok-4`, `grok-4-0709`, `grok-3`, `grok-3-fast` |
64
+ | DeepSeek | `deepseek-r1`, `deepseek-r1-0528`, `deepseek-v3`, `deepseek-v3-250324`, `deepseek-v3.2-exp`, `deepseek-v4-flash` |
65
+ | Kimi | `kimi-k2.5`, `kimi-k2-thinking-turbo`, `kimi-k2-thinking`, `kimi-k2-instruct-0905`, `kimi-k2-0905-preview`, `kimi-k2-turbo-preview`, `kimi-k2-0711-preview` |
66
+ | GLM | `glm-5.2`, `glm-5.1`, `glm-5`, `glm-5-turbo`, `glm-4.7`, `glm-4.6`, `glm-4.5`, `glm-4.5v`, `glm-3-turbo` |
67
+
68
+ `/aichat2/conversations` also accepts `model_group` values
69
+ `chatgpt`, `claude`, `gemini`, `grok`, `kimi`, `glm`, and `deepseek`.
103
70
 
104
- ### Function Calling
71
+ ## OpenAI-Compatible Chat
105
72
 
106
73
  ```json
107
- POST /v1/chat/completions
74
+ POST /openai/chat/completions
108
75
  {
109
76
  "model": "gpt-4.1",
110
- "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}],
77
+ "messages": [{"role": "user", "content": "Write a haiku about observability."}],
78
+ "stream": true,
111
79
  "tools": [
112
80
  {
113
81
  "type": "function",
@@ -120,84 +88,61 @@ POST /v1/chat/completions
120
88
  }
121
89
  ```
122
90
 
123
- ### Vision
124
-
125
- ```json
126
- POST /v1/chat/completions
127
- {
128
- "model": "gpt-4o",
129
- "messages": [
130
- {
131
- "role": "user",
132
- "content": [
133
- {"type": "text", "text": "What's in this image?"},
134
- {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
135
- ]
136
- }
137
- ]
138
- }
139
- ```
140
-
141
- ## Parameters
91
+ Common parameters:
142
92
 
143
93
  | Parameter | Type | Description |
144
94
  |-----------|------|-------------|
145
- | `model` | string | Model name (see tables above) |
146
- | `messages` | array | Array of `{role, content}` objects |
147
- | `temperature` | 0–2 | Randomness (default: 1) |
148
- | `top_p` | 0–1 | Nucleus sampling |
149
- | `max_tokens` | integer | Maximum output tokens |
95
+ | `model` | string | One of the documented OpenAI-compatible models |
96
+ | `messages` | array | Standard OpenAI chat message list |
97
+ | `temperature` / `top_p` | number | Sampling controls |
98
+ | `max_tokens` | integer | Output cap |
150
99
  | `stream` | boolean | Enable SSE streaming |
151
- | `tools` | array | Function calling definitions |
152
- | `tool_choice` | string/object | Tool selection strategy |
100
+ | `tools` / `tool_choice` | array / string-object | Function-calling controls |
101
+ | `service_tier` | string | Processing tier (`auto`, `default`, `flex`, `scale`, `priority`) |
102
+
103
+ ## Stateful / Agentic Conversations
153
104
 
154
- ## Response
105
+ `POST /aichat2/conversations` generalizes the legacy conversation API with
106
+ multimodal user content, CRUD-style actions, and server-side conversation state.
155
107
 
156
108
  ```json
109
+ POST /aichat2/conversations
157
110
  {
158
- "id": "chatcmpl-xxx",
159
- "object": "chat.completion",
160
- "model": "claude-sonnet-4-20250514",
161
- "choices": [
162
- {
163
- "index": 0,
164
- "message": {"role": "assistant", "content": "Hello!"},
165
- "finish_reason": "stop"
166
- }
111
+ "action": "chat",
112
+ "model": "claude-sonnet-4-6",
113
+ "message": [
114
+ {"type": "text", "text": "Describe this image."},
115
+ {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
167
116
  ],
168
- "usage": {
169
- "prompt_tokens": 10,
170
- "completion_tokens": 5,
171
- "total_tokens": 15
172
- }
117
+ "stateful": true,
118
+ "allowed_skills": ["google-search"],
119
+ "allowed_mcp_servers": ["mcp-google-search"]
173
120
  }
174
121
  ```
175
122
 
176
- ## Gotchas
177
-
178
- - **100% OpenAI-compatible** — use the standard OpenAI SDK with `base_url="https://api.acedata.cloud/v1"`
179
- - Billing is token-based with per-model pricing (more expensive models cost more per token)
180
- - Vision is supported on multimodal models (`gpt-4o`, `gpt-4o-mini`, `grok-2-vision-*`)
181
- - Function calling works on most modern models (GPT-4+, Claude 3+)
182
- - Streaming returns `chat.completion.chunk` objects via SSE
183
- - `finish_reason` values: `"stop"` (complete), `"length"` (max tokens), `"tool_calls"` (function call), `"content_filter"` (filtered)
184
-
185
- ## Stateful Conversations Endpoint
186
-
187
- For stateful, session-based chat (no need to send the full history each time), use `POST /aichat2/conversations` (recommended). `POST /aichat/conversations` remains available for legacy compatibility.
188
-
189
- ```bash
190
- curl -X POST https://api.acedata.cloud/aichat2/conversations \
191
- -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
192
- -H "Content-Type: application/json" \
193
- -d '{"model": "gpt-4.1", "question": "What is quantum computing?", "stateful": true}'
194
- ```
123
+ Useful parameters:
195
124
 
196
125
  | Parameter | Type | Description |
197
126
  |-----------|------|-------------|
198
- | `model` | string | Model name (see Available Models above) |
199
- | `question` | string | The prompt or question to answer |
200
- | `id` | string | Conversation ID pass the same ID to continue a session |
201
- | `preset` | string | Preset/system prompt for the conversation |
202
- | `stateful` | boolean | Enable stateful conversation (maintains history server-side) |
203
- | `references` | array | Additional context documents to include |
127
+ | `action` | string | `chat`, `retrieve`, `retrieve_batch`, `update`, `delete` |
128
+ | `model` | string | Model name |
129
+ | `question` | string | Simple text prompt |
130
+ | `message` | string or array | Multimodal content using `text`, `image_url`, or `file_url` items |
131
+ | `stateful` | boolean | Keep conversation history server-side |
132
+ | `references` | array | Extra context documents |
133
+ | `preset` | string | Preset/system prompt |
134
+ | `max_turns` | integer | Trim retained turn history |
135
+ | `allowed_skills` / `allowed_mcp_servers` | array | Restrict tool-use scope |
136
+ | `unattended_policy` | object | Tool-use permission policy |
137
+ | `tool_results` | array | Return results for previously requested tool calls |
138
+ | `model_group` | string | Family selector (`chatgpt`, `claude`, `gemini`, `grok`, `kimi`, `glm`, `deepseek`) |
139
+ | `offset` / `limit` | integer | Pagination for retrieval actions |
140
+ | `callback_url` / `async` | string / boolean | Async execution |
141
+
142
+ ## Gotchas
143
+
144
+ - The documented OpenAI-compatible routes live under `/openai/*`, not `/v1/*`.
145
+ - `POST /aichat2/conversations` is the recommended stateful endpoint; `POST /aichat/conversations` remains for legacy clients.
146
+ - `message` on `/aichat2/conversations` can be multimodal (`text`, `image_url`, `file_url`); plain `question` still works for simple text prompts.
147
+ - `action` on `/aichat2/conversations` is not chat-only — it also supports `retrieve`, `retrieve_batch`, `update`, and `delete`.
148
+ - Free-tier model variants such as `gpt-5.5:free` are documented on `/openai/chat/completions`.
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: feishu
3
+ description: Read and write Feishu (飞书) docs, sheets, Base (bitable), Drive files, calendar events, tasks, wiki, and IM messages via the Feishu Open Platform REST API. Use when the user mentions 飞书 / Feishu / Lark, a Feishu document or sheet link, their Feishu calendar, or wants to send a Feishu message.
4
+ when_to_use: |
5
+ Trigger when the user wants to read or write something in Feishu (飞书) —
6
+ summarize / create / edit a doc, read or append to a spreadsheet, query
7
+ or add Base (bitable) records, browse Drive files, look at or create
8
+ calendar events, manage tasks, read wiki nodes, or send an IM message.
9
+ connections: [feishu]
10
+ allowed_tools: [Bash]
11
+ license: Apache-2.0
12
+ metadata:
13
+ author: acedatacloud
14
+ version: "1.0"
15
+ ---
16
+
17
+ We drive the [Feishu Open Platform API](https://open.feishu.cn/document)
18
+ with `curl + jq`. The user's OAuth `user_access_token` is in
19
+ `$FEISHU_TOKEN`; every call sends it as `Authorization: Bearer
20
+ $FEISHU_TOKEN`. All endpoints live under `https://open.feishu.cn/open-apis`.
21
+
22
+ Calls run **in the user's context** (their docs, calendar, messages) — only
23
+ data the user can access and only the scopes they granted at connect time
24
+ (docs / sheets / base / drive / calendar / IM / wiki / task / contacts).
25
+
26
+ ## Response shape & error handling
27
+
28
+ Every Feishu response is `{"code": 0, "msg": "success", "data": {…}}`.
29
+ **`code == 0` means success**; any non-zero `code` is an error — surface
30
+ `msg` to the user. Always check it:
31
+
32
+ ```sh
33
+ resp=$(curl -sS … )
34
+ echo "$resp" | jq 'if .code == 0 then .data else error("Feishu \(.code): \(.msg)") end'
35
+ ```
36
+
37
+ Common error codes:
38
+
39
+ | code | meaning | what to do |
40
+ |---|---|---|
41
+ | `99991663` / `99991668` | access token invalid / expired | tell the user to reconnect Feishu in 连接 settings |
42
+ | `99991661` | no permission (scope not granted) | the connect-time scope is missing — reconnect and grant it |
43
+ | `1254xxx` | resource not found / no access | the user can't see that doc / sheet / app — double-check the token/id |
44
+
45
+ ## Recipes
46
+
47
+ ### Verify auth (always run first)
48
+
49
+ ```sh
50
+ curl -sS https://open.feishu.cn/open-apis/authen/v1/user_info \
51
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
52
+ | jq 'if .code == 0 then {name: .data.name, open_id: .data.open_id, email: .data.email} else . end'
53
+ ```
54
+
55
+ ### Docs (docx)
56
+
57
+ A Feishu doc URL looks like `https://…feishu.cn/docx/<document_id>`. The
58
+ `document_id` is the last path segment.
59
+
60
+ Read a document's plain text:
61
+
62
+ ```sh
63
+ curl -sS "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/raw_content" \
64
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
65
+ | jq -r 'if .code == 0 then .data.content else "ERR \(.code): \(.msg)" end'
66
+ ```
67
+
68
+ List a document's blocks (structured content):
69
+
70
+ ```sh
71
+ curl -sS "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/blocks?page_size=500" \
72
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
73
+ | jq 'if .code == 0 then [.data.items[] | {block_id, block_type}] else . end'
74
+ ```
75
+
76
+ Create a new empty document (optionally inside a folder):
77
+
78
+ ```sh
79
+ curl -sS -X POST "https://open.feishu.cn/open-apis/docx/v1/documents" \
80
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
81
+ -H "Content-Type: application/json" \
82
+ -d "$(jq -nc --arg title "会议纪要 2026-07-01" '{title: $title}')" \
83
+ | jq 'if .code == 0 then {document_id: .data.document.document_id} else . end'
84
+ ```
85
+
86
+ Append a text block to a document (insert at the end of the document body —
87
+ `DOCUMENT_ID` is also the root block id):
88
+
89
+ ```sh
90
+ curl -sS -X POST "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/blocks/DOCUMENT_ID/children" \
91
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
92
+ -H "Content-Type: application/json" \
93
+ -d "$(jq -nc --arg text "由助手追加的一段内容。" '
94
+ {children: [{block_type: 2, text: {elements: [{text_run: {content: $text}}]}}]}')" \
95
+ | jq 'if .code == 0 then "appended" else . end'
96
+ ```
97
+
98
+ ### Spreadsheets (sheets v2)
99
+
100
+ A sheet URL looks like `https://…feishu.cn/sheets/<spreadsheet_token>`.
101
+ A range is `<sheetId>!<A1:range>`, e.g. `abc123!A1:D10`. List sheet ids via
102
+ the metainfo endpoint first if you don't have one.
103
+
104
+ Read a range:
105
+
106
+ ```sh
107
+ curl -sS "https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/SPREADSHEET_TOKEN/values/RANGE" \
108
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
109
+ | jq 'if .code == 0 then .data.valueRange.values else . end'
110
+ ```
111
+
112
+ Append rows after the last non-empty row:
113
+
114
+ ```sh
115
+ curl -sS -X POST "https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/SPREADSHEET_TOKEN/values_append" \
116
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
117
+ -H "Content-Type: application/json" \
118
+ -d "$(jq -nc '{valueRange: {range: "SHEET_ID!A1:B1", values: [["张三", 100], ["李四", 200]]}}')" \
119
+ | jq 'if .code == 0 then .data.updates else . end'
120
+ ```
121
+
122
+ ### Base / 多维表格 (bitable v1)
123
+
124
+ A Base URL looks like `https://…feishu.cn/base/<app_token>`. Get `table_id`
125
+ from `…/bitable/v1/apps/APP_TOKEN/tables`.
126
+
127
+ List records:
128
+
129
+ ```sh
130
+ curl -sS "https://open.feishu.cn/open-apis/bitable/v1/apps/APP_TOKEN/tables/TABLE_ID/records?page_size=100" \
131
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
132
+ | jq 'if .code == 0 then [.data.items[] | {record_id, fields}] else . end'
133
+ ```
134
+
135
+ Create a record:
136
+
137
+ ```sh
138
+ curl -sS -X POST "https://open.feishu.cn/open-apis/bitable/v1/apps/APP_TOKEN/tables/TABLE_ID/records" \
139
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
140
+ -H "Content-Type: application/json" \
141
+ -d "$(jq -nc '{fields: {"标题": "新任务", "状态": "待办"}}')" \
142
+ | jq 'if .code == 0 then {record_id: .data.record.record_id} else . end'
143
+ ```
144
+
145
+ ### Drive files
146
+
147
+ List files in a folder (omit `folder_token` for the root):
148
+
149
+ ```sh
150
+ curl -sS "https://open.feishu.cn/open-apis/drive/v1/files?folder_token=FOLDER_TOKEN&page_size=50" \
151
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
152
+ | jq 'if .code == 0 then [.data.files[] | {name, type, token, url}] else . end'
153
+ ```
154
+
155
+ ### Calendar (v4)
156
+
157
+ List the user's calendars (the primary one has `type: "primary"`):
158
+
159
+ ```sh
160
+ curl -sS "https://open.feishu.cn/open-apis/calendar/v4/calendars?page_size=50" \
161
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
162
+ | jq 'if .code == 0 then [.data.calendar_list[] | {calendar_id, summary, type}] else . end'
163
+ ```
164
+
165
+ List events in a time window (epoch-seconds strings):
166
+
167
+ ```sh
168
+ curl -sS "https://open.feishu.cn/open-apis/calendar/v4/calendars/CALENDAR_ID/events?start_time=1751299200&end_time=1751385600&page_size=100" \
169
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
170
+ | jq 'if .code == 0 then [.data.items[] | {summary, start: .start_time, end: .end_time, event_id}] else . end'
171
+ ```
172
+
173
+ Create an event (times are epoch-seconds strings):
174
+
175
+ ```sh
176
+ curl -sS -X POST "https://open.feishu.cn/open-apis/calendar/v4/calendars/CALENDAR_ID/events" \
177
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
178
+ -H "Content-Type: application/json" \
179
+ -d "$(jq -nc '{summary: "项目评审", start_time: {timestamp: "1751302800"}, end_time: {timestamp: "1751306400"}}')" \
180
+ | jq 'if .code == 0 then {event_id: .data.event.event_id} else . end'
181
+ ```
182
+
183
+ ### Tasks (v2)
184
+
185
+ List the user's tasks:
186
+
187
+ ```sh
188
+ curl -sS "https://open.feishu.cn/open-apis/task/v2/tasks?page_size=50" \
189
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
190
+ | jq 'if .code == 0 then [.data.items[] | {summary, completed_at, task_guid: .guid}] else . end'
191
+ ```
192
+
193
+ Create a task:
194
+
195
+ ```sh
196
+ curl -sS -X POST "https://open.feishu.cn/open-apis/task/v2/tasks" \
197
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
198
+ -H "Content-Type: application/json" \
199
+ -d "$(jq -nc '{summary: "准备周会材料"}')" \
200
+ | jq 'if .code == 0 then {task_guid: .data.task.guid} else . end'
201
+ ```
202
+
203
+ ### Wiki
204
+
205
+ List wiki spaces, then nodes within a space:
206
+
207
+ ```sh
208
+ curl -sS "https://open.feishu.cn/open-apis/wiki/v2/spaces?page_size=50" \
209
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
210
+ | jq 'if .code == 0 then [.data.items[] | {space_id, name}] else . end'
211
+
212
+ curl -sS "https://open.feishu.cn/open-apis/wiki/v2/spaces/SPACE_ID/nodes?page_size=50" \
213
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
214
+ | jq 'if .code == 0 then [.data.items[] | {title, node_token, obj_type}] else . end'
215
+ ```
216
+
217
+ ### Send an IM message
218
+
219
+ Send to a user by `open_id` (use `receive_id_type=chat_id` for a group
220
+ chat). `content` must be a JSON **string**, so it's double-encoded:
221
+
222
+ ```sh
223
+ curl -sS -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
224
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
225
+ -H "Content-Type: application/json" \
226
+ -d "$(jq -nc --arg rid "ou_xxx" --arg text "你好,这是助手发送的消息。" '
227
+ {receive_id: $rid, msg_type: "text", content: ({text: $text} | tostring)}')" \
228
+ | jq 'if .code == 0 then {message_id: .data.message_id} else . end'
229
+ ```
230
+
231
+ ## Notes
232
+
233
+ - Confirm destructive or outward-facing actions (sending a message,
234
+ creating a calendar invite, posting to a shared doc) with the user
235
+ before running them.
236
+ - Pagination: list endpoints return `data.page_token` / `data.has_more`;
237
+ pass `page_token=…` to fetch the next page.
238
+ - When the user pastes a Feishu link, extract the token/id from the URL
239
+ path rather than asking them for it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fish-audio
3
- description: Generate AI text-to-speech audio and clone voices with Fish Audio via AceDataCloud API. Use when creating voiceover/narration audio (TTS), synthesizing speech, or cloning a reference voice. Chinese + multilingual.
3
+ description: Generate AI text-to-speech audio with Fish Audio and browse public reference voices via AceDataCloud API. Use when creating voiceover/narration audio (TTS), synthesizing multilingual speech, or selecting a Fish reference voice from the model catalog.
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: acedatacloud
@@ -8,76 +8,111 @@ metadata:
8
8
  compatibility: Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md).
9
9
  ---
10
10
 
11
- # Fish Audio — Text-to-Speech & Voice Cloning
11
+ # Fish Audio — Text-to-Speech
12
12
 
13
- Generate narration / voiceover and clone voices through AceDataCloud's Fish Audio API.
13
+ Generate narration / voiceover through AceDataCloud's Fish Audio API.
14
14
 
15
15
  > **Setup:** See [authentication](../_shared/authentication.md) for token setup.
16
16
 
17
- ## Quick Start (TTS — synchronous, ~3s)
17
+ ## Quick Start
18
18
 
19
19
  ```bash
20
- curl -X POST https://api.acedata.cloud/fish/audios \
21
- -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
20
+ curl -X POST https://api.acedata.cloud/fish/tts \
21
+ -H "Authorization: ******ACEDATACLOUD_API_TOKEN" \
22
22
  -H "Content-Type: application/json" \
23
- -d '{"action":"speech","model":"fish-tts","voice_id":"543e4181d81b4ef6874b0e8fbdf27c78","prompt":"你好,欢迎使用 AceData Cloud。"}'
23
+ -H "model: s2-pro" \
24
+ -d '{"text":"你好,欢迎使用 AceData Cloud。","reference_id":"d7900c21663f485ab63ebdb7e5905036","format":"mp3"}'
24
25
  ```
25
26
 
26
- Response (synchronous no polling needed for `speech`):
27
+ Synchronous responses return a direct audio URL:
27
28
 
28
29
  ```json
29
- {"success": true, "data": [{"audio_url": "https://platform.r2.fish.audio/task/....mp3"}]}
30
+ {"audio_url":"https://platform.r2.fish.audio/task/8a72ff9840234006a9f74cb2fa04f978.mp3"}
30
31
  ```
31
32
 
32
- → download `data[0].audio_url`. `voice_id` is **required**. A good default Mandarin
33
- news-anchor voice is **`543e4181d81b4ef6874b0e8fbdf27c78`**.
34
-
35
33
  ## Endpoints
36
34
 
37
35
  | Endpoint | Purpose |
38
36
  |----------|---------|
39
- | `POST /fish/audios` | TTS (`action: "speech"`) synchronous |
40
- | `POST /fish/voices` | List / register (clone) voices |
37
+ | `POST /fish/tts` | Text-to-speech generation |
38
+ | `GET /fish/model` | Browse/search public Fish reference voices |
39
+ | `POST /fish/tasks` | Poll async TTS jobs when `async: true` |
41
40
 
42
41
  ## Workflows
43
42
 
44
- ### 1. Text-to-Speech (the common case)
43
+ ### 1. Find a reference voice
44
+
45
+ ```bash
46
+ curl "https://api.acedata.cloud/fish/model?page_size=10&page_number=1&title=Marcus" \
47
+ -H "Authorization: ******ACEDATACLOUD_API_TOKEN"
48
+ ```
49
+
50
+ The response includes `items[]` with public voice metadata such as `_id`, `title`,
51
+ `languages`, `tags`, `visibility`, and `state`. Use an item `_id` as
52
+ `reference_id` in TTS requests.
53
+
54
+ ### 2. Text-to-Speech
45
55
 
46
56
  ```json
47
- POST /fish/audios
57
+ POST /fish/tts
58
+ Headers:
59
+ model: s2-pro
60
+
48
61
  {
49
- "action": "speech",
50
- "model": "fish-tts",
51
- "voice_id": "543e4181d81b4ef6874b0e8fbdf27c78",
52
- "prompt": "你的旁白文本。"
62
+ "text": "Your narration text.",
63
+ "reference_id": "d7900c21663f485ab63ebdb7e5905036",
64
+ "format": "mp3"
53
65
  }
54
66
  ```
55
67
 
56
- ### 2. Clone a voice from a reference sample
68
+ ### 3. Async TTS
57
69
 
58
70
  ```json
59
- POST /fish/voices
71
+ POST /fish/tts
72
+ Headers:
73
+ model: s1
74
+
60
75
  {
61
- "voice_url": "https://example.com/reference-voice.mp3",
62
- "title": "My Custom Voice",
63
- "description": "Clear, neutral-toned speaker"
76
+ "text": "Longer narration for background processing.",
77
+ "async": true,
78
+ "callback_url": "https://api.acedata.cloud/health"
64
79
  }
65
80
  ```
66
81
 
67
- Then pass the returned id as `voice_id` in workflow 1.
82
+ > **Async:** See [async task polling](../_shared/async-tasks.md). Poll via `POST /fish/tasks` with `{"id":"..."}`.
83
+
84
+ ## Parameters — `/fish/tts`
85
+
86
+ ### Header
87
+
88
+ | Parameter | Values | Description |
89
+ |-----------|--------|-------------|
90
+ | `model` | `"s1"`, `"s2-pro"` | Fish TTS engine selection |
68
91
 
69
- ## Parameters — `/fish/audios`
92
+ ### JSON body
70
93
 
71
- | Parameter | Type | Required | Description |
72
- |-----------|------|----------|-------------|
73
- | `action` | string | yes | Use `"speech"` for TTS |
74
- | `model` | string | yes | `"fish-tts"` |
75
- | `voice_id` | string | yes | A Fish reference/cloned voice id (default Mandarin: `543e4181d81b4ef6874b0e8fbdf27c78`) |
76
- | `prompt` | string | yes | Text to synthesize |
94
+ | Parameter | Type / Values | Description |
95
+ |-----------|---------------|-------------|
96
+ | `text` | string | Text to synthesize (required) |
97
+ | `reference_id` | string | Public/reference voice ID from `GET /fish/model` |
98
+ | `format` | `"mp3"`, `"wav"`, `"pcm"`, `"opus"` | Output format |
99
+ | `sample_rate` | integer | Optional output sample rate |
100
+ | `mp3_bitrate` | `64`, `128`, `192` | MP3 bitrate |
101
+ | `opus_bitrate` | integer | Opus bitrate |
102
+ | `latency` | `"normal"`, `"balanced"` | TTS latency mode |
103
+ | `chunk_length` / `min_chunk_length` | integer | Chunking controls |
104
+ | `temperature`, `top_p`, `repetition_penalty` | number | Sampling controls |
105
+ | `max_new_tokens` | integer | Maximum generated tokens |
106
+ | `normalize` | boolean | Normalize generated audio |
107
+ | `prosody` | object | Prosody tuning |
108
+ | `references` | array | Additional reference objects |
109
+ | `callback_url` | string | Async callback URL |
110
+ | `async` | boolean | Run asynchronously and poll `/fish/tasks` |
77
111
 
78
112
  ## Gotchas
79
113
 
80
- - **TTS (`action:"speech"`) is synchronous** — the response carries `data[0].audio_url`; do NOT poll `/fish/tasks` for it.
81
- - `voice_id` is **required** a bare `{"prompt": "..."}` returns `400 voice_id is required when action is speech`.
82
- - `model` must be `"fish-tts"` for speech (NOT `speech-1.5`); sending a different model returns `400 model is invalid if action is speech`.
83
- - Pricing is based on the **byte count** of the generated audio. Multilingual is automatic.
114
+ - The documented TTS endpoint is `POST /fish/tts` not `/fish/audios`.
115
+ - Choose the Fish engine with the **`model` request header**, not a JSON `model` field.
116
+ - Use `reference_id` from `GET /fish/model` not `voice_id`.
117
+ - Synchronous requests return `audio_url` directly; async jobs should be polled via `/fish/tasks`.
118
+ - The current OpenAPI spec documents voice browsing via `GET /fish/model`; it does **not** document a voice-cloning write endpoint.
@@ -31,6 +31,7 @@ curl -X POST https://api.acedata.cloud/flux/images \
31
31
  |-------|---------|-------|-------|----------|
32
32
  | `flux-dev` | Good | Fast | 256–1440px | Quick generation (default) |
33
33
  | `flux-pro` | High | Medium | 256–1440px | Production work |
34
+ | `flux-2-klein` | Good | Fastest | 256–1440px | Compact / lowest-latency Flux 2 generation |
34
35
  | `flux-2-flex` | High | Fast | 256–1440px | Faster high-quality generation |
35
36
  | `flux-2-pro` | Higher | Medium | 256–1440px | Better prompt following |
36
37
  | `flux-2-max` | Highest | Slow | 256–1440px | Maximum quality generation |
@@ -77,7 +78,8 @@ POST /flux/images
77
78
  - Use pixel dimensions (e.g., `"1024x1024"`) with dev/pro/flux-2 models, aspect ratios (e.g., `"16:9"`) with kontext models
78
79
  - Editing requires kontext models (`flux-kontext-pro` or `flux-kontext-max`) — other models only support generation
79
80
  - `count` parameter generates multiple images in one request (increases cost proportionally)
80
- - `flux-2-max` produces highest quality but is slowestuse dev/flex for iteration and max for final output
81
+ - `flux-2-klein` is the lightest Flux 2 modeluseful when latency matters more than peak quality
82
+ - `flux-2-max` produces highest quality but is slowest — use dev/klein/flex for iteration and max for final output
81
83
  - All generation is async — always set `"callback_url"` to get a task id immediately, then poll `/flux/tasks` using `{"id":"<task_id>"}` or `{"ids":[...],"action":"retrieve_batch"}`
82
84
 
83
85
  > **MCP:** `pip install mcp-flux-pro` | Hosted: `https://flux.mcp.acedata.cloud/mcp` | See [all MCP servers](../_shared/mcp-servers.md)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kling-video
3
- description: Generate AI videos with Kuaishou Kling via AceDataCloud API. Use when creating videos from text or images, extending existing videos, applying motion control, or lip-syncing audio/text to video. Supports text-to-video, image-to-video, extend, motion generation, and lip-sync with multiple models and quality modes.
3
+ description: Generate AI videos with Kuaishou Kling via AceDataCloud API. Use when creating videos from text or images, extending existing videos, applying motion control, animating a talking photo from image+audio, or lip-syncing audio/text to video. Supports text-to-video, image-to-video, extend, motion generation, talking-photo, and lip-sync with multiple models and quality modes.
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: acedatacloud
@@ -117,6 +117,21 @@ POST /kling/lip-sync
117
117
  }
118
118
  ```
119
119
 
120
+ ### 6. Talking Photo
121
+
122
+ Animate a still portrait from an image plus an audio track.
123
+
124
+ ```json
125
+ POST /kling/talking-photo
126
+ {
127
+ "image_url": "https://example.com/portrait.jpg",
128
+ "audio_url": "https://example.com/voiceover.mp3",
129
+ "model": "kling-v2-1-master",
130
+ "duration": 5,
131
+ "mode": "pro"
132
+ }
133
+ ```
134
+
120
135
  ## Parameters
121
136
 
122
137
  | Parameter | Values | Description |
@@ -143,6 +158,11 @@ POST /kling/lip-sync
143
158
  | `voice_id` (`/kling/lip-sync`) | string | Voice preset ID used in `text2video` |
144
159
  | `voice_language` (`/kling/lip-sync`) | `"zh"`, `"en"` | TTS language for `text2video` (default `zh`) |
145
160
  | `voice_speed` (`/kling/lip-sync`) | number | TTS speaking speed (default `1.0`) |
161
+ | `image_url` (`/kling/talking-photo`) | URL | Source portrait image |
162
+ | `audio_url` (`/kling/talking-photo`) | URL | Driving audio track |
163
+ | `model` (`/kling/talking-photo`) | `"kling-v1"`, `"kling-v1-6"`, `"kling-v2-master"`, `"kling-v2-1-master"`, `"kling-v2-5-turbo"`, `"kling-v2-6"` | Talking-photo model |
164
+ | `duration` (`/kling/talking-photo`) | `5`, `10` | Talking-photo duration |
165
+ | `mode` (`/kling/talking-photo`) | `"std"`, `"pro"` | Talking-photo quality mode |
146
166
 
147
167
  ## Gotchas
148
168
 
@@ -152,6 +172,7 @@ POST /kling/lip-sync
152
172
  - `end_image_url` is only for `image2video` action — it defines the last frame
153
173
  - Motion control (`/kling/motion`) is a separate endpoint from video generation
154
174
  - Lip-sync is a separate endpoint (`/kling/lip-sync`) and requires `mode`; use `audio_url` for `audio2video` or `text` + voice fields for `text2video`
175
+ - Talking-photo is a separate endpoint (`/kling/talking-photo`) and requires both `image_url` and `audio_url`
155
176
  - `pro` mode costs roughly 2x `std` mode but generates faster with better quality
156
177
  - Task states use `"succeed"` (not "succeeded") — check for this value when polling
157
178
  - `negative_prompt` helps avoid unwanted elements (e.g., "blurry, low quality, text")
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: veo-video
3
- description: Generate AI videos with Google Veo via AceDataCloud API. Use when creating videos from text descriptions, animating still images into video, upscaling/extending videos, re-shooting with new camera motion, or inserting/removing objects. Supports Veo 2, Veo 3, and Veo 3.1 models including fast variants.
3
+ description: Generate AI videos with Google Veo via AceDataCloud API. Use when creating videos from text descriptions, animating still images into video, upscaling/extending videos, re-shooting with new camera motion, or inserting/removing objects. Supports Veo 2 Fast, Veo 3, and Veo 3.1 models including fast and ingredient variants.
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: acedatacloud
@@ -37,7 +37,6 @@ curl -X POST https://api.acedata.cloud/veo/tasks \
37
37
 
38
38
  | Model | Audio | Best For |
39
39
  |-------|-------|----------|
40
- | `veo2` | No | Cost-effective generation |
41
40
  | `veo2-fast` | No | Fast, cost-effective generation (default) |
42
41
  | `veo3` | Yes (native) | Full audiovisual generation |
43
42
  | `veo3-fast` | Yes (native) | Faster audiovisual generation |
@@ -69,7 +68,7 @@ POST /veo/videos
69
68
  "action": "image2video",
70
69
  "prompt": "the scene gently comes to life with wind and subtle motion",
71
70
  "image_urls": ["https://example.com/landscape.jpg"],
72
- "model": "veo2",
71
+ "model": "veo2-fast",
73
72
  "aspect_ratio": "16:9"
74
73
  }
75
74
  ```
@@ -110,7 +109,7 @@ POST /veo/videos
110
109
  | `action` | `"text2video"`, `"image2video"`, `"ingredients2video"`, `"get1080p"` | Generation mode |
111
110
  | `model` | see Models table | Model to use (default: `veo2-fast`) |
112
111
  | `resolution` | `"4k"`, `"1080p"`, `"gif"` | Output resolution (default: 720p) |
113
- | `aspect_ratio` | `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, `"3:4"` | Aspect ratio — only valid for `image2video` |
112
+ | `aspect_ratio` | `"16:9"`, `"9:16"` | Aspect ratio — only valid for `image2video` |
114
113
  | `image_urls` | array of strings | Reference image URLs — for `image2video` (up to 2) or `ingredients2video` (up to 3) |
115
114
  | `video_id` | string | Video to upscale — only for `get1080p` |
116
115
  | `translation` | `true` / `false` | Auto-translate prompt to English (default: false) |
@@ -206,11 +205,12 @@ POST /veo/objects
206
205
 
207
206
  ## Gotchas
208
207
 
209
- - Veo 3 and 3.1 models generate **native audio** — `veo2`/`veo2-fast` do NOT support audio
208
+ - Veo 3 and 3.1 models generate **native audio** — `veo2-fast` does NOT support audio
210
209
  - The `get1080p` action uses `video_id` (from a prior generation), not a URL
211
210
  - `aspect_ratio` is **only valid** for the `image2video` action
212
211
  - `image_urls` accepts an array — up to 2 images for `image2video`, up to 3 for `ingredients2video`
213
212
  - `veo31-fast-ingredients` **requires** image input — it cannot do text-only generation
213
+ - Documented `aspect_ratio` values are only `"16:9"` and `"9:16"`
214
214
  - `translation: true` auto-translates Chinese or other non-English prompts before sending to Veo
215
215
  - Task polling uses `id` (not `task_id`) in the `/veo/tasks` request body
216
216
  - Task states use `"succeeded"` (not "completed") — check for this value when polling