1. Translation
PeakkAI-Doc
English
  • 中文
  • English
  • 首页
  • English
    • Home Page
    • PeakkAI-API
      • Model
        • Native OpenAI Format
        • Native Gemini Format
      • Chat
        • Native OpenAI Format
        • Native Gemini Format
        • Native Claude Format
        • Responses Request (openai)
      • Audio
        • Native OpenAI Format TTS
        • Native Gemini Format TTS
      • Images
        • Native OpenAI Format Image Editing (JSON)
        • Native OpenAI Format Image Generation
        • Native OpenAI Format Image Editing (Multipart)
        • Native Gemini Format Image Generation
      • Video
        • Seedance2.0 format
          • Create Video Generation Task
          • Query Video Generation Task Status
      • Vector
        • Embeddings
          • Create Embedding
      • Translation
        • Speech Translation
          POST
    • AI application
      • PeakkAI API Integration with Claude Code
      • PeakkAI API Integration with Cursor
      • PeakkAI API Integration with Codex-cli
      • PeakkAI API Integration with Codex Desktop
      • PeakkAI API Integration with Hermes Agent
  1. Translation

Speech Translation

POST
/v1/translate

Translation LLM#

Translation LLM is a newly launched top-quality LLM architecture translation product by Google. While balancing reasonable response latency, it achieves industry-leading translation capabilities. Its operating speed is improved by about 3 times compared to Gemini 2.0 Flash, efficiently balancing translation speed and accuracy.

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例
{
    "model": "cloud-translate-text",
    "targetLanguageCode": "en",
    "contents": [
        "你电话号码好多?"
    ],
    "mimeType": "text/plain"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.peakkai.ai/v1/translate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "cloud-translate-text",
    "targetLanguageCode": "en",
    "contents": [
        "你电话号码好多?"
    ],
    "mimeType": "text/plain"
}'

返回响应

🟢200
application/json
Bodyapplication/json

示例
{
    "translatedTexts": [
        "Do you have a lot of phone numbers?"
    ],
    "detectedSourceLanguage": "zh",
    "characterCount": 8,
    "model": "projects/ope-aiteam-hk-05/locations/us-central1/models/general/translation-llm"
}
修改于 2026-11-02 09:46:28
上一页
Create Embedding
下一页
PeakkAI API Integration with Claude Code
Built with