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.

快速概览

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
端点EndpointPOST /v1/polish
认证方式AuthAuthorization: Bearer {access_token}Authorization: Bearer {access_token}
请求体类型Content-Typeapplication/json
文本上限Text Limit单次最多 5,000 字符Max 5,000 chars per request
支持语言Languages50+ 语言;auto 可自动检测50+ languages; auto for detection
风格数量Styles10 种(formal/casual/academic/business/creative/concise/persuasive/technical/journalistic/seo)(formal/casual/academic/business/creative/concise/persuasive/technical/journalistic/seo)
强度级别Strengthlight / 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/jsonMust be application/json

请求参数

Request Parameters

参数Parameter类型Type必填Required说明Description
textstringrequired待润色文本,最大 5,000 字符。支持纯文本和简单格式Text to polish, max 5,000 chars. Supports plain text
stylestringoptional润色风格,默认 formal。详见风格参考Polishing style, default formal. See Style Reference
langstringoptional文本语言代码,默认 auto 自动检测。显式指定可避免误判并用对语言模型Language code, default auto. Explicitly setting avoids misdetection and uses the right model
strengthstringoptional润色强度,默认 moderate。详见强度参考Polishing strength, default moderate. See Strength Reference
target_lenintegeroptional目标字数(近似值)。0 表示不限字数,适用于摘要缩略或扩写的场景Target word count (approximate). 0 = unlimited; suitable for summarization or expansion
preserve_termsstring[]optional保护词列表,润色时保持原样不变。如 ["API","AI","iPhone"]Protected terms list; kept unchanged during polishing. e.g. ["API","AI","iPhone"]
show_diffbooleanoptional是否返回修改对比分析(changes 数组),默认 trueReturn 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, newsletters5W1H 结构、倒金字塔叙事、客观精准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 -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
  }'

响应字段说明

Response Fields

字段Field类型Type说明Description
originalstring原始文本Original text
polishedstring润色后的文本Polished text
changesarray修改对比列表,每项包含类型、修改前、修改后描述。仅 show_diff=true 时返回Change diff list; each contains type, from/to descriptions. Only when show_diff=true
stylestring实际使用的润色风格Polishing style applied
strengthstring实际使用的润色强度Polishing strength applied
confidencefloat润色质量可信度(0~1),≥0.85 表示高质量结果Confidence score (0~1); ≥0.85 indicates high quality
detected_langstring自动检测到的文本语言(仅 lang=auto 时返回)Auto-detected language (only when lang=auto)
char_countinteger处理字符数(计费依据)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
typestring修改类型,见上方类型枚举Change type, see enum above
fromstring修改前的描述或片段Description or snippet of what was before the change
tostring修改后的描述或片段Description or snippet of what was after the change
severitystring改动程度:minor / moderate / majorSeverity: minor / moderate / major
categorystring改动分类: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 request5,000 字符chars超出请分段请求Split into multiple requests if exceeded
请求频率Rate limit120 次/分钟req/min按账号计算,超出返回 429Per account; 429 if exceeded
并发连接数Concurrent connections10同一账号同时处理的请求数Max simultaneous processing requests per account
保护术语数量Preserve terms100 terms单个术语最长 50 字符Max 50 chars per term
目标字数范围Target length0 ~ 5,0000 表示不限字数0 = no limit

错误码

Error Codes

HTTP Code错误码Error Code说明Description
2000成功Success
4001001参数错误,请检查必填参数和参数格式Invalid parameter; check required fields and format
4001002不支持的语言代码Unsupported language code
4001022风格值无效,不在支持的风格列表中Invalid style value; not in supported style list
4001023强度值无效,仅支持 light/moderate/heavyInvalid strength value; only light/moderate/heavy supported
4001024target_len 超出范围(0~5000)target_len out of range (0~5000)
4012001认证失败,Token 无效或已过期Authentication failed; invalid or expired token
4032003无权限访问该资源Access denied; insufficient permissions
4133001请求文本超出长度限制(最大 5,000 字符)Text exceeds maximum length (5,000 chars)
4223016文本为空或仅包含无意义字符,无法润色Text is empty or contains only meaningless characters; cannot polish
4294001请求频率超限,请稍后重试Rate limit exceeded; please retry later
4564002套餐配额已用尽,请升级或等待重置Plan quota exhausted; upgrade or wait for reset
5005001服务器内部错误,请重试或联系技术支持Internal server error; retry or contact support
5035002服务暂时不可用,建议稍后重试Service temporarily unavailable; retry later

最佳实践

Best Practices

实践Practice具体建议Recommendation
选择合适的风格和强度 Choose Right Style & Strength 商业文案用 business,论文用 academic,日常内容用 casualheavy 适合初稿,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
使用说明
  • 所有 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.