Document Directory

Glossary API

Create Glossary

/v1/glossary/create

Create a new glossary with terms and translations.

Example

curl
1curl -X POST 'https://otranslator.com/api/v1/glossary/create' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "name": "Financial terminology",
6  "targetLang": "English",
7  "keys": "[\"储蓄分流\"]",
8  "translated": "{'储蓄分流':'Diversion of household deposits'}"
9}'

Request Parameters

ParametersTypeDefaultDescriptionExample
*nameString-

Glossary name

Financial terminology
descString-

Glossary description

-
*targetLangString-
  • Indicates that this glossary will be effectively applied when translating documents into the target language
  • Supported languages: Query
English
*keysString[]-

List of source terms

["储蓄分流"]
*translatedJSON-

Map of terms to translations

{'储蓄分流':'Diversion of household deposits'}

Response

ParametersTypeDefaultDescriptionExample
glossaryIdString-

Glossary ID

-
Information API
Query supported models
Glossary API
Query Glossary