@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api DeepL API Documentation
@base https://api.deepl.com
@version 3.9.0
@auth ApiKey Authorization in header
@endpoints 39
@hint download_for_search
@toc translate(1), document(3), glossary-language-pairs(1), glossaries(13), write(1), usage(1), languages(1), admin(6), style_rules(10), voice(2)

@group translate
@endpoint POST /v2/translate
@required {text: [str], target_lang: str(ACE/AF/AN/AR/AS/AY/AZ/BA/BE/BG/BHO/BN/BR/BS/CA/CEB/CKB/CS/CY/DA/DE/EL/EN/EN-GB/EN-US/EO/ES/ES-419/ET/EU/FA/FI/FR/GA/GL/GN/GOM/GU/HA/HE/HI/HR/HT/HU/HY/ID/IG/IS/IT/JA/JV/KA/KK/KMR/KO/KY/LA/LB/LMO/LN/LT/LV/MAI/MG/MI/MK/ML/MN/MR/MS/MT/MY/NB/NE/NL/OC/OM/PA/PAG/PAM/PL/PRS/PS/PT/PT-BR/PT-PT/QU/RO/RU/SA/SCN/SK/SL/SQ/SR/ST/SU/SV/SW/TA/TE/TG/TH/TK/TL/TN/TR/TS/TT/UK/UR/UZ/VI/WO/XH/YI/YUE/ZH/ZH-HANS/ZH-HANT/ZU)}
@optional {source_lang: str(ACE/AF/AN/AR/AS/AY/AZ/BA/BE/BG/BHO/BN/BR/BS/CA/CEB/CKB/CS/CY/DA/DE/EL/EN/EO/ES/ET/EU/FA/FI/FR/GA/GL/GN/GOM/GU/HA/HE/HI/HR/HT/HU/HY/ID/IG/IS/IT/JA/JV/KA/KK/KMR/KO/KY/LA/LB/LMO/LN/LT/LV/MAI/MG/MI/MK/ML/MN/MR/MS/MT/MY/NB/NE/NL/OC/OM/PA/PAG/PAM/PL/PRS/PS/PT/QU/RO/RU/SA/SCN/SK/SL/SQ/SR/ST/SU/SV/SW/TA/TE/TG/TH/TK/TL/TN/TR/TS/TT/UK/UR/UZ/VI/WO/XH/YI/YUE/ZH/ZU), context: str, show_billed_characters: bool, split_sentences: str(0/1/nonewlines)=1, preserve_formatting: bool=false, formality: str(default/more/less/prefer_more/prefer_less)=default, model_type: str(quality_optimized/prefer_quality_optimized/latency_optimized), glossary_id: any, custom_instructions: [str], enable_beta_languages: bool=false, tag_handling: str(xml/html), outline_detection: bool=true, non_splitting_tags: any, splitting_tags: any, ignore_tags: any}
@returns(200) {translations: [map]}
@errors {400, 403, 404, 413, 414, 429, 456, 500, 504, 529}

@endgroup

@group document
@endpoint POST /v2/document
@returns(200) {document_id: str, document_key: str}
@errors {400, 403, 404, 413, 429, 456, 500, 504, 529}

@endpoint POST /v2/document/{document_id}
@required {document_id: str, document_key: str}
@returns(200) {document_id: str, status: str, seconds_remaining: int, billed_characters: int, error_message: str}
@errors {400, 403, 404, 413, 429, 456, 500, 504, 529}

@endpoint POST /v2/document/{document_id}/result
@required {document_id: str, document_key: str}
@returns(200)
@errors {400, 403, 404, 413, 429, 456, 500, 503, 504, 529}

@endgroup

@group glossary-language-pairs
@endpoint GET /v2/glossary-language-pairs
@returns(200) {supported_languages: [map]}
@errors {401, 403, 429, 500, 503, 529}

@endgroup

@group glossaries
@endpoint POST /v3/glossaries
@required {name: str, dictionaries: [map{source_lang: str, target_lang: str, entries: str, entries_format: str}]}
@returns(201) {glossary_id: str, name: str, dictionaries: [map], creation_time: str(date-time)}
@errors {400, 401, 403, 413, 429, 456, 500, 503, 529}

@endpoint GET /v3/glossaries
@returns(200) {glossaries: [map]}
@errors {401, 403, 429, 500, 503, 529}

@endpoint GET /v3/glossaries/{glossary_id}
@required {glossary_id: str}
@returns(200) {glossary_id: str, name: str, dictionaries: [map], creation_time: str(date-time)}
@errors {401, 403, 404, 429, 500, 503, 529}

@endpoint PATCH /v3/glossaries/{glossary_id}
@required {glossary_id: str}
@optional {name: str, dictionaries: [map{source_lang: str, target_lang: str, entries: str, entries_format: str}]}
@returns(200) {glossary_id: str, name: str, dictionaries: [map], creation_time: str(date-time)}
@errors {400, 401, 403, 404, 413, 429, 456, 500, 503, 529}

@endpoint DELETE /v3/glossaries/{glossary_id}
@required {glossary_id: str}
@returns(204)
@errors {400, 401, 403, 404, 429, 500, 503, 529}

@endpoint GET /v3/glossaries/{glossary_id}/entries
@required {glossary_id: str, source_lang: str, target_lang: str}
@returns(200) {source_lang: str, target_lang: str, entries: str, entries_format: str}
@errors {400, 401, 403, 404, 429, 500, 503, 529}

@endpoint DELETE /v3/glossaries/{glossary_id}/dictionaries
@required {glossary_id: str, source_lang: str, target_lang: str}
@returns(204)
@errors {400, 401, 403, 404, 429, 500, 503, 529}

@endpoint PUT /v3/glossaries/{glossary_id}/dictionaries
@required {glossary_id: str}
@optional {source_lang: str(ar/bg/cs/da/de/el/en/es/et/fi/fr/he/hu/id/it/ja/ko/lt/lv/nb/nl/pl/pt/ro/ru/sk/sl/sv/th/tr/uk/vi/zh), target_lang: str(ar/bg/cs/da/de/el/en/es/et/fi/fr/he/hu/id/it/ja/ko/lt/lv/nb/nl/pl/pt/ro/ru/sk/sl/sv/th/tr/uk/vi/zh), entries: str, entries_format: str(tsv/csv)=tsv}
@returns(200) {source_lang: str, target_lang: str, entry_count: int}
@errors {400, 401, 403, 404, 413, 429, 456, 500, 503, 529}

@endpoint POST /v2/glossaries
@required {name: str, source_lang: str(ar/bg/cs/da/de/el/en/es/et/fi/fr/he/hu/id/it/ja/ko/lt/lv/nb/nl/pl/pt/ro/ru/sk/sl/sv/th/tr/uk/vi/zh), target_lang: str(ar/bg/cs/da/de/el/en/es/et/fi/fr/he/hu/id/it/ja/ko/lt/lv/nb/nl/pl/pt/ro/ru/sk/sl/sv/th/tr/uk/vi/zh), entries: str, entries_format: str(tsv/csv)=tsv}
@returns(201) {glossary_id: str, name: str, ready: bool, source_lang: str, target_lang: str, creation_time: str(date-time), entry_count: int}
@errors {400, 401, 403, 413, 429, 456, 500, 503, 529}

@endpoint GET /v2/glossaries
@returns(200) {glossaries: [map]}
@errors {401, 403, 429, 500, 503, 529}

@endpoint GET /v2/glossaries/{glossary_id}
@required {glossary_id: str}
@returns(200) {glossary_id: str, name: str, ready: bool, source_lang: str, target_lang: str, creation_time: str(date-time), entry_count: int}
@errors {400, 401, 403, 404, 429, 500, 503, 529}

@endpoint DELETE /v2/glossaries/{glossary_id}
@required {glossary_id: str}
@returns(204)
@errors {400, 401, 403, 404, 429, 500, 503, 529}

@endpoint GET /v2/glossaries/{glossary_id}/entries
@required {glossary_id: str}
@optional {Accept: str=text/tab-separated-values}
@returns(200)
@errors {400, 401, 403, 404, 415, 429, 500, 503, 529}

@endgroup

@group write
@endpoint POST /v2/write/rephrase
@required {text: [str]}
@optional {target_lang: str(de/en/en-GB/en-US/fr/it/ja/ko/pt/pt-BR/pt-PT/zh/zh-Hans), writing_style: str(academic/business/casual/default/simple/prefer_academic/prefer_business/prefer_casual/prefer_simple), tone: str(confident/default/diplomatic/enthusiastic/friendly/prefer_confident/prefer_diplomatic/prefer_enthusiastic/prefer_friendly)}
@returns(200) {improvements: [map]}

@endgroup

@group usage
@endpoint GET /v2/usage
@returns(200) {character_count: int(int64), character_limit: int(int64), products: [map], api_key_character_count: int, api_key_character_limit: int, speech_to_text_milliseconds_count: int, speech_to_text_milliseconds_limit: int, start_time: str(date-time), end_time: str(date-time)}
@errors {400, 403, 404, 413, 429, 456, 500, 504, 529}

@endgroup

@group languages
@endpoint GET /v2/languages
@optional {type: str(source/target)=source}
@returns(200)
@errors {400, 403, 404, 413, 429, 456, 500, 504, 529}

@endgroup

@group admin
@endpoint POST /v2/admin/developer-keys
@optional {label: str}
@returns(200) {key_id: str, label: str, creation_time: str, deactivated_time: str, is_deactivated: bool, usage_limits: map{characters: num, speech_to_text_milliseconds: num}}
@errors {400, 403, 404, 500}

@endpoint GET /v2/admin/developer-keys
@returns(200)
@errors {400, 403, 404, 500}

@endpoint PUT /v2/admin/developer-keys/deactivate
@required {key_id: str}
@returns(200) {key_id: str, label: str, creation_time: str, deactivated_time: str, is_deactivated: bool, usage_limits: map{characters: num, speech_to_text_milliseconds: num}}
@errors {400, 403, 404, 500}

@endpoint PUT /v2/admin/developer-keys/label
@required {key_id: str, label: str}
@returns(200) {key_id: str, label: str, creation_time: str, deactivated_time: str, is_deactivated: bool, usage_limits: map{characters: num, speech_to_text_milliseconds: num}}
@errors {400, 403, 404, 500}

@endpoint PUT /v2/admin/developer-keys/limits
@required {key_id: str}
@optional {characters: num, speech_to_text_milliseconds: num}
@returns(200) {key_id: str, label: str, creation_time: str, deactivated_time: str, is_deactivated: bool, usage_limits: map{characters: num, speech_to_text_milliseconds: num}}
@errors {400, 403, 404, 500}

@endpoint GET /v2/admin/analytics
@required {start_date: str(date), end_date: str(date)}
@optional {group_by: str(key/key_and_day)}
@returns(200) {usage_report: map{total_usage: map{total_characters: int, text_translation_characters: int, document_translation_characters: int, text_improvement_characters: int, speech_to_text_milliseconds: int}, start_date: str(date-time), end_date: str(date-time), group_by: str, key_usages: [map], key_and_day_usages: [map]}}
@errors {400, 403, 404, 500}

@endgroup

@group style_rules
@endpoint GET /v3/style_rules
@optional {page: int=0, page_size: int=10, detailed: bool=false}
@returns(200) {style_rules: [map]}
@errors {401, 403, 429, 500, 503}

@endpoint POST /v3/style_rules
@required {name: str, language: str(de/en/es/fr/it/ja/ko/zh)}
@optional {configured_rules: map{dates_and_times: map, formatting: map, numbers: map, punctuation: map, spelling_and_grammar: map, style_and_tone: map, vocabulary: map}, custom_instructions: [map{label!: str, prompt!: str, source_language: str}]}
@returns(201) {style_id: str, name: str, creation_time: str(date-time), updated_time: str(date-time), language: str, version: int, configured_rules: map{dates_and_times: map{calendar_era: str, centuries: str, date_format: str, dates_in_numerical_form: str, decades: str, hours_minutes_seconds_separator: str, hours_minutes_separator: str, midnight_in_numerals: str, single_digit_days_and_months: str, single_digit_hours: str, time_format: str, writing_dates: str, years: str}, formatting: map{email_address_format: str, phone_number_country_code_format: str, phone_number_format: str, space_between_arabic_numerals_and_unit: str, space_between_chinese_and_english: str, space_between_chinese_characters_and_arabic_numerals: str}, numbers: map{approximate_numbers: str, currency_format: str, decimal_numbers_less_than_one: str, decimal_separator: str, dimensions_separator: str, equation_formula_reference: str, kanji_numbers: str, large_number_format: str, large_sums_of_money: str, large_sums_of_money_format: str, list_of_measurements_with_units: str, mathematical_expression_spacing: str, number_format: str, number_separator: str, numbers_of_5_digits_or_more: str, numbers_up_to_4_digits: str, percentage_format: str, reference_to_symbol: str, spelling_out_units: str, temperature_format: str, thousands_separator: str, units_of_measure_spacing: str, use_of_hiragana_and_kanji: str, writing_numbers: str, zero_format: str}, punctuation: map{abbreviations: str, acronyms: str, ampersand_abbreviation_spacing: str, ampersand_usage: str, apostrophe: str, bracket: str, chinese_mixed_with_english: str, colon: str, colon_between_hours_and_minutes_or_chapters_and_verses: str, colon_in_heading: str, colon_to_replace_versus_or_to: str, comma_after_conjunctive_adverbs: str, comma_after_i_e_and_e_g: str, comma_after_short_introductory_phrase: str, comma_and_semicolon: str, corner_bracket_and_periods: str, corner_brackets_and_periods: str, dash: str, ellipsis: str, em_dash: str, emphasis: str, exclamation_marks: str, explanatory_note_indicator: str, full_sentence_in_round_brackets: str, highlighting_specific_expressions: str, japanese_reference_materials: str, parentheses_for_supplementary_information: str, passage_of_time_and_movement_between_locations: str, periods_and_commas: str, periods_in_academic_degrees: str, periods_in_direct_quotes: str, periods_in_uppercase_initialisms_and_acronyms: str, plus_sign_usage: str, possessives_of_proper_names_ending_in_s_style: str, quotation_mark: str, quotation_mark_and_apostrophe: str, quotation_style: str, range_indicator: str, related_phrases_indicator: str, round_brackets: str, salutation: str, sentence_break_indicator: str, serial_comma: str, setting_off_non_quoted_phrases: str, slash: str, slash_usage: str, spacing_and_punctuation: str, text_in_round_brackets_referring_to_previous_sentence: str, text_in_round_brackets_supplementing_preceding_text: str, titles_of_books_and_newspapers: str, titles_of_creative_works_trade_names_laws_and_regulations: str, uppercase_acronyms: str}, spelling_and_grammar: map{abbreviating_french_word_numero: str, abbreviation_usage: str, accents_and_cedillas: str, accents_in_verbs_conjugated_like_french_word_céder: str, accents_with_subject_verb_inversion: str, active_passive_voice: str, all_caps: str, complete_sentences: str, compound_nouns: str, conjunctions: str, contractions: str, established_loanwords: str, eszett: str, foreign_word_translation: str, french_verbs_ending_in_eler_and_eter: str, i_and_u_with_circumflex_accents: str, informal_address_pronouns: str, latin_abbreviations: str, passive_voice: str, past_participle_of_french_word_laisser_followed_by_infinitive: str, personal_titles: str, pluralizing_foreign_words: str, quotation_modification: str, spanish_word_solo: str, special_characters: str, spelled_out_numbers: str, umlauts: str, unestablished_loanwords: str}, style_and_tone: map{abbreviations: str, addressing_non_binary_people: str, addressing_the_reader: str, anglicisms: str, binary_representation_of_gender: str, complex_sentences: str, country_names: str, declarative_endings: str, default_first_person_pronoun: str, default_second_person_pronoun: str, directional_language: str, double_negatives: str, formality: str, gender_neutral_language_readability: str, gender_unspecified: str, gender_unspecified_or_mixed: str, idioms_colloquialisms_and_culture_specific_references: str, inflected_words_masculine_noun_agreement: str, instructions_style: str, mixing_styles: str, modal_verbs: str, personal_vs_impersonal_style: str, positive_vs_negative_language: str, proximity_agreement: str, reader_action_required: str, redundant_introductory_phrases: str, redundant_phrases: str, referring_to_non_binary_people: str, short_vs_long_words: str, simple_words_and_sentences: str, text_position_references: str, tone: str, verbal_vs_nominal_style: str}, vocabulary: map{abbreviations: str, loanwords: str}}, custom_instructions: [map]}
@errors {400, 401, 403, 429, 456, 500, 503}

@endpoint GET /v3/style_rules/{style_id}
@required {style_id: str}
@returns(200) {style_id: str, name: str, creation_time: str(date-time), updated_time: str(date-time), language: str, version: int, configured_rules: map{dates_and_times: map{calendar_era: str, centuries: str, date_format: str, dates_in_numerical_form: str, decades: str, hours_minutes_seconds_separator: str, hours_minutes_separator: str, midnight_in_numerals: str, single_digit_days_and_months: str, single_digit_hours: str, time_format: str, writing_dates: str, years: str}, formatting: map{email_address_format: str, phone_number_country_code_format: str, phone_number_format: str, space_between_arabic_numerals_and_unit: str, space_between_chinese_and_english: str, space_between_chinese_characters_and_arabic_numerals: str}, numbers: map{approximate_numbers: str, currency_format: str, decimal_numbers_less_than_one: str, decimal_separator: str, dimensions_separator: str, equation_formula_reference: str, kanji_numbers: str, large_number_format: str, large_sums_of_money: str, large_sums_of_money_format: str, list_of_measurements_with_units: str, mathematical_expression_spacing: str, number_format: str, number_separator: str, numbers_of_5_digits_or_more: str, numbers_up_to_4_digits: str, percentage_format: str, reference_to_symbol: str, spelling_out_units: str, temperature_format: str, thousands_separator: str, units_of_measure_spacing: str, use_of_hiragana_and_kanji: str, writing_numbers: str, zero_format: str}, punctuation: map{abbreviations: str, acronyms: str, ampersand_abbreviation_spacing: str, ampersand_usage: str, apostrophe: str, bracket: str, chinese_mixed_with_english: str, colon: str, colon_between_hours_and_minutes_or_chapters_and_verses: str, colon_in_heading: str, colon_to_replace_versus_or_to: str, comma_after_conjunctive_adverbs: str, comma_after_i_e_and_e_g: str, comma_after_short_introductory_phrase: str, comma_and_semicolon: str, corner_bracket_and_periods: str, corner_brackets_and_periods: str, dash: str, ellipsis: str, em_dash: str, emphasis: str, exclamation_marks: str, explanatory_note_indicator: str, full_sentence_in_round_brackets: str, highlighting_specific_expressions: str, japanese_reference_materials: str, parentheses_for_supplementary_information: str, passage_of_time_and_movement_between_locations: str, periods_and_commas: str, periods_in_academic_degrees: str, periods_in_direct_quotes: str, periods_in_uppercase_initialisms_and_acronyms: str, plus_sign_usage: str, possessives_of_proper_names_ending_in_s_style: str, quotation_mark: str, quotation_mark_and_apostrophe: str, quotation_style: str, range_indicator: str, related_phrases_indicator: str, round_brackets: str, salutation: str, sentence_break_indicator: str, serial_comma: str, setting_off_non_quoted_phrases: str, slash: str, slash_usage: str, spacing_and_punctuation: str, text_in_round_brackets_referring_to_previous_sentence: str, text_in_round_brackets_supplementing_preceding_text: str, titles_of_books_and_newspapers: str, titles_of_creative_works_trade_names_laws_and_regulations: str, uppercase_acronyms: str}, spelling_and_grammar: map{abbreviating_french_word_numero: str, abbreviation_usage: str, accents_and_cedillas: str, accents_in_verbs_conjugated_like_french_word_céder: str, accents_with_subject_verb_inversion: str, active_passive_voice: str, all_caps: str, complete_sentences: str, compound_nouns: str, conjunctions: str, contractions: str, established_loanwords: str, eszett: str, foreign_word_translation: str, french_verbs_ending_in_eler_and_eter: str, i_and_u_with_circumflex_accents: str, informal_address_pronouns: str, latin_abbreviations: str, passive_voice: str, past_participle_of_french_word_laisser_followed_by_infinitive: str, personal_titles: str, pluralizing_foreign_words: str, quotation_modification: str, spanish_word_solo: str, special_characters: str, spelled_out_numbers: str, umlauts: str, unestablished_loanwords: str}, style_and_tone: map{abbreviations: str, addressing_non_binary_people: str, addressing_the_reader: str, anglicisms: str, binary_representation_of_gender: str, complex_sentences: str, country_names: str, declarative_endings: str, default_first_person_pronoun: str, default_second_person_pronoun: str, directional_language: str, double_negatives: str, formality: str, gender_neutral_language_readability: str, gender_unspecified: str, gender_unspecified_or_mixed: str, idioms_colloquialisms_and_culture_specific_references: str, inflected_words_masculine_noun_agreement: str, instructions_style: str, mixing_styles: str, modal_verbs: str, personal_vs_impersonal_style: str, positive_vs_negative_language: str, proximity_agreement: str, reader_action_required: str, redundant_introductory_phrases: str, redundant_phrases: str, referring_to_non_binary_people: str, short_vs_long_words: str, simple_words_and_sentences: str, text_position_references: str, tone: str, verbal_vs_nominal_style: str}, vocabulary: map{abbreviations: str, loanwords: str}}, custom_instructions: [map]}
@errors {401, 403, 404, 429, 500, 503}

@endpoint PATCH /v3/style_rules/{style_id}
@required {style_id: str}
@optional {name: str}
@returns(200) {style_id: str, name: str, creation_time: str(date-time), updated_time: str(date-time), language: str, version: int, configured_rules: map{dates_and_times: map{calendar_era: str, centuries: str, date_format: str, dates_in_numerical_form: str, decades: str, hours_minutes_seconds_separator: str, hours_minutes_separator: str, midnight_in_numerals: str, single_digit_days_and_months: str, single_digit_hours: str, time_format: str, writing_dates: str, years: str}, formatting: map{email_address_format: str, phone_number_country_code_format: str, phone_number_format: str, space_between_arabic_numerals_and_unit: str, space_between_chinese_and_english: str, space_between_chinese_characters_and_arabic_numerals: str}, numbers: map{approximate_numbers: str, currency_format: str, decimal_numbers_less_than_one: str, decimal_separator: str, dimensions_separator: str, equation_formula_reference: str, kanji_numbers: str, large_number_format: str, large_sums_of_money: str, large_sums_of_money_format: str, list_of_measurements_with_units: str, mathematical_expression_spacing: str, number_format: str, number_separator: str, numbers_of_5_digits_or_more: str, numbers_up_to_4_digits: str, percentage_format: str, reference_to_symbol: str, spelling_out_units: str, temperature_format: str, thousands_separator: str, units_of_measure_spacing: str, use_of_hiragana_and_kanji: str, writing_numbers: str, zero_format: str}, punctuation: map{abbreviations: str, acronyms: str, ampersand_abbreviation_spacing: str, ampersand_usage: str, apostrophe: str, bracket: str, chinese_mixed_with_english: str, colon: str, colon_between_hours_and_minutes_or_chapters_and_verses: str, colon_in_heading: str, colon_to_replace_versus_or_to: str, comma_after_conjunctive_adverbs: str, comma_after_i_e_and_e_g: str, comma_after_short_introductory_phrase: str, comma_and_semicolon: str, corner_bracket_and_periods: str, corner_brackets_and_periods: str, dash: str, ellipsis: str, em_dash: str, emphasis: str, exclamation_marks: str, explanatory_note_indicator: str, full_sentence_in_round_brackets: str, highlighting_specific_expressions: str, japanese_reference_materials: str, parentheses_for_supplementary_information: str, passage_of_time_and_movement_between_locations: str, periods_and_commas: str, periods_in_academic_degrees: str, periods_in_direct_quotes: str, periods_in_uppercase_initialisms_and_acronyms: str, plus_sign_usage: str, possessives_of_proper_names_ending_in_s_style: str, quotation_mark: str, quotation_mark_and_apostrophe: str, quotation_style: str, range_indicator: str, related_phrases_indicator: str, round_brackets: str, salutation: str, sentence_break_indicator: str, serial_comma: str, setting_off_non_quoted_phrases: str, slash: str, slash_usage: str, spacing_and_punctuation: str, text_in_round_brackets_referring_to_previous_sentence: str, text_in_round_brackets_supplementing_preceding_text: str, titles_of_books_and_newspapers: str, titles_of_creative_works_trade_names_laws_and_regulations: str, uppercase_acronyms: str}, spelling_and_grammar: map{abbreviating_french_word_numero: str, abbreviation_usage: str, accents_and_cedillas: str, accents_in_verbs_conjugated_like_french_word_céder: str, accents_with_subject_verb_inversion: str, active_passive_voice: str, all_caps: str, complete_sentences: str, compound_nouns: str, conjunctions: str, contractions: str, established_loanwords: str, eszett: str, foreign_word_translation: str, french_verbs_ending_in_eler_and_eter: str, i_and_u_with_circumflex_accents: str, informal_address_pronouns: str, latin_abbreviations: str, passive_voice: str, past_participle_of_french_word_laisser_followed_by_infinitive: str, personal_titles: str, pluralizing_foreign_words: str, quotation_modification: str, spanish_word_solo: str, special_characters: str, spelled_out_numbers: str, umlauts: str, unestablished_loanwords: str}, style_and_tone: map{abbreviations: str, addressing_non_binary_people: str, addressing_the_reader: str, anglicisms: str, binary_representation_of_gender: str, complex_sentences: str, country_names: str, declarative_endings: str, default_first_person_pronoun: str, default_second_person_pronoun: str, directional_language: str, double_negatives: str, formality: str, gender_neutral_language_readability: str, gender_unspecified: str, gender_unspecified_or_mixed: str, idioms_colloquialisms_and_culture_specific_references: str, inflected_words_masculine_noun_agreement: str, instructions_style: str, mixing_styles: str, modal_verbs: str, personal_vs_impersonal_style: str, positive_vs_negative_language: str, proximity_agreement: str, reader_action_required: str, redundant_introductory_phrases: str, redundant_phrases: str, referring_to_non_binary_people: str, short_vs_long_words: str, simple_words_and_sentences: str, text_position_references: str, tone: str, verbal_vs_nominal_style: str}, vocabulary: map{abbreviations: str, loanwords: str}}, custom_instructions: [map]}
@errors {400, 401, 403, 404, 429, 456, 500, 503}

@endpoint DELETE /v3/style_rules/{style_id}
@required {style_id: str}
@returns(204)
@errors {401, 403, 404, 429, 500, 503}

@endpoint PUT /v3/style_rules/{style_id}/configured_rules
@required {style_id: str}
@optional {dates_and_times: map{calendar_era: str, centuries: str, date_format: str, dates_in_numerical_form: str, decades: str, hours_minutes_seconds_separator: str, hours_minutes_separator: str, midnight_in_numerals: str, single_digit_days_and_months: str, single_digit_hours: str, time_format: str, writing_dates: str, years: str}, formatting: map{email_address_format: str, phone_number_country_code_format: str, phone_number_format: str, space_between_arabic_numerals_and_unit: str, space_between_chinese_and_english: str, space_between_chinese_characters_and_arabic_numerals: str}, numbers: map{approximate_numbers: str, currency_format: str, decimal_numbers_less_than_one: str, decimal_separator: str, dimensions_separator: str, equation_formula_reference: str, kanji_numbers: str, large_number_format: str, large_sums_of_money: str, large_sums_of_money_format: str, list_of_measurements_with_units: str, mathematical_expression_spacing: str, number_format: str, number_separator: str, numbers_of_5_digits_or_more: str, numbers_up_to_4_digits: str, percentage_format: str, reference_to_symbol: str, spelling_out_units: str, temperature_format: str, thousands_separator: str, units_of_measure_spacing: str, use_of_hiragana_and_kanji: str, writing_numbers: str, zero_format: str}, punctuation: map{abbreviations: str, acronyms: str, ampersand_abbreviation_spacing: str, ampersand_usage: str, apostrophe: str, bracket: str, chinese_mixed_with_english: str, colon: str, colon_between_hours_and_minutes_or_chapters_and_verses: str, colon_in_heading: str, colon_to_replace_versus_or_to: str, comma_after_conjunctive_adverbs: str, comma_after_i_e_and_e_g: str, comma_after_short_introductory_phrase: str, comma_and_semicolon: str, corner_bracket_and_periods: str, corner_brackets_and_periods: str, dash: str, ellipsis: str, em_dash: str, emphasis: str, exclamation_marks: str, explanatory_note_indicator: str, full_sentence_in_round_brackets: str, highlighting_specific_expressions: str, japanese_reference_materials: str, parentheses_for_supplementary_information: str, passage_of_time_and_movement_between_locations: str, periods_and_commas: str, periods_in_academic_degrees: str, periods_in_direct_quotes: str, periods_in_uppercase_initialisms_and_acronyms: str, plus_sign_usage: str, possessives_of_proper_names_ending_in_s_style: str, quotation_mark: str, quotation_mark_and_apostrophe: str, quotation_style: str, range_indicator: str, related_phrases_indicator: str, round_brackets: str, salutation: str, sentence_break_indicator: str, serial_comma: str, setting_off_non_quoted_phrases: str, slash: str, slash_usage: str, spacing_and_punctuation: str, text_in_round_brackets_referring_to_previous_sentence: str, text_in_round_brackets_supplementing_preceding_text: str, titles_of_books_and_newspapers: str, titles_of_creative_works_trade_names_laws_and_regulations: str, uppercase_acronyms: str}, spelling_and_grammar: map{abbreviating_french_word_numero: str, abbreviation_usage: str, accents_and_cedillas: str, accents_in_verbs_conjugated_like_french_word_céder: str, accents_with_subject_verb_inversion: str, active_passive_voice: str, all_caps: str, complete_sentences: str, compound_nouns: str, conjunctions: str, contractions: str, established_loanwords: str, eszett: str, foreign_word_translation: str, french_verbs_ending_in_eler_and_eter: str, i_and_u_with_circumflex_accents: str, informal_address_pronouns: str, latin_abbreviations: str, passive_voice: str, past_participle_of_french_word_laisser_followed_by_infinitive: str, personal_titles: str, pluralizing_foreign_words: str, quotation_modification: str, spanish_word_solo: str, special_characters: str, spelled_out_numbers: str, umlauts: str, unestablished_loanwords: str}, style_and_tone: map{abbreviations: str, addressing_non_binary_people: str, addressing_the_reader: str, anglicisms: str, binary_representation_of_gender: str, complex_sentences: str, country_names: str, declarative_endings: str, default_first_person_pronoun: str, default_second_person_pronoun: str, directional_language: str, double_negatives: str, formality: str, gender_neutral_language_readability: str, gender_unspecified: str, gender_unspecified_or_mixed: str, idioms_colloquialisms_and_culture_specific_references: str, inflected_words_masculine_noun_agreement: str, instructions_style: str, mixing_styles: str, modal_verbs: str, personal_vs_impersonal_style: str, positive_vs_negative_language: str, proximity_agreement: str, reader_action_required: str, redundant_introductory_phrases: str, redundant_phrases: str, referring_to_non_binary_people: str, short_vs_long_words: str, simple_words_and_sentences: str, text_position_references: str, tone: str, verbal_vs_nominal_style: str}, vocabulary: map{abbreviations: str, loanwords: str}}
@returns(200) {style_id: str, name: str, creation_time: str(date-time), updated_time: str(date-time), language: str, version: int, configured_rules: map{dates_and_times: map{calendar_era: str, centuries: str, date_format: str, dates_in_numerical_form: str, decades: str, hours_minutes_seconds_separator: str, hours_minutes_separator: str, midnight_in_numerals: str, single_digit_days_and_months: str, single_digit_hours: str, time_format: str, writing_dates: str, years: str}, formatting: map{email_address_format: str, phone_number_country_code_format: str, phone_number_format: str, space_between_arabic_numerals_and_unit: str, space_between_chinese_and_english: str, space_between_chinese_characters_and_arabic_numerals: str}, numbers: map{approximate_numbers: str, currency_format: str, decimal_numbers_less_than_one: str, decimal_separator: str, dimensions_separator: str, equation_formula_reference: str, kanji_numbers: str, large_number_format: str, large_sums_of_money: str, large_sums_of_money_format: str, list_of_measurements_with_units: str, mathematical_expression_spacing: str, number_format: str, number_separator: str, numbers_of_5_digits_or_more: str, numbers_up_to_4_digits: str, percentage_format: str, reference_to_symbol: str, spelling_out_units: str, temperature_format: str, thousands_separator: str, units_of_measure_spacing: str, use_of_hiragana_and_kanji: str, writing_numbers: str, zero_format: str}, punctuation: map{abbreviations: str, acronyms: str, ampersand_abbreviation_spacing: str, ampersand_usage: str, apostrophe: str, bracket: str, chinese_mixed_with_english: str, colon: str, colon_between_hours_and_minutes_or_chapters_and_verses: str, colon_in_heading: str, colon_to_replace_versus_or_to: str, comma_after_conjunctive_adverbs: str, comma_after_i_e_and_e_g: str, comma_after_short_introductory_phrase: str, comma_and_semicolon: str, corner_bracket_and_periods: str, corner_brackets_and_periods: str, dash: str, ellipsis: str, em_dash: str, emphasis: str, exclamation_marks: str, explanatory_note_indicator: str, full_sentence_in_round_brackets: str, highlighting_specific_expressions: str, japanese_reference_materials: str, parentheses_for_supplementary_information: str, passage_of_time_and_movement_between_locations: str, periods_and_commas: str, periods_in_academic_degrees: str, periods_in_direct_quotes: str, periods_in_uppercase_initialisms_and_acronyms: str, plus_sign_usage: str, possessives_of_proper_names_ending_in_s_style: str, quotation_mark: str, quotation_mark_and_apostrophe: str, quotation_style: str, range_indicator: str, related_phrases_indicator: str, round_brackets: str, salutation: str, sentence_break_indicator: str, serial_comma: str, setting_off_non_quoted_phrases: str, slash: str, slash_usage: str, spacing_and_punctuation: str, text_in_round_brackets_referring_to_previous_sentence: str, text_in_round_brackets_supplementing_preceding_text: str, titles_of_books_and_newspapers: str, titles_of_creative_works_trade_names_laws_and_regulations: str, uppercase_acronyms: str}, spelling_and_grammar: map{abbreviating_french_word_numero: str, abbreviation_usage: str, accents_and_cedillas: str, accents_in_verbs_conjugated_like_french_word_céder: str, accents_with_subject_verb_inversion: str, active_passive_voice: str, all_caps: str, complete_sentences: str, compound_nouns: str, conjunctions: str, contractions: str, established_loanwords: str, eszett: str, foreign_word_translation: str, french_verbs_ending_in_eler_and_eter: str, i_and_u_with_circumflex_accents: str, informal_address_pronouns: str, latin_abbreviations: str, passive_voice: str, past_participle_of_french_word_laisser_followed_by_infinitive: str, personal_titles: str, pluralizing_foreign_words: str, quotation_modification: str, spanish_word_solo: str, special_characters: str, spelled_out_numbers: str, umlauts: str, unestablished_loanwords: str}, style_and_tone: map{abbreviations: str, addressing_non_binary_people: str, addressing_the_reader: str, anglicisms: str, binary_representation_of_gender: str, complex_sentences: str, country_names: str, declarative_endings: str, default_first_person_pronoun: str, default_second_person_pronoun: str, directional_language: str, double_negatives: str, formality: str, gender_neutral_language_readability: str, gender_unspecified: str, gender_unspecified_or_mixed: str, idioms_colloquialisms_and_culture_specific_references: str, inflected_words_masculine_noun_agreement: str, instructions_style: str, mixing_styles: str, modal_verbs: str, personal_vs_impersonal_style: str, positive_vs_negative_language: str, proximity_agreement: str, reader_action_required: str, redundant_introductory_phrases: str, redundant_phrases: str, referring_to_non_binary_people: str, short_vs_long_words: str, simple_words_and_sentences: str, text_position_references: str, tone: str, verbal_vs_nominal_style: str}, vocabulary: map{abbreviations: str, loanwords: str}}, custom_instructions: [map]}
@errors {400, 401, 403, 404, 429, 500, 503}

@endpoint POST /v3/style_rules/{style_id}/custom_instructions
@required {style_id: str, label: str, prompt: str}
@optional {source_language: str}
@returns(201) {id: str, label: str, prompt: str, source_language: str}
@errors {400, 401, 403, 404, 429, 456, 500, 503}

@endpoint GET /v3/style_rules/{style_id}/custom_instructions/{instruction_id}
@required {style_id: str, instruction_id: str}
@returns(200) {id: str, label: str, prompt: str, source_language: str}
@errors {401, 403, 404, 429, 500, 503}

@endpoint PUT /v3/style_rules/{style_id}/custom_instructions/{instruction_id}
@required {style_id: str, instruction_id: str, label: str, prompt: str}
@optional {source_language: str}
@returns(200) {id: str, label: str, prompt: str, source_language: str}
@errors {400, 401, 403, 404, 429, 500, 503}

@endpoint DELETE /v3/style_rules/{style_id}/custom_instructions/{instruction_id}
@required {style_id: str, instruction_id: str}
@returns(204)
@errors {401, 403, 404, 429, 500, 503}

@endgroup

@group voice
@endpoint POST /v3/voice/realtime
@required {source_media_content_type: str(audio/auto/audio/flac/audio/mpeg/audio/ogg/audio/webm/audio/x-matroska/audio/ogg; codecs=flac/audio/ogg; codecs=opus/audio/pcm; encoding=s16le; rate=8000/audio/pcm; encoding=s16le; rate=16000/audio/pcm; encoding=s16le; rate=44100/audio/pcm; encoding=s16le; rate=48000/audio/webm; codecs=opus/audio/x-matroska; codecs=aac/audio/x-matroska; codecs=flac/audio/x-matroska; codecs=mp3/audio/x-matroska; codecs=opus)}
@optional {source_language: str(zh/nl/en/fr/de/id/it/ja/ko/pl/pt/ro/ru/es/sv/tr/uk), source_language_mode: str(auto/fixed)=auto, target_languages: [str], glossary_id: str, formality: str(default/formal/more/informal/less)=default}
@returns(200) {streaming_url: str, token: str, session_id: str}
@errors {400, 401, 403, 429, 456, 500, 503}

@endpoint GET /v3/voice/realtime
@required {token: str}
@returns(200) {streaming_url: str, token: str, session_id: str}
@errors {400, 401, 403, 429, 456, 500, 503}

@endgroup

@end
