---
title: "AI61 AI Translation"
method: POST
path: "/ai/translation"
tags: ["AI Translation"]
---

# AI61 AI Translation

`POST /ai/translation`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/ai/translation`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/ai/translation/post.ts> (a function with typed inputs; its response is checked against the schema)

The AI Translation API leverages advanced large language model (LLM) to deliver real-time multilingual translation services worldwide. It enables accurate and seamless conversion of source text into target languages. Developers can easily integrate the API to achieve efficient and precise text translation, fully catering to multilingual application scenarios and enhancing user experience and cross-language communication efficiency.

## Request body

- AI61AiTranslationRequest
  - `source_lang` string: Source language.<p>Note：</p><p>1.Support direct input of the source language, e.g., CN；</p><p>2.Support automatic detection of the input text's language when the source language is not specified.</p>
  - `target_lang` string: Target language. Only supports CN, EN, and JP. If not specified, the default is EN.
  - `text` string, required: The original text that needs to be translated.Cannot exceed 2000 characters

## Response `200`

Successful ai61 ai translation response.

- AI61AiTranslationResponse
  - `data` AI61AiTranslationAiTranslationResponse
    - `source_lang` string: Source language.
    - `target_lang` string: Target language.
    - `translate_result` string: Translation result.
  - `status` boolean, required: Status
  - `error_msg` string: Error Message
  - `error_code` integer, required: Error Code

## Other responses

- `201`: Created.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
