@acedatacloud/skills 2026.406.0
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/AGENTS.md +48 -0
- package/LICENSE +17 -0
- package/README.md +342 -0
- package/bin/cli.js +75 -0
- package/bin/postinstall.js +15 -0
- package/index.js +13 -0
- package/package.json +56 -0
- package/skills/_shared/async-tasks.md +32 -0
- package/skills/_shared/authentication.md +31 -0
- package/skills/_shared/mcp-servers.md +36 -0
- package/skills/acedatacloud-api/SKILL.md +130 -0
- package/skills/ai-chat/SKILL.md +210 -0
- package/skills/face-transform/SKILL.md +153 -0
- package/skills/fish-audio/SKILL.md +99 -0
- package/skills/flux-image/SKILL.md +82 -0
- package/skills/google-search/SKILL.md +88 -0
- package/skills/hailuo-video/SKILL.md +91 -0
- package/skills/kling-video/SKILL.md +126 -0
- package/skills/luma-video/SKILL.md +108 -0
- package/skills/midjourney-image/SKILL.md +170 -0
- package/skills/nano-banana-image/SKILL.md +85 -0
- package/skills/producer-music/SKILL.md +198 -0
- package/skills/seedance-video/SKILL.md +148 -0
- package/skills/seedream-image/SKILL.md +120 -0
- package/skills/short-url/SKILL.md +60 -0
- package/skills/sora-video/SKILL.md +97 -0
- package/skills/suno-music/SKILL.md +187 -0
- package/skills/veo-video/SKILL.md +112 -0
- package/skills/wan-video/SKILL.md +152 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acedatacloud-api
|
|
3
|
+
description: Guide for using AceDataCloud APIs. Use when authenticating, making API calls, managing credentials, understanding billing, or integrating AceDataCloud services into applications. Covers setup, authentication, request patterns, error handling, and SDK integration.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires an AceDataCloud account at platform.acedata.cloud.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# AceDataCloud API Usage Guide
|
|
12
|
+
|
|
13
|
+
Complete guide for using AceDataCloud's AI-powered data services API.
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
### 1. Create an Account
|
|
18
|
+
|
|
19
|
+
Register at [platform.acedata.cloud](https://platform.acedata.cloud).
|
|
20
|
+
|
|
21
|
+
### 2. Subscribe to a Service
|
|
22
|
+
|
|
23
|
+
Browse available services and click **Get** to subscribe. Most services include free quota.
|
|
24
|
+
|
|
25
|
+
### 3. Create API Credentials
|
|
26
|
+
|
|
27
|
+
Go to your service's **Credentials** page and create an API Token.
|
|
28
|
+
|
|
29
|
+
> **Full details:** See [authentication](../_shared/authentication.md) for token types and usage.
|
|
30
|
+
|
|
31
|
+
## SDK Integration (OpenAI-Compatible)
|
|
32
|
+
|
|
33
|
+
For chat completion services, use the standard OpenAI SDK:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from openai import OpenAI
|
|
37
|
+
|
|
38
|
+
client = OpenAI(
|
|
39
|
+
api_key="YOUR_API_TOKEN",
|
|
40
|
+
base_url="https://api.acedata.cloud/v1"
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
response = client.chat.completions.create(
|
|
44
|
+
model="claude-sonnet-4-20250514",
|
|
45
|
+
messages=[{"role": "user", "content": "Hello!"}]
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
import OpenAI from "openai";
|
|
51
|
+
|
|
52
|
+
const client = new OpenAI({
|
|
53
|
+
apiKey: "YOUR_API_TOKEN",
|
|
54
|
+
baseURL: "https://api.acedata.cloud/v1"
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const response = await client.chat.completions.create({
|
|
58
|
+
model: "gpt-4.1",
|
|
59
|
+
messages: [{ role: "user", content: "Hello!" }]
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Request Patterns
|
|
64
|
+
|
|
65
|
+
### Synchronous APIs
|
|
66
|
+
|
|
67
|
+
Some APIs return results immediately (e.g., face transform, search):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
curl -X POST https://api.acedata.cloud/face/analyze \
|
|
71
|
+
-H "Authorization: Bearer $TOKEN" \
|
|
72
|
+
-H "Content-Type: application/json" \
|
|
73
|
+
-d '{"image_url": "https://example.com/photo.jpg"}'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Async Task APIs
|
|
77
|
+
|
|
78
|
+
Most generation APIs (images, video, music) are asynchronous.
|
|
79
|
+
|
|
80
|
+
> **Full details:** See [async task polling](../_shared/async-tasks.md) for the submit-and-poll pattern.
|
|
81
|
+
|
|
82
|
+
## Error Handling
|
|
83
|
+
|
|
84
|
+
| HTTP Code | Meaning | Action |
|
|
85
|
+
|-----------|---------|--------|
|
|
86
|
+
| 400 | Bad request | Check request parameters |
|
|
87
|
+
| 401 | Unauthorized | Check API token |
|
|
88
|
+
| 403 | Forbidden | Content filtered or insufficient permissions |
|
|
89
|
+
| 429 | Rate limited | Wait and retry with backoff |
|
|
90
|
+
| 500 | Server error | Retry or contact support |
|
|
91
|
+
|
|
92
|
+
Error response format:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"error": {
|
|
97
|
+
"code": "token_mismatched",
|
|
98
|
+
"message": "Invalid or expired token"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Billing
|
|
104
|
+
|
|
105
|
+
- Each API call deducts from your **subscription balance** (remaining_amount)
|
|
106
|
+
- Cost varies by service, model, and usage (tokens, requests, data size)
|
|
107
|
+
- Check balance at [platform.acedata.cloud](https://platform.acedata.cloud)
|
|
108
|
+
- Most services offer free trial quota
|
|
109
|
+
|
|
110
|
+
## Service Categories
|
|
111
|
+
|
|
112
|
+
| Category | Services | Base Path |
|
|
113
|
+
|----------|----------|-----------|
|
|
114
|
+
| **AI Chat** | GPT, Claude, Gemini, DeepSeek, Grok | `/v1/chat/completions` |
|
|
115
|
+
| **Image Gen** | Midjourney, Flux, Seedream, NanoBanana | `/midjourney/*`, `/flux/*`, etc. |
|
|
116
|
+
| **Video Gen** | Luma, Sora, Veo, Kling, Hailuo, Seedance, Wan | `/luma/*`, `/sora/*`, etc. |
|
|
117
|
+
| **Music Gen** | Suno, Producer, Fish Audio | `/suno/*`, `/producer/*`, `/fish/*` |
|
|
118
|
+
| **Search** | Google Search (web/images/news/maps) | `/serp/*` |
|
|
119
|
+
| **Face** | Analyze, beautify, swap, cartoon, age | `/face/*` |
|
|
120
|
+
| **Utility** | Short URL, QR Art, Headshots | `/short-url`, `/qrart/*`, `/headshots/*` |
|
|
121
|
+
|
|
122
|
+
## Gotchas
|
|
123
|
+
|
|
124
|
+
- Tokens are **service-scoped** by default — create a global token if you need cross-service access
|
|
125
|
+
- Async APIs return a `task_id` — always use `callback_url` to get the task_id immediately, then poll for results
|
|
126
|
+
- Avoid `wait: true` — it blocks for the full generation duration and will time out for video/music tasks
|
|
127
|
+
- Rate limits vary by service tier — upgrade your plan if hitting limits
|
|
128
|
+
- All timestamps are in UTC
|
|
129
|
+
|
|
130
|
+
> **MCP:** See [MCP servers](../_shared/mcp-servers.md) for tool-use integration with AI agents.
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
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, DeepSeek, Grok, or other models through a single endpoint. Supports streaming, function calling, and vision.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires ACEDATACLOUD_API_TOKEN environment variable. Works as a drop-in replacement for the OpenAI SDK.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# AI Chat — Unified LLM Gateway
|
|
12
|
+
|
|
13
|
+
Access 50+ language models through a single OpenAI-compatible endpoint via AceDataCloud.
|
|
14
|
+
|
|
15
|
+
> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
curl -X POST https://api.acedata.cloud/v1/chat/completions \
|
|
21
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
22
|
+
-H "Content-Type: application/json" \
|
|
23
|
+
-d '{"model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "Hello!"}]}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## OpenAI SDK Drop-in
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from openai import OpenAI
|
|
30
|
+
|
|
31
|
+
client = OpenAI(
|
|
32
|
+
api_key="your-token-here",
|
|
33
|
+
base_url="https://api.acedata.cloud/v1"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
response = client.chat.completions.create(
|
|
37
|
+
model="gpt-4.1",
|
|
38
|
+
messages=[{"role": "user", "content": "Explain quantum computing"}]
|
|
39
|
+
)
|
|
40
|
+
print(response.choices[0].message.content)
|
|
41
|
+
```
|
|
42
|
+
|
|
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-mini` | Mini gen 5 | Fast next-gen |
|
|
59
|
+
|
|
60
|
+
### Anthropic Claude
|
|
61
|
+
|
|
62
|
+
| Model | Type | Best For |
|
|
63
|
+
|-------|------|----------|
|
|
64
|
+
| `claude-opus-4-6` | Latest Opus | Highest capability |
|
|
65
|
+
| `claude-sonnet-4-6` | Latest Sonnet | Balanced quality/speed |
|
|
66
|
+
| `claude-opus-4-5-20251101` | Opus 4.5 | Premium tasks |
|
|
67
|
+
| `claude-sonnet-4-5-20250929` | Sonnet 4.5 | High-quality balance |
|
|
68
|
+
| `claude-sonnet-4-20250514` | Sonnet 4 | Reliable general-purpose |
|
|
69
|
+
| `claude-haiku-4-5-20251001` | Haiku 4.5 | Fast, efficient |
|
|
70
|
+
| `claude-3-5-sonnet-20241022` | Legacy 3.5 | Proven track record |
|
|
71
|
+
| `claude-3-opus-20240229` | Legacy Opus | Maximum quality (legacy) |
|
|
72
|
+
|
|
73
|
+
### Google Gemini
|
|
74
|
+
|
|
75
|
+
| Model | Best For |
|
|
76
|
+
|-------|----------|
|
|
77
|
+
| `gemini-1.5-pro` | Long context, complex tasks |
|
|
78
|
+
| `gemini-1.5-flash` | Fast, efficient |
|
|
79
|
+
|
|
80
|
+
### DeepSeek
|
|
81
|
+
|
|
82
|
+
| Model | Best For |
|
|
83
|
+
|-------|----------|
|
|
84
|
+
| `deepseek-r1` | Deep reasoning |
|
|
85
|
+
| `deepseek-r1-0528` | Latest reasoning |
|
|
86
|
+
| `deepseek-v3` | General-purpose |
|
|
87
|
+
| `deepseek-v3-250324` | Latest general |
|
|
88
|
+
|
|
89
|
+
### xAI Grok
|
|
90
|
+
|
|
91
|
+
| Model | Best For |
|
|
92
|
+
|-------|----------|
|
|
93
|
+
| `grok-4` | Latest, highest capability |
|
|
94
|
+
| `grok-3` | General-purpose |
|
|
95
|
+
| `grok-3-fast` | Speed-optimized |
|
|
96
|
+
| `grok-3-mini` | Compact, efficient |
|
|
97
|
+
|
|
98
|
+
## Features
|
|
99
|
+
|
|
100
|
+
### Streaming
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
POST /v1/chat/completions
|
|
104
|
+
{
|
|
105
|
+
"model": "claude-sonnet-4-20250514",
|
|
106
|
+
"messages": [{"role": "user", "content": "Write a story"}],
|
|
107
|
+
"stream": true
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Function Calling
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
POST /v1/chat/completions
|
|
115
|
+
{
|
|
116
|
+
"model": "gpt-4.1",
|
|
117
|
+
"messages": [{"role": "user", "content": "What's the weather in Tokyo?"}],
|
|
118
|
+
"tools": [
|
|
119
|
+
{
|
|
120
|
+
"type": "function",
|
|
121
|
+
"function": {
|
|
122
|
+
"name": "get_weather",
|
|
123
|
+
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Vision
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
POST /v1/chat/completions
|
|
134
|
+
{
|
|
135
|
+
"model": "gpt-4o",
|
|
136
|
+
"messages": [
|
|
137
|
+
{
|
|
138
|
+
"role": "user",
|
|
139
|
+
"content": [
|
|
140
|
+
{"type": "text", "text": "What's in this image?"},
|
|
141
|
+
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Parameters
|
|
149
|
+
|
|
150
|
+
| Parameter | Type | Description |
|
|
151
|
+
|-----------|------|-------------|
|
|
152
|
+
| `model` | string | Model name (see tables above) |
|
|
153
|
+
| `messages` | array | Array of `{role, content}` objects |
|
|
154
|
+
| `temperature` | 0–2 | Randomness (default: 1) |
|
|
155
|
+
| `top_p` | 0–1 | Nucleus sampling |
|
|
156
|
+
| `max_tokens` | integer | Maximum output tokens |
|
|
157
|
+
| `stream` | boolean | Enable SSE streaming |
|
|
158
|
+
| `tools` | array | Function calling definitions |
|
|
159
|
+
| `tool_choice` | string/object | Tool selection strategy |
|
|
160
|
+
|
|
161
|
+
## Response
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"id": "chatcmpl-xxx",
|
|
166
|
+
"object": "chat.completion",
|
|
167
|
+
"model": "claude-sonnet-4-20250514",
|
|
168
|
+
"choices": [
|
|
169
|
+
{
|
|
170
|
+
"index": 0,
|
|
171
|
+
"message": {"role": "assistant", "content": "Hello!"},
|
|
172
|
+
"finish_reason": "stop"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"usage": {
|
|
176
|
+
"prompt_tokens": 10,
|
|
177
|
+
"completion_tokens": 5,
|
|
178
|
+
"total_tokens": 15
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Gotchas
|
|
184
|
+
|
|
185
|
+
- **100% OpenAI-compatible** — use the standard OpenAI SDK with `base_url="https://api.acedata.cloud/v1"`
|
|
186
|
+
- Billing is token-based with per-model pricing (more expensive models cost more per token)
|
|
187
|
+
- Vision is supported on multimodal models (`gpt-4o`, `gpt-4o-mini`, `grok-2-vision-*`)
|
|
188
|
+
- Function calling works on most modern models (GPT-4+, Claude 3+)
|
|
189
|
+
- Streaming returns `chat.completion.chunk` objects via SSE
|
|
190
|
+
- `finish_reason` values: `"stop"` (complete), `"length"` (max tokens), `"tool_calls"` (function call), `"content_filter"` (filtered)
|
|
191
|
+
|
|
192
|
+
## Stateful Conversations Endpoint
|
|
193
|
+
|
|
194
|
+
For stateful, session-based chat (no need to send the full history each time), use the `/aichat/conversations` endpoint:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
curl -X POST https://api.acedata.cloud/aichat/conversations \
|
|
198
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
199
|
+
-H "Content-Type: application/json" \
|
|
200
|
+
-d '{"model": "gpt-4.1", "question": "What is quantum computing?", "stateful": true}'
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Parameter | Type | Description |
|
|
204
|
+
|-----------|------|-------------|
|
|
205
|
+
| `model` | string | Model name (see Available Models above) |
|
|
206
|
+
| `question` | string | The prompt or question to answer |
|
|
207
|
+
| `id` | string | Conversation ID — pass the same ID to continue a session |
|
|
208
|
+
| `preset` | string | Preset/system prompt for the conversation |
|
|
209
|
+
| `stateful` | boolean | Enable stateful conversation (maintains history server-side) |
|
|
210
|
+
| `references` | array | Additional context documents to include |
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: face-transform
|
|
3
|
+
description: Analyze and transform faces via AceDataCloud API. Use when detecting face keypoints, beautifying portraits, aging/de-aging faces, swapping genders, replacing faces between photos, creating cartoon avatars, or detecting liveness. Provides 7 specialized face APIs.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires ACEDATACLOUD_API_TOKEN environment variable.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Face Transform
|
|
12
|
+
|
|
13
|
+
Analyze and transform faces through AceDataCloud's Face API suite.
|
|
14
|
+
|
|
15
|
+
> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
curl -X POST https://api.acedata.cloud/face/analyze \
|
|
21
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
22
|
+
-H "Content-Type: application/json" \
|
|
23
|
+
-d '{"image_url": "https://example.com/portrait.jpg"}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Available APIs
|
|
27
|
+
|
|
28
|
+
| Endpoint | Purpose | Description |
|
|
29
|
+
|----------|---------|-------------|
|
|
30
|
+
| `POST /face/analyze` | Face Detection | Detect face keypoints (90+ points per face) |
|
|
31
|
+
| `POST /face/beautify` | Beautification | Apply beauty/decoration effects |
|
|
32
|
+
| `POST /face/change-age` | Age Transform | Make a face look older or younger |
|
|
33
|
+
| `POST /face/change-gender` | Gender Swap | Transform facial gender characteristics |
|
|
34
|
+
| `POST /face/swap` | Face Swap | Replace one person's face with another |
|
|
35
|
+
| `POST /face/cartoon` | Cartoon Style | Convert portrait to animated/cartoon style |
|
|
36
|
+
| `POST /face/detect-live` | Liveness Check | Detect if a face image is from a live person |
|
|
37
|
+
|
|
38
|
+
## Workflows
|
|
39
|
+
|
|
40
|
+
### 1. Face Analysis
|
|
41
|
+
|
|
42
|
+
Detect faces and extract 90+ keypoints per face.
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
POST /face/analyze
|
|
46
|
+
{
|
|
47
|
+
"image_url": "https://example.com/photo.jpg"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Response includes detailed keypoints: `nose`, `mouth`, `left_eye`, `right_eye`, `left_eyebrow`, `right_eyebrow`, `contour` — each as arrays of `{x, y}` coordinates.
|
|
52
|
+
|
|
53
|
+
### 2. Face Beautification
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
POST /face/beautify
|
|
57
|
+
{
|
|
58
|
+
"image_url": "https://example.com/portrait.jpg"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Age Transformation
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
POST /face/change-age
|
|
66
|
+
{
|
|
67
|
+
"image_url": "https://example.com/portrait.jpg"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 4. Gender Swap
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
POST /face/change-gender
|
|
75
|
+
{
|
|
76
|
+
"image_url": "https://example.com/portrait.jpg"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 5. Face Swap
|
|
81
|
+
|
|
82
|
+
Replace the face in the target image with the face from the source.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
POST /face/swap
|
|
86
|
+
{
|
|
87
|
+
"source_image_url": "https://example.com/source-face.jpg",
|
|
88
|
+
"target_image_url": "https://example.com/target-person.jpg"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 6. Cartoon Style
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
POST /face/cartoon
|
|
96
|
+
{
|
|
97
|
+
"image_url": "https://example.com/portrait.jpg"
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 7. Liveness Detection
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
POST /face/detect-live
|
|
105
|
+
{
|
|
106
|
+
"image_url": "https://example.com/face-photo.jpg"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Parameters
|
|
111
|
+
|
|
112
|
+
### Common
|
|
113
|
+
|
|
114
|
+
| Parameter | Required | Description |
|
|
115
|
+
|-----------|----------|-------------|
|
|
116
|
+
| `image_url` | Yes (most endpoints) | Source face image URL |
|
|
117
|
+
|
|
118
|
+
### `/face/swap`
|
|
119
|
+
|
|
120
|
+
| Parameter | Required | Description |
|
|
121
|
+
|-----------|----------|-------------|
|
|
122
|
+
| `source_image_url` | Yes | URL of the face to use (replaces the face) |
|
|
123
|
+
| `target_image_url` | Yes | URL of the image to put the face onto |
|
|
124
|
+
| `callback_url` | No | Webhook URL for async delivery |
|
|
125
|
+
| `timeout` | No | Max wait time in seconds (default: 120) |
|
|
126
|
+
|
|
127
|
+
### `/face/beautify`
|
|
128
|
+
|
|
129
|
+
| Parameter | Required | Description |
|
|
130
|
+
|-----------|----------|-------------|
|
|
131
|
+
| `image_url` | Yes | Image URL |
|
|
132
|
+
| `smoothing` | No | Skin smoothing 0–100 (default: 10) |
|
|
133
|
+
| `whitening` | No | Whitening 0–100 (default: 30) |
|
|
134
|
+
| `face_lifting` | No | Face slimming 0–100 (default: 70) |
|
|
135
|
+
| `eye_enlarging` | No | Eye enlarging 0–100 (default: 70) |
|
|
136
|
+
|
|
137
|
+
### `/face/analyze`
|
|
138
|
+
|
|
139
|
+
| Parameter | Required | Description |
|
|
140
|
+
|-----------|----------|-------------|
|
|
141
|
+
| `image_url` | Yes | Image URL |
|
|
142
|
+
| `mode` | No | `0` = all faces (default), `1` = largest face only |
|
|
143
|
+
| `face_model_version` | No | Algorithm version (recommended: `3.0`) |
|
|
144
|
+
| `need_rotate_detection` | No | `0` = disabled (default), `1` = enabled |
|
|
145
|
+
|
|
146
|
+
## Gotchas
|
|
147
|
+
|
|
148
|
+
- All face APIs return results synchronously. `/face/swap` additionally supports an optional `callback_url` parameter for async delivery (pass it to receive the result via webhook instead of waiting inline)
|
|
149
|
+
- Face analyze returns 90+ keypoints per detected face, supporting multiple faces in one image
|
|
150
|
+
- Face swap uses `source_image_url` (the face to apply) and `target_image_url` (the body to apply it to)
|
|
151
|
+
- All APIs are currently in **Alpha** stage — interfaces may evolve
|
|
152
|
+
- Images should contain clearly visible, front-facing faces for best results
|
|
153
|
+
- Liveness detection helps distinguish live photos from printed/screen photos
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fish-audio
|
|
3
|
+
description: Generate AI audio and synthesize voices with Fish Audio via AceDataCloud API. Use when creating text-to-speech audio, synthesizing voices, or generating audio content. Supports multiple voice models and TTS capabilities.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires ACEDATACLOUD_API_TOKEN environment variable.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Fish Audio — Voice & Audio Synthesis
|
|
12
|
+
|
|
13
|
+
Generate AI audio and synthesize voices through AceDataCloud's Fish Audio API.
|
|
14
|
+
|
|
15
|
+
> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
curl -X POST https://api.acedata.cloud/fish/audios \
|
|
21
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
22
|
+
-H "Content-Type: application/json" \
|
|
23
|
+
-d '{"prompt": "Hello, this is a demonstration of AI voice synthesis."}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> **Async:** See [async task polling](../_shared/async-tasks.md). Poll via `POST /fish/tasks` with `{"task_id": "..."}`.
|
|
27
|
+
|
|
28
|
+
## Endpoints
|
|
29
|
+
|
|
30
|
+
| Endpoint | Purpose |
|
|
31
|
+
|----------|---------|
|
|
32
|
+
| `POST /fish/audios` | Generate audio from text or parameters |
|
|
33
|
+
| `POST /fish/voices` | Voice synthesis and cloning |
|
|
34
|
+
| `POST /fish/tasks` | Poll task status |
|
|
35
|
+
|
|
36
|
+
## Workflows
|
|
37
|
+
|
|
38
|
+
### 1. Text-to-Speech
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
POST /fish/audios
|
|
42
|
+
{
|
|
43
|
+
"prompt": "The quick brown fox jumps over the lazy dog.",
|
|
44
|
+
"voice_id": "default"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Voice Cloning — Register a Voice
|
|
49
|
+
|
|
50
|
+
Upload a reference audio to create a cloneable voice.
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
POST /fish/voices
|
|
54
|
+
{
|
|
55
|
+
"voice_url": "https://example.com/reference-voice.mp3",
|
|
56
|
+
"title": "My Custom Voice",
|
|
57
|
+
"description": "Clear, neutral-toned speaker for TTS",
|
|
58
|
+
"image_url": "https://example.com/avatar.jpg"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Text-to-Speech with Cloned Voice
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
POST /fish/audios
|
|
66
|
+
{
|
|
67
|
+
"prompt": "Welcome to our platform.",
|
|
68
|
+
"voice_id": "<voice_id from POST /fish/voices>"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Parameters
|
|
73
|
+
|
|
74
|
+
### `/fish/audios`
|
|
75
|
+
|
|
76
|
+
| Parameter | Type | Description |
|
|
77
|
+
|-----------|------|-------------|
|
|
78
|
+
| `prompt` | string | Text to synthesize into speech |
|
|
79
|
+
| `voice_id` | string | Voice model or cloned voice ID to use |
|
|
80
|
+
| `model` | string | TTS model (e.g., `"speech-1.5"`, `"speech-1.5-hd"`) |
|
|
81
|
+
| `action` | string | Operation type (e.g., `"generate"`) |
|
|
82
|
+
| `callback_url` | string | Webhook URL for async delivery |
|
|
83
|
+
|
|
84
|
+
### `/fish/voices`
|
|
85
|
+
|
|
86
|
+
| Parameter | Type | Description |
|
|
87
|
+
|-----------|------|-------------|
|
|
88
|
+
| `voice_url` | string | Reference audio URL for voice cloning |
|
|
89
|
+
| `title` | string | Display title for the cloned voice |
|
|
90
|
+
| `description` | string | Description of the voice |
|
|
91
|
+
| `image_url` | string | Cover image URL for the voice |
|
|
92
|
+
| `callback_url` | string | Webhook URL for async delivery |
|
|
93
|
+
|
|
94
|
+
## Gotchas
|
|
95
|
+
|
|
96
|
+
- Pricing is based on **byte count** of the generated audio
|
|
97
|
+
- Voice cloning requires a clear reference audio sample
|
|
98
|
+
- Text-to-speech supports multiple languages automatically
|
|
99
|
+
- Use the `/fish/voices` endpoint to register a reference audio and receive a `voice_id` for TTS
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flux-image
|
|
3
|
+
description: Generate and edit images with Flux (Black Forest Labs) via AceDataCloud API. Use when creating images from text prompts, editing existing images with text instructions, or when high-quality image generation is needed. Supports multiple Flux models including dev, pro, ultra, and kontext for editing.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: acedatacloud
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Requires ACEDATACLOUD_API_TOKEN environment variable. Optionally pair with mcp-flux for tool-use.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flux Image Generation
|
|
12
|
+
|
|
13
|
+
Generate and edit images through AceDataCloud's Flux API.
|
|
14
|
+
|
|
15
|
+
> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
curl -X POST https://api.acedata.cloud/flux/images \
|
|
21
|
+
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
|
|
22
|
+
-H "Content-Type: application/json" \
|
|
23
|
+
-d '{"prompt": "a cat wearing a space helmet, photorealistic", "model": "flux-dev", "callback_url": "https://api.acedata.cloud/health"}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> **Async:** See [async task polling](../_shared/async-tasks.md). Poll via `POST /flux/tasks` with `{"task_id": "..."}`.
|
|
27
|
+
|
|
28
|
+
## Models
|
|
29
|
+
|
|
30
|
+
| Model | Quality | Speed | Sizes | Best For |
|
|
31
|
+
|-------|---------|-------|-------|----------|
|
|
32
|
+
| `flux-dev` | Good | Fast | 256–1440px | Quick generation (default) |
|
|
33
|
+
| `flux-pro` | High | Medium | 256–1440px | Production work |
|
|
34
|
+
| `flux-pro-1.1` | Higher | Medium | 256–1440px | Better prompt following |
|
|
35
|
+
| `flux-pro-1.1-ultra` | Highest | Slow | Aspect ratios | Maximum quality |
|
|
36
|
+
| `flux-kontext-pro` | High | Medium | Aspect ratios | Image editing |
|
|
37
|
+
| `flux-kontext-max` | Highest | Slow | Aspect ratios | Complex editing |
|
|
38
|
+
|
|
39
|
+
## Generate Images
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
POST /flux/images
|
|
43
|
+
{
|
|
44
|
+
"prompt": "a minimalist logo of a mountain",
|
|
45
|
+
"action": "generate",
|
|
46
|
+
"model": "flux-pro-1.1",
|
|
47
|
+
"size": "1024x1024",
|
|
48
|
+
"count": 1
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Size Options
|
|
53
|
+
|
|
54
|
+
**For dev/pro/pro-1.1** (pixel dimensions):
|
|
55
|
+
- `"1024x1024"`, `"1344x768"`, `"768x1344"`, `"1024x576"`, `"576x1024"`
|
|
56
|
+
|
|
57
|
+
**For ultra/kontext** (aspect ratios):
|
|
58
|
+
- `"1:1"`, `"16:9"`, `"9:16"`, `"4:3"`, `"3:4"`, `"3:2"`, `"2:3"`, `"21:9"`, `"9:21"`
|
|
59
|
+
|
|
60
|
+
## Edit Images
|
|
61
|
+
|
|
62
|
+
Use kontext models for text-guided image editing:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
POST /flux/images
|
|
66
|
+
{
|
|
67
|
+
"prompt": "change the background to a beach sunset",
|
|
68
|
+
"action": "edit",
|
|
69
|
+
"image_url": "https://example.com/photo.jpg",
|
|
70
|
+
"model": "flux-kontext-pro"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Gotchas
|
|
75
|
+
|
|
76
|
+
- Use pixel dimensions (e.g., `"1024x1024"`) with dev/pro models, aspect ratios (e.g., `"16:9"`) with ultra/kontext models
|
|
77
|
+
- Editing requires kontext models (`flux-kontext-pro` or `flux-kontext-max`) — other models only support generation
|
|
78
|
+
- `count` parameter generates multiple images in one request (increases cost proportionally)
|
|
79
|
+
- Ultra model produces highest quality but is slowest — use dev for iteration, ultra for final output
|
|
80
|
+
- All generation is async — always set `"callback_url"` to get a `task_id` immediately, then poll `/flux/tasks`
|
|
81
|
+
|
|
82
|
+
> **MCP:** `pip install mcp-flux` | Hosted: `https://flux.mcp.acedata.cloud/mcp` | See [all MCP servers](../_shared/mcp-servers.md)
|