远程验证真实的学习流程
通过正式云端能力提交素材、查看学习内容并测试审核行为。
接入与一致性
正式地址:https://lingocatch.com/api/regulatory/v1。请通过 service@lingocatch.com 申请机构凭证。凭证具有有效期,可由服务方撤销;请仅保存在测试工具的安全环境变量中。无需 App 会员。
export LC_API='https://lingocatch.com/api/regulatory/v1'
# 将机构凭证安全注入 LC_REGULATORY_TOKEN;不要写入脚本或提交代码。
curl "$LC_API/media/JOB_ID" -H "Authorization: Bearer $LC_REGULATORY_TOKEN"
解析复用 App 正式云端处理函数、提示词、审核规则、缓存与响应模型。AI 措辞可能随生成变化;iOS 本地识别、系统翻译、画面 OCR 和 UI 操作不在远程模拟范围内。监管调用不能访问普通用户或其他机构的数据。
默认每机构每天 10,000 次请求(含轮询)、2 GiB 申请上传字节、8 小时实际媒体时长,以 UTC 自然日计。多个凭证共享机构配额;失败调用也计请求次数,上传额度在申请时计入且不退回。具体额度以服务方配置为准。建议每 5–10 秒轮询。
上传视频与音频
接收 MP4(video/mp4)、MOV(video/quicktime)、M4A(audio/mp4 或 audio/x-m4a)、MP3(audio/mpeg)、WAV(audio/wav 或 audio/x-wav)。单文件不超过 500 MiB,时长不超过 2 小时,必须包含有效音轨;真实格式、扩展名和声明类型必须匹配。
- 申请上传地址,传入真实文件字节数:
curl -X POST "$LC_API/media/uploads" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"fileName":"sample.mp4","contentType":"video/mp4","sizeBytes":123456,"locale":"en-US"}'
返回 id、objectKey、uploadUrl、uploadHeaders、expiresAt。地址 15 分钟内有效,必须使用返回的请求头直接 PUT 原文件到私有对象存储。业务 API 不接收媒体文件,也不接收任意远程下载 URL。
# UPLOAD_URL 和 CONTENT_TYPE 取自上一步返回值;不向对象存储发送监管凭证。
curl --fail -X PUT "$UPLOAD_URL" -H "Content-Type: $CONTENT_TYPE" --upload-file sample.mp4
curl -X POST "$LC_API/media/$JOB_ID/complete" -H "Authorization: Bearer $LC_REGULATORY_TOKEN"
curl "$LC_API/media/$JOB_ID" -H "Authorization: Bearer $LC_REGULATORY_TOKEN"
音频完全相同,例如将申请参数改为 {"fileName":"sample.mp3","contentType":"audio/mpeg","sizeBytes":123456,"locale":"en-US"},PUT 对应音频文件。
状态依次为 uploading → queued → processing → submitted → pending/running → formatting → succeeded,任一处理阶段可能 failed。完成上传接口可重复调用。上传大小不符返回 409;媒体探测、无音轨、时长超限或转码失败通过任务的 errorCode 返回。
{
"id": "JOB_ID", "status": "succeeded", "errorCode": null,
"result": {
"id": "JOB_ID", "status": "succeeded", "locale": "en-US",
"errorCode": null, "errorMessage": null,
"segments": [], "ocrTargets": null, "srtAvailable": true
}
}
示例省略字幕内容。result 为 App 的 JobResponse;segments 的字幕、时间轴、逐词与短语字段由现有正式转写流程生成,不对缺失内容进行伪造。处理中的 result 可能为 null。
文件仅用于本次处理。工作进程在私有临时目录提取音频,设置超时并逐个转码;转换后删除源文件,转写成功/失败后清理派生音频,失败清理自动重试。上传地址有效期内重复清理防止重传残留;私有存储另设 1 天生命周期兜底。上传及转换任务持久化,中断转换会明确标记失败,需重新提交。请求审计不记录原文、凭证或签名 URL;学习结果和既有审核记录遵循正式服务的数据政策。
文章文本与 TXT
启用条件:生产服务必须已部署正式文章审核模块并配置审核凭证;未就绪时,文章及文章审核接口统一返回 503 content_moderation_unavailable,不会直接返回未经审核的翻译。
最多 60,000 个字符。分句方式与 App 英文阅读器一致,保留标点及连续句子 ID;最多 2,000 句,每句不超过 12,000 字符。直接输入文本或上传 UTF-8 TXT(可带 BOM,最大 240,000 字节),不支持 PDF、Word 或扫描件。
curl -X POST "$LC_API/articles" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"text":"Hello world! How are you?","sourceLocale":"en-US","targetLocale":"zh-Hans"}'
curl -X POST "$LC_API/articles/txt?sourceLocale=en-US&targetLocale=zh-Hans" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -F 'file=@article.txt;type=text/plain'
{"segments":[{"id":0,"text":"Hello world!"}],"translations":[{"id":0,"translation":"你好,世界!"}]}
先执行与 App 相同的文章审核,再调用正式 AI 翻译。需要保留自定义句子 ID 时可直接调用 /sentences/translate-article,传入 segments: [{"id":7,"text":"Hello world!"}] 以及语言参数,返回 App 原始 translations 结构。仅审核可调用 /sentences/moderate-article,请求结构相同。同步文章调用请允许最长 300 秒响应时间。
单词、短语、句子与 AI 追问
单词、短语解析使用同一接口,以 entryKind 区分;contextSentence 应传实际原文上下文。分项接口支持的 section 值、全部字段约束及响应模型见下方接口定义和 OpenAPI。
curl -X POST "$LC_API/words/analyze" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"word":"start","entryKind":"word","contextSentence":"Let us start now.","sourceLocale":"en-US","targetLocale":"zh-Hans","detailMode":"full"}'
curl -X POST "$LC_API/words/analyze" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"word":"get started","entryKind":"phrase","contextSentence":"Let us get started.","sourceLocale":"en-US","targetLocale":"zh-Hans"}'
curl -X POST "$LC_API/words/section" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"word":"start","entryKind":"word","contextSentence":"Let us start now.","section":"etymology"}'
curl -X POST "$LC_API/sentences/analyze" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"sentence":"Let us get started.","sourceLocale":"en-US","targetLocale":"zh-Hans"}'
curl -X POST "$LC_API/sentences/sections" \
-H "Authorization: Bearer $LC_REGULATORY_TOKEN" -H 'Content-Type: application/json' \
-d '{"sentence":"Let us get started.","section":"ai","sourceLocale":"en-US","targetLocale":"zh-Hans"}'
句子分项 section 支持 translation、vocabulary、pronunciation、structure、ai。ai 返回 App 的 aiExplanation 解析。
返回 App 同款释义、音标、搭配、例句、词形、语法及分块解析等字段;具体字段由对应响应模型定义。AI 追问应携带上一步 analysis 和已有 history:
# analysis.json 保存单词完整解析响应;jq 构造合法请求,不拼接原始文本。
jq -n --slurpfile analysis analysis.json \
'{word:"start",contextSentence:"Let us start now.",sourceLocale:"en-US",targetLocale:"zh-Hans",analysis:$analysis[0],history:[],question:"这里可以换成 begin 吗?"}' \
| curl -X POST "$LC_API/words/chat" -H "Authorization: Bearer $LC_REGULATORY_TOKEN" \
-H 'Content-Type: application/json' --data-binary @-
追问返回 {"answer":"…"}。句子追问使用 /sentences/chat,将 word 改为 sentence,并传 SentenceSectionResponse 结构的 analysis(来自 /sentences/sections,或由完整句子解析字段组成);上下文词组识别和追问分别使用 /words/contextual-lookup、/words/contextual-chat。全部接口调用正式 AI,不提供固定回答的测试模式。
错误与排查
响应头 X-Request-ID 用于联系服务方定位。错误通常为 {"detail":"错误码或说明"},字段校验错误的 detail 为数组。
| HTTP | 含义 |
|---|---|
| 401 | 凭证缺失、无效、过期或已撤销 |
| 404 | 任务不存在或不属于本机构 |
| 409 | upload_expired / upload_missing / upload_size_mismatch |
| 413 / 422 | 文件或文本超限、格式/编码/字段不合法;content_moderation_rejected 表示内容审核拒绝 |
| 429 | regulatory_quota_exceeded:机构配额已用尽 |
| 502 / 503 / 504 | AI 或存储失败、content_moderation_unavailable、正式服务未配置或超时;不会绕过审核返回结果 |
| 500 | regulatory_internal_error:请提供请求 ID 联系服务方 |
任务失败常见 errorCode:media_format_mismatch、media_has_no_audio、media_duration_exceeded、media_probe_or_transcode_failed、media_processing_failed、media_processing_interrupted_or_upload_expired,以及 App 原有转写错误码。错误响应及任务失败均不代表合规判断结论,应结合输入、输出、审核状态和监管测试标准评估。
完整接口定义
以下内容由实际后端接口自动生成。$ref 对应下方同名模型;required、enum、默认值与长度限制以模型为准。所有接口均需监管 Bearer 凭证。
POST /media/uploads
{
"summary": "Upload Media",
"operationId": "upload_media_media_uploads_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MediaUpload"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateUploadResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
},
"parameters": []
}POST /media/{media_id}/complete
{
"summary": "Complete Media",
"operationId": "complete_media_media__media_id__complete_post",
"parameters": [
{
"name": "media_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Media Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MediaResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}GET /media/{media_id}
{
"summary": "Get Media",
"operationId": "get_media_media__media_id__get",
"parameters": [
{
"name": "media_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Media Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MediaResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /articles
{
"summary": "Article",
"operationId": "article_articles_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleInput"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleOutput"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
},
"parameters": []
}POST /articles/txt
{
"summary": "Article Txt",
"operationId": "article_txt_articles_txt_post",
"parameters": [
{
"name": "sourceLocale",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "en-US",
"title": "Sourcelocale"
}
},
{
"name": "targetLocale",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "zh-Hans",
"title": "Targetlocale"
}
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_article_txt_articles_txt_post"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleOutput"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /words/contextual-lookup
{
"tags": [
"words"
],
"summary": "Contextual Lookup",
"operationId": "contextual_lookup_words_contextual_lookup_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextualLookupRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextualLookupResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /words/contextual-chat
{
"tags": [
"words"
],
"summary": "Chat About Contextual Entry",
"operationId": "chat_about_contextual_entry_words_contextual_chat_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextualChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordChatResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /words/analyze
{
"tags": [
"words"
],
"summary": "Analyze Word",
"operationId": "analyze_word_words_analyze_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordAnalyzeRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordAnalysisResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /words/section
{
"tags": [
"words"
],
"summary": "Analyze Word Section",
"operationId": "analyze_word_section_words_section_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordSectionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordSectionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /words/chat
{
"tags": [
"words"
],
"summary": "Chat About Word",
"operationId": "chat_about_word_words_chat_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordChatResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /sentences/analyze
{
"tags": [
"sentences"
],
"summary": "Analyze Sentence",
"operationId": "analyze_sentence_sentences_analyze_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SentenceAnalyzeRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SentenceAnalysisResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /sentences/sections
{
"tags": [
"sentences"
],
"summary": "Analyze Sentence Section",
"operationId": "analyze_sentence_section_sentences_sections_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SentenceSectionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SentenceSectionResponse-Output"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /sentences/chat
{
"tags": [
"sentences"
],
"summary": "Chat About Sentence",
"operationId": "chat_about_sentence_sentences_chat_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SentenceChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WordChatResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /sentences/moderate-article
{
"tags": [
"sentences"
],
"summary": "Check Article",
"description": "Authenticated, non-premium preflight for iOS on-device translation.",
"operationId": "check_article_sentences_moderate_article_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleTranslationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Response Check Article Sentences Moderate Article Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}POST /sentences/translate-article
{
"tags": [
"sentences"
],
"summary": "Translate Article",
"operationId": "translate_article_sentences_translate_article_post",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleTranslationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArticleTranslationResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
},
"401": {
"description": "监管凭证无效、过期或已撤销"
},
"429": {
"description": "机构每日配额耗尽"
},
"503": {
"description": "正式服务未配置或不可用"
}
}
}请求与响应模型
ArticleInput
{
"properties": {
"text": {
"type": "string",
"maxLength": 60000,
"minLength": 1,
"title": "Text"
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
}
},
"type": "object",
"required": [
"text"
],
"title": "ArticleInput"
}ArticleOutput
{
"properties": {
"segments": {
"items": {
"$ref": "#/components/schemas/ArticleSegment"
},
"type": "array",
"title": "Segments"
},
"translations": {
"items": {
"$ref": "#/components/schemas/ArticleTranslation"
},
"type": "array",
"title": "Translations"
}
},
"type": "object",
"required": [
"segments",
"translations"
],
"title": "ArticleOutput"
}ArticleSegment
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"text": {
"type": "string",
"maxLength": 12000,
"minLength": 1,
"title": "Text"
}
},
"type": "object",
"required": [
"id",
"text"
],
"title": "ArticleSegment"
}ArticleTranslation
{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"translation": {
"type": "string",
"maxLength": 24000,
"minLength": 1,
"title": "Translation"
}
},
"type": "object",
"required": [
"id",
"translation"
],
"title": "ArticleTranslation"
}ArticleTranslationRequest
{
"properties": {
"segments": {
"items": {
"$ref": "#/components/schemas/ArticleSegment"
},
"type": "array",
"maxItems": 2000,
"minItems": 1,
"title": "Segments"
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
}
},
"type": "object",
"required": [
"segments"
],
"title": "ArticleTranslationRequest"
}ArticleTranslationResponse
{
"properties": {
"translations": {
"items": {
"$ref": "#/components/schemas/ArticleTranslation"
},
"type": "array",
"title": "Translations"
}
},
"type": "object",
"required": [
"translations"
],
"title": "ArticleTranslationResponse"
}Body_article_txt_articles_txt_post
{
"properties": {
"file": {
"type": "string",
"format": "binary",
"title": "File"
}
},
"type": "object",
"required": [
"file"
],
"title": "Body_article_txt_articles_txt_post"
}ContextualChatRequest
{
"properties": {
"entry": {
"$ref": "#/components/schemas/ContextualLookupEntry"
},
"contextSentence": {
"type": "string",
"maxLength": 600,
"minLength": 1,
"title": "Contextsentence"
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"history": {
"items": {
"$ref": "#/components/schemas/WordChatMessage"
},
"type": "array",
"maxItems": 12,
"title": "History"
},
"question": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"title": "Question"
}
},
"type": "object",
"required": [
"entry",
"contextSentence",
"question"
],
"title": "ContextualChatRequest"
}ContextualLookupEntry
{
"properties": {
"kind": {
"type": "string",
"enum": [
"phrase",
"word"
],
"title": "Kind"
},
"label": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Label"
},
"sourceWordIndexes": {
"items": {
"type": "integer"
},
"type": "array",
"maxItems": 8,
"minItems": 1,
"title": "Sourcewordindexes"
},
"originalMeaning": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"title": "Originalmeaning"
},
"contextExplanation": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"title": "Contextexplanation"
}
},
"type": "object",
"required": [
"kind",
"label",
"sourceWordIndexes",
"originalMeaning",
"contextExplanation"
],
"title": "ContextualLookupEntry"
}ContextualLookupRequest
{
"properties": {
"word": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Word"
},
"clickedWordIndex": {
"type": "integer",
"maximum": 400.0,
"minimum": 0.0,
"title": "Clickedwordindex"
},
"contextSentence": {
"type": "string",
"maxLength": 600,
"minLength": 1,
"title": "Contextsentence"
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
}
},
"type": "object",
"required": [
"word",
"clickedWordIndex",
"contextSentence"
],
"title": "ContextualLookupRequest"
}ContextualLookupResponse
{
"properties": {
"phrase": {
"anyOf": [
{
"$ref": "#/components/schemas/ContextualLookupEntry"
},
{
"type": "null"
}
]
},
"words": {
"items": {
"$ref": "#/components/schemas/ContextualLookupEntry"
},
"type": "array",
"maxItems": 8,
"minItems": 1,
"title": "Words"
}
},
"type": "object",
"required": [
"words"
],
"title": "ContextualLookupResponse"
}CreateUploadResponse
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"objectKey": {
"type": "string",
"title": "Objectkey"
},
"uploadUrl": {
"type": "string",
"title": "Uploadurl"
},
"uploadHeaders": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Uploadheaders"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"title": "Expiresat"
}
},
"type": "object",
"required": [
"id",
"objectKey",
"uploadUrl",
"uploadHeaders",
"expiresAt"
],
"title": "CreateUploadResponse"
}HTTPValidationError
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}JobResponse
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"status": {
"$ref": "#/components/schemas/JobStatus"
},
"locale": {
"type": "string",
"title": "Locale"
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Errorcode"
},
"errorMessage": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Errormessage"
},
"segments": {
"anyOf": [
{
"items": {
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Segments"
},
"ocrTargets": {
"anyOf": [
{
"items": {
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Ocrtargets"
},
"srtAvailable": {
"type": "boolean",
"title": "Srtavailable"
}
},
"type": "object",
"required": [
"id",
"status",
"locale",
"srtAvailable"
],
"title": "JobResponse"
}JobStatus
{
"type": "string",
"enum": [
"uploading",
"submitted",
"pending",
"running",
"awaiting_visual_cues",
"formatting",
"succeeded",
"failed"
],
"title": "JobStatus"
}MediaResponse
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"status": {
"type": "string",
"title": "Status"
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Errorcode"
},
"result": {
"anyOf": [
{
"$ref": "#/components/schemas/JobResponse"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"id",
"status"
],
"title": "MediaResponse"
}MediaUpload
{
"properties": {
"fileName": {
"type": "string",
"maxLength": 512,
"minLength": 1,
"title": "Filename"
},
"contentType": {
"type": "string",
"enum": [
"video/mp4",
"video/quicktime",
"audio/mp4",
"audio/x-m4a",
"audio/mpeg",
"audio/wav",
"audio/x-wav"
],
"title": "Contenttype"
},
"sizeBytes": {
"type": "integer",
"maximum": 524288000.0,
"exclusiveMinimum": 0.0,
"title": "Sizebytes"
},
"locale": {
"type": "string",
"enum": [
"en-US",
"en-GB",
"zh-CN",
"zh-TW",
"ja-JP",
"ko-KR"
],
"title": "Locale",
"default": "en-US"
}
},
"type": "object",
"required": [
"fileName",
"contentType",
"sizeBytes"
],
"title": "MediaUpload"
}SentenceAnalysisResponse
{
"properties": {
"pronunciation": {
"anyOf": [
{
"$ref": "#/components/schemas/SentencePronunciationResponse"
},
{
"type": "null"
}
]
},
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"translation": {
"type": "string",
"maxLength": 1600,
"minLength": 1,
"title": "Translation"
},
"semanticChunks": {
"items": {
"$ref": "#/components/schemas/SentenceSemanticChunk"
},
"type": "array",
"maxItems": 30,
"minItems": 1,
"title": "Semanticchunks"
},
"keywords": {
"items": {
"$ref": "#/components/schemas/SentenceKeyword"
},
"type": "array",
"maxItems": 16,
"title": "Keywords"
},
"keyPoints": {
"items": {
"$ref": "#/components/schemas/SentenceKeyPoint"
},
"type": "array",
"maxItems": 10,
"minItems": 1,
"title": "Keypoints"
},
"sentenceStructure": {
"items": {
"$ref": "#/components/schemas/SentenceStructurePart"
},
"type": "array",
"maxItems": 20,
"title": "Sentencestructure"
}
},
"type": "object",
"required": [
"sentence",
"translation",
"semanticChunks",
"keyPoints"
],
"title": "SentenceAnalysisResponse"
}SentenceAnalyzeRequest
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"previousSentence": {
"type": "string",
"maxLength": 1200,
"title": "Previoussentence",
"default": ""
},
"nextSentence": {
"type": "string",
"maxLength": 1200,
"title": "Nextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
}
},
"type": "object",
"required": [
"sentence"
],
"title": "SentenceAnalyzeRequest"
}SentenceChatRequest
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"previousSentence": {
"type": "string",
"maxLength": 1200,
"title": "Previoussentence",
"default": ""
},
"nextSentence": {
"type": "string",
"maxLength": 1200,
"title": "Nextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"analysis": {
"$ref": "#/components/schemas/SentenceSectionResponse-Input"
},
"history": {
"items": {
"$ref": "#/components/schemas/WordChatMessage"
},
"type": "array",
"maxItems": 12,
"title": "History"
},
"question": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"title": "Question"
}
},
"type": "object",
"required": [
"sentence",
"analysis",
"question"
],
"title": "SentenceChatRequest"
}SentenceKeyPoint
{
"properties": {
"title": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Title"
},
"explanation": {
"type": "string",
"maxLength": 700,
"minLength": 1,
"title": "Explanation"
}
},
"type": "object",
"required": [
"title",
"explanation"
],
"title": "SentenceKeyPoint"
}SentenceKeyword
{
"properties": {
"term": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Term"
},
"category": {
"type": "string",
"maxLength": 60,
"title": "Category",
"default": ""
},
"meaning": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"title": "Meaning"
}
},
"type": "object",
"required": [
"term",
"meaning"
],
"title": "SentenceKeyword"
}SentencePronunciationDetail
{
"properties": {
"term": {
"type": "string",
"maxLength": 240,
"title": "Term",
"default": ""
},
"ipa": {
"type": "string",
"maxLength": 240,
"title": "Ipa",
"default": ""
},
"analysis": {
"type": "string",
"maxLength": 1200,
"title": "Analysis",
"default": ""
}
},
"type": "object",
"title": "SentencePronunciationDetail"
}SentencePronunciationResponse
{
"properties": {
"source": {
"type": "string",
"enum": [
"text",
"audio"
],
"title": "Source",
"default": "text"
},
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"ipa": {
"type": "string",
"maxLength": 1200,
"title": "Ipa",
"default": ""
},
"words": {
"items": {
"$ref": "#/components/schemas/SentencePronunciationWord"
},
"type": "array",
"maxItems": 60,
"title": "Words"
},
"observations": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 12,
"title": "Observations"
},
"details": {
"items": {
"$ref": "#/components/schemas/SentencePronunciationDetail"
},
"type": "array",
"maxItems": 20,
"title": "Details"
}
},
"type": "object",
"required": [
"sentence"
],
"title": "SentencePronunciationResponse"
}SentencePronunciationWord
{
"properties": {
"text": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Text"
},
"ipa": {
"type": "string",
"maxLength": 120,
"title": "Ipa",
"default": ""
},
"observation": {
"type": "string",
"maxLength": 300,
"title": "Observation",
"default": ""
}
},
"type": "object",
"required": [
"text"
],
"title": "SentencePronunciationWord"
}SentenceSectionRequest
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"previousSentence": {
"type": "string",
"maxLength": 1200,
"title": "Previoussentence",
"default": ""
},
"nextSentence": {
"type": "string",
"maxLength": 1200,
"title": "Nextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"section": {
"type": "string",
"enum": [
"translation",
"vocabulary",
"pronunciation",
"structure",
"ai"
],
"title": "Section"
}
},
"type": "object",
"required": [
"sentence",
"section"
],
"title": "SentenceSectionRequest"
}SentenceSectionResponse-Input
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"translation": {
"type": "string",
"maxLength": 1600,
"title": "Translation",
"default": ""
},
"semanticChunks": {
"items": {
"$ref": "#/components/schemas/SentenceSemanticChunk"
},
"type": "array",
"maxItems": 30,
"title": "Semanticchunks"
},
"keywords": {
"items": {
"$ref": "#/components/schemas/SentenceKeyword"
},
"type": "array",
"maxItems": 16,
"title": "Keywords"
},
"keyPoints": {
"items": {
"$ref": "#/components/schemas/SentenceKeyPoint"
},
"type": "array",
"maxItems": 10,
"title": "Keypoints"
},
"sentenceStructure": {
"items": {
"$ref": "#/components/schemas/SentenceStructurePart"
},
"type": "array",
"maxItems": 20,
"title": "Sentencestructure"
},
"pronunciation": {
"anyOf": [
{
"$ref": "#/components/schemas/SentencePronunciationResponse"
},
{
"type": "null"
}
]
},
"aiExplanation": {
"type": "string",
"maxLength": 5000,
"title": "Aiexplanation",
"default": ""
}
},
"type": "object",
"required": [
"sentence"
],
"title": "SentenceSectionResponse"
}SentenceSectionResponse-Output
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 1200,
"minLength": 1,
"title": "Sentence"
},
"translation": {
"type": "string",
"maxLength": 1600,
"title": "Translation",
"default": ""
},
"semanticChunks": {
"items": {
"$ref": "#/components/schemas/SentenceSemanticChunk"
},
"type": "array",
"maxItems": 30,
"title": "Semanticchunks"
},
"keywords": {
"items": {
"$ref": "#/components/schemas/SentenceKeyword"
},
"type": "array",
"maxItems": 16,
"title": "Keywords"
},
"keyPoints": {
"items": {
"$ref": "#/components/schemas/SentenceKeyPoint"
},
"type": "array",
"maxItems": 10,
"title": "Keypoints"
},
"sentenceStructure": {
"items": {
"$ref": "#/components/schemas/SentenceStructurePart"
},
"type": "array",
"maxItems": 20,
"title": "Sentencestructure"
},
"pronunciation": {
"anyOf": [
{
"$ref": "#/components/schemas/SentencePronunciationResponse"
},
{
"type": "null"
}
]
},
"aiExplanation": {
"type": "string",
"maxLength": 5000,
"title": "Aiexplanation",
"default": ""
}
},
"type": "object",
"required": [
"sentence"
],
"title": "SentenceSectionResponse"
}SentenceSemanticChunk
{
"properties": {
"text": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"title": "Text"
},
"meaning": {
"type": "string",
"maxLength": 400,
"minLength": 1,
"title": "Meaning"
}
},
"type": "object",
"required": [
"text",
"meaning"
],
"title": "SentenceSemanticChunk"
}SentenceStructurePart
{
"properties": {
"text": {
"type": "string",
"maxLength": 300,
"minLength": 1,
"title": "Text"
},
"role": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"title": "Role"
},
"explanation": {
"type": "string",
"maxLength": 400,
"title": "Explanation",
"default": ""
}
},
"type": "object",
"required": [
"text",
"role"
],
"title": "SentenceStructurePart"
}ValidationError
{
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}WordAnalysisResponse
{
"properties": {
"word": {
"type": "string",
"maxLength": 120,
"title": "Word"
},
"ukIpa": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
],
"title": "Ukipa"
},
"usIpa": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
],
"title": "Usipa"
},
"contextMeaning": {
"type": "string",
"maxLength": 400,
"title": "Contextmeaning"
},
"definitions": {
"items": {
"$ref": "#/components/schemas/WordDefinition"
},
"type": "array",
"maxItems": 6,
"minItems": 1,
"title": "Definitions"
},
"collocations": {
"items": {
"$ref": "#/components/schemas/WordCollocation"
},
"type": "array",
"maxItems": 8,
"title": "Collocations"
},
"examples": {
"items": {
"$ref": "#/components/schemas/WordExample"
},
"type": "array",
"maxItems": 6,
"title": "Examples"
},
"forms": {
"items": {
"$ref": "#/components/schemas/WordForm"
},
"type": "array",
"maxItems": 8,
"title": "Forms"
},
"usageNotes": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 6,
"title": "Usagenotes"
},
"suggestedQuestions": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 8,
"title": "Suggestedquestions"
},
"lexiconEntryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Lexiconentryid"
},
"canonicalTerm": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
],
"title": "Canonicalterm"
}
},
"type": "object",
"required": [
"word",
"contextMeaning",
"definitions"
],
"title": "WordAnalysisResponse"
}WordAnalyzeRequest
{
"properties": {
"word": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Word"
},
"entryKind": {
"type": "string",
"enum": [
"word",
"phrase"
],
"title": "Entrykind",
"default": "word"
},
"contextSentence": {
"type": "string",
"maxLength": 600,
"title": "Contextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"ukIpa": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
],
"title": "Ukipa"
},
"usIpa": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
],
"title": "Usipa"
},
"detailMode": {
"type": "string",
"enum": [
"overview",
"full"
],
"title": "Detailmode",
"default": "full"
},
"includeSuggestedQuestions": {
"type": "boolean",
"title": "Includesuggestedquestions",
"default": true
}
},
"type": "object",
"required": [
"word"
],
"title": "WordAnalyzeRequest"
}WordChatMessage
{
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant"
],
"title": "Role"
},
"content": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"title": "Content"
}
},
"type": "object",
"required": [
"role",
"content"
],
"title": "WordChatMessage"
}WordChatRequest
{
"properties": {
"word": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Word"
},
"contextSentence": {
"type": "string",
"maxLength": 600,
"title": "Contextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"analysis": {
"$ref": "#/components/schemas/WordAnalysisResponse"
},
"history": {
"items": {
"$ref": "#/components/schemas/WordChatMessage"
},
"type": "array",
"maxItems": 12,
"title": "History"
},
"question": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"title": "Question"
}
},
"type": "object",
"required": [
"word",
"analysis",
"question"
],
"title": "WordChatRequest"
}WordChatResponse
{
"properties": {
"answer": {
"type": "string",
"maxLength": 4000,
"minLength": 1,
"title": "Answer"
}
},
"type": "object",
"required": [
"answer"
],
"title": "WordChatResponse"
}WordCollocation
{
"properties": {
"phrase": {
"type": "string",
"maxLength": 120,
"title": "Phrase"
},
"meaning": {
"type": "string",
"maxLength": 200,
"title": "Meaning"
}
},
"type": "object",
"required": [
"phrase",
"meaning"
],
"title": "WordCollocation"
}WordDefinition
{
"properties": {
"partOfSpeech": {
"type": "string",
"maxLength": 40,
"title": "Partofspeech"
},
"meaning": {
"type": "string",
"maxLength": 300,
"title": "Meaning"
}
},
"type": "object",
"required": [
"partOfSpeech",
"meaning"
],
"title": "WordDefinition"
}WordExample
{
"properties": {
"sentence": {
"type": "string",
"maxLength": 300,
"title": "Sentence"
},
"translation": {
"type": "string",
"maxLength": 300,
"title": "Translation"
}
},
"type": "object",
"required": [
"sentence",
"translation"
],
"title": "WordExample"
}WordForm
{
"properties": {
"label": {
"type": "string",
"maxLength": 80,
"title": "Label"
},
"value": {
"type": "string",
"maxLength": 120,
"title": "Value"
}
},
"type": "object",
"required": [
"label",
"value"
],
"title": "WordForm"
}WordSectionRequest
{
"properties": {
"word": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Word"
},
"entryKind": {
"type": "string",
"enum": [
"word",
"phrase"
],
"title": "Entrykind",
"default": "word"
},
"contextSentence": {
"type": "string",
"maxLength": 600,
"title": "Contextsentence",
"default": ""
},
"sourceLocale": {
"type": "string",
"maxLength": 16,
"title": "Sourcelocale",
"default": "en-US"
},
"targetLocale": {
"type": "string",
"maxLength": 16,
"title": "Targetlocale",
"default": "zh-Hans"
},
"section": {
"type": "string",
"enum": [
"phonics",
"englishDictionary",
"etymology",
"affixes",
"roots",
"forms",
"mnemonic",
"collocations",
"derivatives",
"synonyms",
"antonyms",
"usageTips"
],
"title": "Section"
}
},
"type": "object",
"required": [
"word",
"section"
],
"title": "WordSectionRequest"
}WordSectionResponse
{
"properties": {
"section": {
"type": "string",
"enum": [
"phonics",
"englishDictionary",
"etymology",
"affixes",
"roots",
"forms",
"mnemonic",
"collocations",
"derivatives",
"synonyms",
"antonyms",
"usageTips"
],
"title": "Section"
},
"data": {
"type": "object",
"title": "Data"
}
},
"type": "object",
"required": [
"section",
"data"
],
"title": "WordSectionResponse"
}