存储和管理历史翻译对,自动复用相似内容,减少重复翻译成本最高 60%。支持模糊匹配、精确匹配和上下文匹配,可导入导出 TMX 标准格式,与 CAT 工具无缝对接。在翻译 API 中传入 tm_id 即可自动查询记忆库,匹配度超过阈值时直接返回已有译文,无需重新翻译计费。Store and manage historical translation pairs. Auto-reuse similar content to reduce translation costs by up to 60%. Supports fuzzy, exact, and context matching. Import/export TMX standard format for seamless CAT tool integration. Pass tm_id to the translation API for automatic TM lookup; matches above threshold return existing translations without re-translation billing.
快速概览
Quick Overview
属性
Attribute
说明
Description
记忆库端点
TM Endpoint
POST /v1/tm(创建)/ GET /v1/tm(列表)
条目端点
Entry Endpoint
/v1/tm/{tm_id}/entries
搜索端点
Search Endpoint
GET /v1/tm/{tm_id}/search
导入/导出
Import/Export
/v1/tm/{tm_id}/import / /export(TMX 格式)
认证
Authentication
Bearer Token(Authorization 请求头)
Bearer Token in Authorization header
请求体
Request Body
application/json(JSON 格式)
application/json (JSON format)
匹配类型
Match Types
精确匹配 / 模糊匹配 / 上下文匹配
Exact / fuzzy / context matching
条目上限
Entry Limit
单库最多 100 万条,单次批量添加 ≤100 条
Max 1M entries per TM; ≤100 per batch add
成本节省
Cost Savings
命中记忆库的文本不计费,最高节省 60% 翻译成本
TM hits are not billed; up to 60% cost savings
认证
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
Authorization
required
格式 Bearer {access_token},用于身份认证
Format: Bearer {access_token}, used for authentication
模糊搜索记忆库中与输入文本相似的翻译条目,返回匹配度和译文。翻译 API 内部调用此接口实现记忆复用。
Fuzzy search the TM for entries similar to the input text; returns match score and translations. The translation API calls this internally for TM reuse.
查询参数
Query Parameters
参数
Parameter
类型
Type
必填
Required
说明
Description
text
string
required
待查询的源文本
Source text to search
threshold
float
optional
匹配阈值 0~1,默认 0.8。1.0 为精确匹配
Match threshold 0~1, default 0.8. 1.0 for exact match
在调用翻译 API 时传入 tm_id,系统会自动查询记忆库,匹配度 > 阈值时直接返回已有译文,无需重新翻译计费。命中记忆库的响应中会标注 tm_match 和匹配度。Pass tm_id to the translation API — the system auto-queries the TM and returns existing translations for matches above threshold, saving costs. Hits are marked with tm_match and match score in the response.
Fuzzy match: score ≥ threshold but < 1.0; similar but not identical; partial billing
上下文匹配(context):结合前后文判断,减少歧义,准确率更高
Context match: Uses surrounding text to disambiguate; higher accuracy
匹配阈值参考
Threshold Reference
阈值
Threshold
匹配效果
Effect
推荐场景
Recommended For
1.0
仅精确匹配,零误差
Exact match only, zero tolerance
法律、医疗等高精度要求场景
Legal, medical; high-precision scenarios
0.8~0.99
模糊匹配,允许细微差异
Fuzzy match, allows minor differences
产品文档、用户手册(默认推荐)
Product docs, manuals (default recommended)
0.6~0.79
宽松匹配,命中率更高但需人工校对
Loose match, higher hit rate but needs review
初稿翻译、内部参考
Draft translation, internal reference
错误码
Error Codes
HTTP Code
错误码
Error Code
说明
Description
200
0
成功
Success
400
1001
参数错误,请检查必填参数和参数格式
Invalid parameter; check required fields and format
400
1019
批量添加条目超过 100 条上限
Batch entries exceed 100-item limit
400
1020
TMX 文件格式错误或已损坏
Invalid or corrupted TMX file format
400
1021
记忆库条目语言与记忆库设置的语言对不匹配
Entry language does not match the TM's language pair
401
2001
认证失败,Token 无效或已过期
Authentication failed; invalid or expired token
403
2003
无权限访问该资源
Access denied; insufficient permissions
404
2004
记忆库或条目不存在
TM or entry not found
409
1003
数据冲突,如重复创建同名记忆库
Data conflict (e.g. duplicate TM name)
413
3001
导入文件超出大小限制(最大 50MB)
Import file exceeds size limit (max 50MB)
422
3015
记忆库条目数已达上限(100 万条)
TM entry count reached limit (1M entries)
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
最佳实践
Best Practices
按项目/语言对建立独立记忆库:不同项目或语言对应使用独立 TM,避免交叉污染,提升匹配精度。
Separate TMs per Project/Language: Use independent TMs for different projects or language pairs to avoid cross-contamination and improve match accuracy.