AI 语言润色 AI Polishing
智能优化文本表达,提升专业性、流畅度和可读性。支持正式、商务、学术、创意、口语化等 10+ 风格,可控制润色强度和字数范围,输出润色前后的修改对比分析。适用于商务邮件、学术论文、产品文案、社交媒体内容等多种场景的质量提升。 Intelligently refine text for professionalism, fluency, and readability. Supports 10+ styles including formal, business, academic, creative, and casual; control polishing intensity and word count range; outputs before/after change analysis. Ideal for business emails, academic papers, product copy, social media content, and more.
快速概览
Quick Overview
AI 语言润色 API 支持对文本进行智能优化,提升表达的专业性、流畅度和可读性。支持 10 种 润色风格、3 级 润色强度(light/moderate/heavy)、50+ 语言自动检测,并提供修改前后的对比分析。单次最多处理 5,000 字符,同步返回润色结果。
The AI Polishing API intelligently refines text for professionalism, fluency, and readability. Supports 10 polishing styles, 3 intensity levels (light/moderate/heavy), 50+ language auto-detection, and before/after change analysis. Processes up to 5,000 characters per request with synchronous response.
属性 Attribute 说明 Description
端点 Endpoint POST /v1/polish
认证方式 Auth Authorization: Bearer {access_token}Authorization: Bearer {access_token}
请求体类型 Content-Type application/json
文本上限 Text Limit 单次最多 5,000 字符 Max 5,000 chars per request
支持语言 Languages 50+ 语言;auto 可自动检测 50+ languages; auto for detection
风格数量 Styles 10 种(formal/casual/academic/business/creative/concise/persuasive/technical/journalistic/seo) (formal/casual/academic/business/creative/concise/persuasive/technical/journalistic/seo)
强度级别 Strength light / moderate / heavy,默认 moderate ; default moderate
计费单位 Billing 按输入文本字符数计费 Charged by input character count
请求端点 Endpoint
POST /v1/polish
认证 Authentication
所有 API 请求需在 HTTP Header 中携带 Access Token。
All API requests must include an Access Token in the HTTP Header.
Authorization: Bearer {access_token}
请求头 Request Headers
请求头 Header 必填 Required 说明 Description
Authorizationrequired 格式 Bearer {access_token},用于身份认证 Format: Bearer {access_token}, used for authentication
Content-Typerequired 固定为 application/json Must be application/json
请求参数 Request Parameters
参数 Parameter 类型 Type 必填 Required 说明 Description
text string required 待润色文本,最大 5,000 字符。支持纯文本和简单格式 Text to polish, max 5,000 chars. Supports plain text
style string optional 润色风格,默认 formal。详见风格参考 Polishing style, default formal. See Style Reference
lang string optional 文本语言代码,默认 auto 自动检测。显式指定可避免误判并用对语言模型 Language code, default auto. Explicitly setting avoids misdetection and uses the right model
strength string optional 润色强度,默认 moderate。详见强度参考 Polishing strength, default moderate. See Strength Reference
target_len integer optional 目标字数(近似值)。0 表示不限字数,适用于摘要缩略或扩写的场景 Target word count (approximate). 0 = unlimited; suitable for summarization or expansion
preserve_terms string[] optional 保护词列表,润色时保持原样不变。如 ["API","AI","iPhone"] Protected terms list; kept unchanged during polishing. e.g. ["API","AI","iPhone"]
show_diff boolean optional 是否返回修改对比分析(changes 数组),默认 true Return change diff analysis (changes array), default true
风格参考 Style Reference
风格值 Style 适用场景 Use Case 效果特点 Characteristics
formal正式/商务邮件、官方公告 Business emails, official notices 措辞严谨、句式规范、礼貌得体 Rigorous wording, standard syntax, polite and appropriate
casual社交媒体、日常聊天、博客 Social media, chats, blogs 轻松自然、口语化表达、亲和力强 Natural, colloquial, friendly
academic论文摘要、学术报告、科研材料 Paper abstracts, academic reports 逻辑严密、引用规范、术语准确 Logical rigor, proper citations, precise terminology
business产品文案、广告语、营销内容 Product copy, ads, marketing 专业说服力、打动目标受众、彰显品牌调性 Professional persuasion, audience engagement, brand tone
creative文学创作、故事叙述、创意写作 Literary writing, storytelling 文采斐然、生动形象、富有感染力 Eloquent, vivid, impactful
concise摘要提炼、标题优化、公告通知 Summaries, headlines, notices 精简提炼、去冗余、信息密度高 Concise, removes redundancy, high information density
persuasive销售文案、筹款信、演讲稿 Sales copy, fundraising, speeches 强力说服号召、情感驱动、行动导向 Strong persuasion, emotion-driven, call-to-action
technical技术文档、API 说明、用户手册 Tech docs, API references, manuals 准确无歧义、步骤清晰、易于执行 Accurate, unambiguous, clear steps, easy to follow
journalistic新闻稿、公关稿、通讯报道 Press releases, PR, newsletters 5W1H 结构、倒金字塔叙事、客观精准 5W1H structure, inverted pyramid, objective and precise
seoSEO 文章、落地页、博客内容 SEO articles, landing pages, blog 关键词自然融入、标题优化、段落结构清晰 Natural keyword integration, heading optimization, clear paragraph structure
强度参考 Strength Reference
强度 Strength 修改幅度 Scope of Change 推荐场景 Recommended For
light轻微:仅修正明显语法错误和不通顺处 Minimal: fix obvious grammar and fluency issues 已较好文本的微调、语法纠错 Fine-tuning well-written text, grammar checking
moderate适中:优化表达、调整句式、提升可读性(默认) Moderate: optimize wording, adjust structure, improve readability (default) 日常润色、商务文案、一般内容优化 Daily polishing, business copy, general content improvement
heavy大幅:深度重构句式、更换表达方式、重组段落 Significant: deep restructuring, rephrasing, paragraph reorganization 初稿重写、风格转换、大幅提升质量 Draft rewrite, style transformation, major quality boost
请求示例 Request Examples
cURL
Python
JavaScript
Java
Go
# 商务风格润色(默认强度)
curl -X POST https://api.itranslator.cc/v1/polish \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "我们产品很好的,用了都说好,赶紧来买吧。",
"style": "business",
"strength": "moderate"
}'
# 学术风格 + 保护术语 + 目标字数
curl -X POST https://api.itranslator.cc/v1/polish \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "The ML model performed well on the test dataset. We used BERT to get the embeddings.",
"style": "academic",
"strength": "heavy",
"lang": "en",
"target_len": 200,
"preserve_terms": ["BERT", "ML", "embeddings"]
}'
# 简洁风格 + 轻强度(微调)
curl -X POST https://api.itranslator.cc/v1/polish \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "我想说的是关于这个产品,它真的非常非常好用,我觉得大家都会喜欢的,强烈推荐。",
"style": "concise",
"strength": "light",
"lang": "zh",
"show_diff": true
}'
import requests
token = "YOUR_ACCESS_TOKEN"
url = "https://api.itranslator.cc/v1/polish"
# 商务风格润色
resp = requests.post(
url,
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"text": "我们产品很好的,用了都说好,赶紧来买吧。",
"style": "business",
"strength": "moderate"
}
)
result = resp.json()
print(f"原文: {result['original']}")
print(f"润色: {result['polished']}")
print(f"可信度: {result['confidence']}")
# 学术风格 + 保护术语
resp = requests.post(
url,
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"text": "The ML model performed well on the test dataset.",
"style": "academic",
"strength": "heavy",
"lang": "en",
"target_len": 200,
"preserve_terms": ["BERT", "ML", "embeddings"],
"show_diff": True
}
)
for change in resp.json()["changes"]:
print(f" {change['type']}: {change['from']} → {change['to']}")
const token = process.env.API_TOKEN;
// 商务风格润色
const resp = await fetch("https://api.itranslator.cc/v1/polish", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
text: "我们产品很好的,用了都说好,赶紧来买吧。",
style: "business",
strength: "moderate"
})
});
const result = await resp.json();
console.log(`润色结果: ${result.polished}`);
console.log(`可信度: ${result.confidence}`);
console.log(`修改项: ${result.changes.length} 处`);
// 简洁风格 + 轻强度
const resp2 = await fetch("https://api.itranslator.cc/v1/polish", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
text: "我想说的是关于这个产品,它真的非常非常好用,我觉得大家都会喜欢的。",
style: "concise",
strength: "light",
lang: "zh"
})
});
console.log(await resp2.json());
import okhttp3.*;
import com.google.gson.Gson;
import java.util.*;
OkHttpClient client = new OkHttpClient();
Map payload = new HashMap<>();
payload.put("text", "我们产品很好的,用了都说好,赶紧来买吧。");
payload.put("style", "business");
payload.put("strength", "moderate");
payload.put("show_diff", true);
String json = new Gson().toJson(payload);
RequestBody body = RequestBody.create(json,
MediaType.parse("application/json"));
Request request = new Request.Builder()
.url("https://api.itranslator.cc/v1/polish")
.header("Authorization", "Bearer " + token)
.header("Content-Type", "application/json")
.post(body)
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"text": "我们产品很好的,用了都说好,赶紧来买吧。",
"style": "business",
"strength": "moderate",
"show_diff": true,
})
req, _ := http.NewRequest("POST",
"https://api.itranslator.cc/v1/polish",
bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer "+os.Getenv("API_TOKEN"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
响应字段说明 Response Fields
字段 Field 类型 Type 说明 Description
original string 原始文本 Original text
polished string 润色后的文本 Polished text
changes array 修改对比列表,每项包含类型、修改前、修改后描述。仅 show_diff=true 时返回 Change diff list; each contains type, from/to descriptions. Only when show_diff=true
style string 实际使用的润色风格 Polishing style applied
strength string 实际使用的润色强度 Polishing strength applied
confidence float 润色质量可信度(0~1),≥0.85 表示高质量结果 Confidence score (0~1); ≥0.85 indicates high quality
detected_lang string 自动检测到的文本语言(仅 lang=auto 时返回) Auto-detected language (only when lang=auto)
char_count integer 处理字符数(计费依据) Processed character count (billing basis)
修改类型说明 Change Types
类型 Type 说明 Description
tone语气调整,如从口语化转为正式、从生硬转为亲切 Tone adjustment, e.g. colloquial to formal, blunt to friendly
structure结构调整,如句式重组、段落重组、逻辑顺序优化 Structural change, e.g. sentence/paragraph reorganization, logic ordering
word_choice措辞优化,更精准、更生动的词汇替换 Word choice improvement, more precise or vivid vocabulary
grammar语法修正,修正语病、搭配不当、标点等问题 Grammar fix, correcting errors, collocations, punctuation
conciseness精简去冗余,删除重复表达和冗余修饰 Conciseness, removing redundancy and verbose modifiers
Change 对象字段说明 Change Object Fields
字段 Field 类型 Type 说明 Description
type string 修改类型,见上方类型枚举 Change type, see enum above
from string 修改前的描述或片段 Description or snippet of what was before the change
to string 修改后的描述或片段 Description or snippet of what was after the change
severity string 改动程度:minor / moderate / major Severity: minor / moderate / major
category string 改动分类:correction(纠错) / enhancement(增强) Category: correction (fix) / enhancement (improve)
响应示例 Response Examples
示例 1:商务风格润色(中文) Example 1: Business Style (Chinese)
{
"original": "我们产品很好的,用了都说好,赶紧来买吧。",
"polished": "我们的产品性能优异,深受用户好评。欢迎选购。",
"changes": [
{ "type": "tone", "from": "口语化推广", "to": "专业商务表达" },
{ "type": "structure", "from": "简单并列", "to": "逻辑递进" },
{ "type": "word_choice", "from": "很好/都说好", "to": "性能优异/深受好评" }
],
"style": "business",
"strength": "moderate",
"confidence": 0.94,
"detected_lang": "zh",
"char_count": 18
}
示例 2:学术风格润色(英文) Example 2: Academic Style (English)
{
"original": "The results were pretty good and showed that our method works well.",
"polished": "The experimental results demonstrated statistically significant improvements, confirming the efficacy of the proposed methodology.",
"changes": [
{ "type": "tone", "from": "口语化表达", "to": "学术规范表达" },
{ "type": "word_choice", "from": "pretty good/works well", "to": "statistically significant/efficacy" },
{ "type": "structure", "from": "简单陈述", "to": "因果逻辑强化" }
],
"style": "academic",
"strength": "heavy",
"confidence": 0.91,
"detected_lang": "en",
"char_count": 82
}
示例 3:精简风格(show_diff=false) Example 3: Concise Style (show_diff=false)
{
"original": "我想说的是关于这个产品,它真的非常非常好用,我觉得大家都会喜欢的,强烈推荐给大家。",
"polished": "这款产品非常好用,强烈推荐。",
"changes": [],
"style": "concise",
"strength": "moderate",
"confidence": 0.96,
"detected_lang": "zh",
"char_count": 33
}
示例 4:错误响应 Example 4: Error Response
{
"code": 3016,
"message": "Text is empty or contains only meaningless characters; cannot polish",
"data": null
}
使用限制 Usage Limits
限制项 Limit Item 上限 Cap 说明 Notes
单次文本长度 Text per request 5,000 字符 chars 超出请分段请求 Split into multiple requests if exceeded
请求频率 Rate limit 120 次/分钟 req/min 按账号计算,超出返回 429 Per account; 429 if exceeded
并发连接数 Concurrent connections 10 同一账号同时处理的请求数 Max simultaneous processing requests per account
保护术语数量 Preserve terms 100 个 terms 单个术语最长 50 字符 Max 50 chars per term
目标字数范围 Target length 0 ~ 5,000 0 表示不限字数 0 = no limit
错误码 Error Codes
HTTP Code 错误码 Error Code 说明 Description
200 0成功 Success
400 1001参数错误,请检查必填参数和参数格式 Invalid parameter; check required fields and format
400 1002不支持的语言代码 Unsupported language code
400 1022风格值无效,不在支持的风格列表中 Invalid style value; not in supported style list
400 1023强度值无效,仅支持 light/moderate/heavy Invalid strength value; only light/moderate/heavy supported
400 1024target_len 超出范围(0~5000)target_len out of range (0~5000)
401 2001认证失败,Token 无效或已过期 Authentication failed; invalid or expired token
403 2003无权限访问该资源 Access denied; insufficient permissions
413 3001请求文本超出长度限制(最大 5,000 字符) Text exceeds maximum length (5,000 chars)
422 3016文本为空或仅包含无意义字符,无法润色 Text is empty or contains only meaningless characters; cannot polish
429 4001请求频率超限,请稍后重试 Rate limit exceeded; please retry later
456 4002套餐配额已用尽,请升级或等待重置 Plan quota exhausted; upgrade or wait for reset
500 5001服务器内部错误,请重试或联系技术支持 Internal server error; retry or contact support
503 5002服务暂时不可用,建议稍后重试 Service temporarily unavailable; retry later
最佳实践 Best Practices
实践 Practice 具体建议 Recommendation
选择合适的风格和强度
Choose Right Style & Strength
商业文案用 business,论文用 academic,日常内容用 casual。heavy 适合初稿,light 适合已较完善的文本
Use business for commercial copy, academic for papers, casual for daily content. heavy for drafts, light for well-written text
保护关键术语
Preserve Key Terms
通过 preserve_terms 传入不可更改的术语和技术名词,避免润色时被意外改写
Pass critical terms and technical names in preserve_terms to prevent accidental rewriting
对比润色前后差异
Review Before/After Diff
默认启用 show_diff=true,查看 changes 数组了解具体修改,便于人工审核和调优
Keep show_diff=true; review the changes array to understand modifications and fine-tune
关注 confidence 评分
Monitor Confidence Score
≥ 0.85 可直接使用;0.70~0.85 建议人工复核;< 0.70 需调整参数重新润色
≥0.85 ready to use; 0.70~0.85 needs review; <0.70 needs parameter adjustment and re-polish
迭代润色策略
Iterative Polishing
先用 light 修正明显问题,再用 moderate 优化表达,分步迭代优于一次性 heavy
Start with light to fix obvious issues, then moderate to optimize; gradual iteration beats one-shot heavy
控制输出长度
Control Output Length
需要摘要缩略或扩写时使用 target_len 参数,配合 concise 风格效果最佳
Use target_len for summarization or expansion; works best with concise style
应用场景 Use Cases
场景 Scenario 推荐配置 Recommended Config 说明 Notes
📧 商务邮件
Business Emails
formal + moderate
formal + moderate
优化邮件措辞,保持专业礼貌,控制篇幅
Optimize email wording, maintain professionalism, control length
🎓 学术论文
Academic Papers
academic + heavy + 保护术语
academic + heavy + preserve terms
摘要和正文润色,提升学术规范性,保护专业术语
Polish abstracts and body text; improve academic rigor; protect terminology
📱 产品文案
Product Copy
business / persuasive
business / persuasive
优化产品描述、广告语,增强说服力和品牌调性
Optimize product descriptions and ad copy; boost persuasion and brand tone
💬 社交媒体
Social Media
casual + light
casual + light
让帖文更自然亲切,修正语法但不过度改动原有风格
Make posts more natural and friendly; fix grammar without over-polishing
📚 技术文档
Technical Docs
technical + 保护术语
technical + preserve terms
确保 API 文档和手册内容清晰准确,保护代码和 API 名词
Ensure API docs and manuals are clear and accurate; protect code and API names
✍️ 创意写作
Creative Writing
creative + moderate
creative + moderate
增强文学表现力,丰富修辞手法,保留作者风格
Enhance literary expression and rhetorical devices while preserving author voice
📰 新闻稿优化
Press Releases
journalistic + moderate + 目标字数
journalistic + moderate + target_len
优化新闻稿件结构,确保 5W1H 完整,控制篇幅适合媒体发布
Optimize press release structure, ensure complete 5W1H, control length for media publication
🔍 SEO 内容优化
SEO Content
seo + moderate + 保护关键词
seo + moderate + preserve terms
优化博客和落地页内容,自然融入关键词,改善可读性和搜索引擎排名
Optimize blog and landing page content, naturally integrate keywords, improve readability and SEO ranking
与其他 API 组合使用 Combination with Other APIs
组合场景 Combo Scenario 使用方式 Approach
润色 + 翻译
Polish + Translate
先润色源文本保证质量,再将润色后的文本送入文档翻译 ,确保翻译输入的高质量
Polish source text first for quality assurance, then send the polished result to Document Translate for higher quality input
润色 + 术语库
Polish + Glossary
使用 preserve_terms 保护术语库 中的专有词汇,润色后的文本用于翻译时再关联 glossry_id
Use preserve_terms to protect terms from glossary ; then reference glossary_id when translating the polished text
润色 + 改写
Polish + Rewrite
先用润色提升语言质量,再用AI 改写 改变表达角度或语气,适用于内容多角色复用
Use Polish to improve language quality, then AI Rewrite to change angle or tone; ideal for multi-purpose content reuse
使用说明
Notes
所有 API 请求均使用 HTTPS,建议开启 HTTP Keep-Alive 以提高性能。
All API requests use HTTPS; enable HTTP Keep-Alive for better performance.
请勿在客户端代码中暴露 Access Token,建议通过后端代理调用。
Do not expose your Access Token in client-side code; use a backend proxy.
推荐设置合理的超时时间(30 秒),并实现指数退避重试策略。
Set a reasonable timeout (30s) and implement exponential backoff for retries.