Official Account, Mini Program, or enterprise WeCom bot. 16 AI models through one API — GPT-5.4 and Claude accessible from inside China, plus DeepSeek / Qwen for native-quality Chinese. Pay in CNY via WeChat Pay or Alipay.
Start free — 2 calls, no card · 免费试用Subscription + Service
Cloud function + UI
Internal enterprise bot
微信客服 for brands
Comment auto-reply
Product Q&A bot
Sales assistant
Any WeChat OpenAPI
Problem: Mainland China can't reach api.openai.com or api.anthropic.com directly. Your bot fails at network layer.
With AIPower: AIPower's gateway is CDN-accelerated for China. GPT-5.4 and Claude Opus work from any mainland IP. No VPN or proxy config in your bot code.
Problem: OpenAI and Anthropic require a non-Chinese payment card. Your CFO won't approve foreign USD subscriptions without fapiao.
With AIPower: Pay via WeChat Pay / Alipay in CNY. Get fapiao (专票/普票) on the enterprise plan. Billing entity: AI POWER LIMITED (Hong Kong).
Problem: GPT/Claude translate Chinese through English internally. Replies feel stiff, miss idioms, over-formal.
With AIPower: Route native Chinese traffic to Qwen, DeepSeek, or Kimi. Native-trained, feels natural. Same API — just change the model string.
Problem: 公众号 webhook must respond in ≤5 seconds. GPT can take 8+ seconds on long replies. Your users see 'service busy'.
With AIPower: Use auto-fast (Qwen Turbo, <500ms first-token) or return 200 immediately + reply via 客服消息 API when LLM finishes.
User sends text to your 公众号 → WeChat POSTs to your server → you call AIPower → reply via 客服消息 API within 5 seconds.
// Node.js — WeChat Official Account webhook
import OpenAI from "openai";
import xml2js from "xml2js";
const aipower = new OpenAI({
baseURL: "https://api.aipower.me/v1",
apiKey: process.env.AIPOWER_API_KEY,
});
export async function handleWeChatMessage(req, res) {
// Parse WeChat XML POST
const body = await readBody(req);
const parsed = await xml2js.parseStringPromise(body);
const msg = parsed.xml;
const userId = msg.FromUserName[0];
const text = msg.Content?.[0];
if (!text) return res.status(200).send("");
// Quick reply with AIPower — use auto-fast for <2s latency
const completion = await aipower.chat.completions.create({
model: "qwen/qwen-turbo", // fastest for Chinese text, <500ms first token
messages: [
{ role: "system", content: "你是公众号客服助手。回答简短(2-3句),必要时引导用户去菜单或官网。" },
{ role: "user", content: text },
],
max_tokens: 200,
user: userId,
});
const reply = completion.choices[0].message.content;
// Build WeChat XML response
const xmlReply = `<xml>
<ToUserName><![CDATA[${userId}]]></ToUserName>
<FromUserName><![CDATA[${msg.ToUserName[0]}]]></FromUserName>
<CreateTime>${Math.floor(Date.now()/1000)}</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[${reply}]]></Content>
</xml>`;
res.setHeader("Content-Type", "application/xml");
res.status(200).send(xmlReply);
}⚠️ WeChat's 5-second response deadline — always use fast models (qwen-turbo, auto-fast) for immediate replies. Use 客服消息 API for longer responses that need streaming.
WeChat Mini Program calls your cloud function → cloud function calls AIPower → stream tokens back via WebSocket or 云开发 realtime.
// WeChat Cloud Function (Node.js)
const OpenAI = require("openai");
const cloud = require("wx-server-sdk");
cloud.init();
const aipower = new OpenAI({
baseURL: "https://api.aipower.me/v1",
apiKey: process.env.AIPOWER_API_KEY,
});
exports.main = async (event, context) => {
const { userId, question, model = "auto" } = event;
// Pick model based on user tier / question type
const modelId = {
auto: "deepseek/deepseek-chat", // default — $0.34/M, great Chinese
premium: "anthropic/claude-sonnet", // VIP users — $3.45/M
free: "zhipu/glm-4-flash", // nearly free — $0.01/M
}[model] || "deepseek/deepseek-chat";
const res = await aipower.chat.completions.create({
model: modelId,
messages: [
{ role: "system", content: "你是小程序内的 AI 助手,回答中文,结构清晰。" },
{ role: "user", content: question },
],
user: userId, // for per-user billing analytics
});
return {
reply: res.choices[0].message.content,
tokens: res.usage.total_tokens,
model: modelId,
};
};| Use case · 场景 | Model | Cost/M | Why · 理由 |
|---|---|---|---|
| 公众号客服 5s 硬限 | qwen/qwen-turbo | $0.12 | 首字 <500ms,中文质量强 |
| 小程序 AI 助手 | auto → DeepSeek V3 | $0.34 | 性价比最高,中文流利 |
| 企业 WeCom 智能客服 | auto-code → Claude Sonnet | $3.45 | 复杂业务咨询高准确率 |
| 中英翻译 / 跨境 SaaS | qwen/qwen-plus | $0.13 | CN↔EN 翻译业界最强 |
| 免费用户 / 引流 bot | zhipu/glm-4-flash | $0.01 | 近零成本,适合免费层 |
| 数学 / 复杂推理 | deepseek/deepseek-reasoner | $0.55 | MATH-500 超 GPT-4o |
Our gateway routes OpenAI/Anthropic requests through CDN-optimized paths. Works from any mainland China IP with normal latency.
网关加速直连,国内 IP 可访问 GPT-5.4 和 Claude Opus,平均延迟 800ms-1.5s,无需 VPN。
Pay in CNY via WeChat Pay or Alipay. Get proper 专票 or 普票 for enterprise accounting.
支持微信支付和支付宝人民币充值。企业版可开专票/普票,AI POWER LIMITED(香港实体)出账。
Qwen (Alibaba), DeepSeek, GLM (Zhipu), Kimi (Moonshot), Doubao (ByteDance), MiniMax — through the same API.
通义千问、DeepSeek、智谱 GLM、Kimi、豆包、MiniMax — 全部接入,模型名一改即切换。
Route cheap queries to DeepSeek, premium to Claude, translation to Qwen. One API, different model per request.
每次调用选择模型:闲聊走 DeepSeek(便宜)、深度分析走 Claude(高质量)、中英翻译走 Qwen(最强)。
If your LLM call exceeds 5s, WeChat shows 'service unavailable' to the user. Solution: respond with 200 OK + empty body, then push the real reply via 客服消息 API (kfaccount message). Or use qwen-turbo / auto-fast (sub-second first token).
Route all user input and AI output through WeChat's msg_sec_check API before replying. Fails gracefully if user's text is flagged. Saves your 公众号 from being suspended for user-generated violations.
First call after idle takes 1-3s extra (container spin-up). Keep your cloud function warm with a scheduled ping every 2 minutes, or use 云托管 (持久化容器) for production bots.
WeChat Service Account token (access_token) expires in 2h and has a global rate limit. Cache it aggressively. Don't confuse with your AIPower API key (sk-aipower-xxx) which is user-scoped and doesn't expire.
WeChat Service Accounts can only send unsolicited 客服消息 within 48h of user's last interaction. For broadcast, use 群发消息 (rate-limited by user tier). Plan your flow around this.
Yes. Our gateway has CDN acceleration for mainland China. GPT-5.4 and Claude Opus work from any Chinese IP with normal latency (800ms-1.5s). No VPN, no proxy, no /etc/hosts hacks.
Top up via WeChat Pay or Alipay on your dashboard (https://aipower.me/dashboard/billing). Amounts are billed in CNY. Enterprise accounts can request 专票 or 普票 — email enterprise@aipower.me.
Qwen Turbo for speed-critical replies (5-second webhook deadline). DeepSeek V3 for balanced quality/cost. Claude Sonnet via auto-code only for complex B2B or enterprise support where accuracy > speed.
Yes, with stream=true. But Mini Programs can't consume SSE directly — your cloud function must convert. Pattern: cloud function streams from AIPower → buffers → pushes to client via wx.connectSocket WebSocket or 云开发 realtime subscription.
Tag each AIPower call with user="wechat_openid_xxx". Query /api/usage/logs by user to find top spenders. Combine with daily_cap_cents at account level + your app-side per-openid rate limit (e.g., 20 msg/day for free tier users).
Stick to 国内备案模型 by default (DeepSeek, Qwen, GLM, Kimi, Doubao). Route through WeChat's content safety check before replying. We don't provide legal advice, but these are the standard 2026 practices for 公众号/小程序 AI products.
Yes — /zh for Chinese homepage, pricing, docs. Dashboard UI detects your browser locale. Support email in Chinese: support@aipower.me (中文邮件 OK).
2 free trial calls. +100 bonus on first $5 top-up. 微信/支付宝付款都支持。