swagger: "2.0" info: title: LanguageDetection version: version not set tags: - name: LanguageDetection description: "The MessageBird Language Detection API detects the language of a given phrase. It assumes the given phrase is written in a single language, and might yield unexpected behavior if this assumption does not hold. \n\nLanguage detection works particularly well for longer texts. With shorter texts, it is often difficult to reliably decide on the language. For example, in _both_ German and Dutch, `\"hallo\"` means `\"hi\"` and so at the beginning of a conversation in Dutch or German the language might not always be clear. However, by using phrases that might occur later in the same conversation, it might be possible to robustly decide which language the person on the other is using. \n\nThis API uses the [ISO-639-3 language code standard](https://iso639-3.sil.org/code_tables/639/data). There are over 180 languages supported (see [Language](#language-object))." host: language-detection.messagebird.com schemes: - https consumes: - application/json produces: - application/json paths: /api/v1/predict-language: post: description: Predicts the language for a given phrase. The process of predicting the language from a phrase is also known as language detection. If the language could not be determined, it will return [`LANGUAGE_UNDETERMINED`](#language-object). Uses the [ISO-639-3 standard](https://iso639-3.sil.org/code_tables/639/data) otherwise. operationId: LanguageDetection_PredictLanguage responses: "200": description: A successful response. schema: $ref: '#/definitions/v1PredictLanguageResponse' "401": description: Returned when the user is not authorized. schema: {} "404": description: Returned when the resource does not exist. schema: {} default: description: An unexpected error response. schema: $ref: '#/definitions/rpcStatus' parameters: - name: body in: body required: true schema: $ref: '#/definitions/v1PredictLanguageRequest' tags: - LanguageDetection security: - AccessKey: [] /api/v1/supported-languages: get: summary: Get supported languages. description: Lists the languages supported by the Language Detection API. operationId: LanguageDetection_ListSupportedLanguages responses: "200": description: A successful response. schema: $ref: '#/definitions/v1LanguageList' "401": description: Returned when the user is not authorized. schema: {} "404": description: Returned when the resource does not exist. schema: {} default: description: An unexpected error response. schema: $ref: '#/definitions/rpcStatus' tags: - LanguageDetection security: - AccessKey: [] definitions: protobufAny: type: object properties: '@type': type: string additionalProperties: {} rpcStatus: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/protobufAny' v1Language: type: object example: iso6393Code: nld languageCode: NLD name: Dutch properties: iso6393Code: type: string example: nld description: The ISO-639-3 code of the language. title: Iso 639 3 Code name: type: string example: Dutch description: The English name of the language. title: Name languageCode: $ref: '#/definitions/v1LanguageCode' example: NLD description: The enum value of the ISO639-3 language code. title: Language Code description: Language that was detected from the given phrase. title: Language v1LanguageCode: type: string enum: - LANGUAGE_INVALID - LANGUAGE_UNDETERMINED - ENG - RUS - DEU - FRA - ITA - JPN - SPA - CEB - TUR - POR - UKR - EPO - POL - SWE - NLD - HEB - ZHO - HUN - ARA - CAT - FIN - CES - FAS - SRP - ELL - VIE - BUL - KOR - NOR - MKD - RON - IND - THA - HYE - DAN - TAM - HIN - HRV - HBS - BEL - KAT - TEL - KAZ - WAR - LIT - GLG - SLK - BEN - EUS - SLV - KAN - MAL - MAR - EST - AZE - MSA - SQI - LAT - BOS - NNO - URD - LAV - MYA - TAT - AFR - OCI - NDS - KIR - AST - TGL - ISL - INA - SIN - GUJ - KHM - BRE - BAK - UZB - BOD - PAN - VOL - ALS - NEP - CYM - JBO - FRY - MON - LTZ - CHE - UIG - TGK - SCO - SAN - CHV - JAV - MIN - IDO - ORI - ASM - NEW - GLE - MLG - ARG - CKB - SWA - BAR - LMO - YID - ARZ - MHR - AZB - SAH - PNB - SUN - BPY - PMS - ILO - WUU - KUR - PUS - ILE - XMF - YUE - GOM - LIM - MWL - COR - SND - HSB - SCN - GLA - PAM - BHO - MAI - VEC - MLT - DIV - WLN - MZN - AMH - QUE - CBK - TUK - ROH - OSS - VLS - YOR - LAO - LEZ - SOM - MYV - DIQ - MRJ - DSB - FRR - HAT - GRN - BXR - KOM - SRD - KRC - BCL - NAP - GLV - AVA - RUE - XAL - PFL - DTY - HIF - COS - LRC - VEP - TYV - NOB - SNA - KIN - IBO - SMO - SOT - MRI - WOL - XHO - HAU - HAW - NYA - ZUL - HMN default: LANGUAGE_INVALID valueComments: - Language code is invalid. - Language could not be determined. - English. - Russian. - German. - French. - Italian. - Japanese. - Spanish. - Cebuano. - Turkish. - Portuguese. - Ukrainian. - Esperanto. - Polish. - Swedish. - Dutch. - Hebrew. - Chinese. - Hungarian. - Arabic. - Catalan. - Finnish. - Czech. - Persian. - Serbian. - Greek. - Vietnamese. - Bulgarian. - Korean. - Norwegian. - Macedonian. - Romanian. - Indonesian. - Thai. - Armenian. - Danish. - Tamil. - Hindi. - Croatian. - Serbo-Croatian. - Belarusian. - Georgian. - Telugu. - Kazakh. - Waray. - Lithuanian. - Galician. - Slovak. - Bengali. - Basque. - Slovenian. - Kannada. - Malayalam. - Marathi. - Estonian. - Azerbaijani. - Malay. - Albanian. - Latin. - Bosnian. - Norwegian Nynorsk. - Urdu. - Latvian. - Burmese. - Tatar. - Afrikaans. - Occitan. - Low German. - Kirghiz. - Asturian. - Tagalog. - Icelandic. - Interlingua. - Sinhala. - Gujarati. - Central Khmer. - Breton. - Bashkir. - Uzbek. - Tibetan. - Panjabi. - Volapük. - Tosk Albanian. - Nepali. - Welsh. - Lojban. - Western Frisian. - Mongolian. - Luxembourgish. - Chechen. - Uighur. - Tajik. - Scots. - Sanskrit. - Chuvash. - Javanese. - Minangkabau. - Ido. - Oriya. - Assamese. - Newari. - Irish. - Malagasy. - Aragonese. - Central Kurdish. - Swahili. - Bavarian. - Lombard. - Yiddish. - Egyptian Arabic. - Eastern Mari. - South Azerbaijani. - Yakut. - Western Panjabi. - Sundanese. - Bishnupriya. - Piemontese. - Iloko. - Wu Chinese. - Kurdish. - Pushto. - Interlingue. - Mingrelian. - Yue Chinese. - Goan Konkani. - Limburgan. - Mirandese. - Cornish. - Sindhi. - Upper Sorbian. - Sicilian. - Scottish Gaelic. - Pampanga. - Bhojpuri. - Maithili. - Venetian. - Maltese. - Dhivehi. - Walloon. - Mazanderani. - Amharic. - Quechua. - Chavacano. - Turkmen. - Romansh. - Ossetian. - Vlaams. - Yoruba. - Lao. - Lezghian. - Somali. - Erzya. - Dimli. - Western Mari. - Lower Sorbian. - Northern Frisian. - Haitian. - Guarani. - Russia Buriat. - Komi. - Sardinian. - Karachay-Balkar. - Central Bikol. - Neapolitan. - Manx. - Avaric. - Rusyn. - Kalmyk. - Pfaelzisch. - Dotyali. - Fiji Hindi. - Corsican. - Northern Luri. - Veps. - Tuvinian. - Norwegian Bokmål. - Shona. - Kinyarwanda. - Igbo. - Samoan. - Southern Sotho. - Maori. - Wolof. - Xhosa. - Hausa. - Hawaiian. - Nyanja. - Zulu. - Hmong. description: 'Language code in ISO639-3 format. More info can be found here: https://iso639-3.sil.org/code_tables/639/data.' v1LanguageList: type: object example: languages: - iso6393Code: nld languageCode: NLD name: Dutch - iso6393Code: eng languageCode: ENG name: English - iso6393Code: spa languageCode: SPA name: Spanish - iso6393Code: zho languageCode: ZHO name: Chinese properties: languages: type: array example: - iso6393Code: nld languageCode: NLD name: Dutch - iso6393Code: eng languageCode: ENG name: English - iso6393Code: spa languageCode: SPA name: Spanish - iso6393Code: zho languageCode: ZHO name: Chinese items: $ref: '#/definitions/v1Language' description: The collection of languages. title: Languages description: List of recognized languages. title: LanguageList v1PredictLanguageRequest: type: object example: phrase: Dit is iets in het Nederlands properties: phrase: type: string example: Dit is iets in het Nederlands description: The phrase for which to predict the language. title: Phrase description: A request for predicting the language from a phrase. title: PredictLanguageRequest v1PredictLanguageResponse: type: object example: language: iso6393Code: nld languageCode: NLD name: Dutch properties: language: $ref: '#/definitions/v1Language' example: iso6393Code: nld languageCode: NLD name: Dutch description: The predicted language for the given phrase. If no known language could be determined this will be [`LANGUAGE_UNDETERMINED`](#language-object). title: Language description: A response that contains the predicted language. If the service could not determine any language, the language field will not be populated. title: PredictLanguageResponse securityDefinitions: AccessKey: type: apiKey name: Authorization in: header externalDocs: description: Find our official documentation in the MessageBird Docs url: https://developers.messagebird.com/api