Skip to main content

TermQuery

Queries the Tongyi Multimodal Translation termbase for intervention terms.

Debugging

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant a RAM user or RAM role the permission to call this API. Details are as follows:
  • Operation: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types supported for authorization in the operation. Details:
    • Required resource types are marked with a preceding *.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud product itself.
  • Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
OperationAccess levelResource typeCondition keyDependent action
anytrans:TermQuerynone
*All resources
*
    None
None

Request syntax

POST /anytrans/translate/intervene/query HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

The ID of the Model Studio workspace used for this request.

llm-kqtrcpdee4xm29xx
sourceLanguagestringYes

The source language.

zh
targetLanguagestringYes

The target language.

en
scenestringYes

The translation model.

Valid values:
  • mt-plus: Professional Edition.
  • mt-flash: Lightweight Edition.
mt-flash
textstringNo

The input sentence that contains intervention terms.

今天的天气非常不错,我准备去跟我的好朋友去学习一些大模型相关和应用接口的知识。
extobjectNo

Extended parameters.

paramMapanyNo

Extended parameter configuration (bizUserld: the business-level user ID used to distinguish different business users, so that term interventions are isolated by user and do not affect each other. bizType: the business scenario type/identifier used to distinguish different scenarios, so that term interventions are isolated by scenario and do not affect each other.)

Valid values:
  • bizType: Business scenario type.
  • bizUserId: Business user ID.
{"bizUserld":"123456","bizType":session"}

Response elements

NameTypeDescriptionExample value
object

Schema of Response

codestring

The response status code.

success
messagestring

The response message.

success
requestIdstring

The request ID.

C3C70C8F-E026-17D8-854E-7F8EF2F5C909
successboolean

Whether the API call is successful.

true
httpStatusCodestring

The HTTP status code.

200
dataobject

The returned data.

termsarray<object>

A list of intervention terms.

termsobject

An intervention term.

termIdstring

The ID of the intervention term.

92669963
srcstring

The source text.

大模型
tgtstring

The translated text after intervention.

LLM
failCountlong

The number of failures.

0

Examples

Success response JSON format
{
  "code": "success",
  "message": "success",
  "requestId": "C3C70C8F-E026-17D8-854E-7F8EF2F5C909",
  "success": true,
  "httpStatusCode": 200,
  "data": {
    "terms": [
      {
        "termId": 92669963,
        "src": "大模型",
        "tgt": "LLM"
      }
    ],
    "failCount": 0
  }
}

Error codes

HTTP status codeError codeError message
400IdempotentParameterMismatchThe request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.
Visit the Error Center to view more error codes.

Change history

Change timeChange summaryOperation
2025-12-25OpenAPI error codes changed, OpenAPI request parameters changedView change details