@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AssemblyAI API
@base https://api.assemblyai.com
@version 1.3.4
@auth ApiKey Authorization in header
@endpoints 10
@toc upload(1), transcript(9)

@group upload
@endpoint POST /v2/upload
@returns(200) {upload_url: str(url)}
@errors {400, 401, 403, 404, 429, 500, 503, 504}

@endgroup

@group transcript
@endpoint POST /v2/transcript
@returns(200) {audio_channels: int, audio_duration: int?, audio_end_at: int?, audio_start_from: int?, audio_url: str(url), auto_chapters: bool?, auto_highlights: bool, auto_highlights_result: any, chapters: [map]?, confidence: num(double)?, content_safety: bool?, content_safety_labels: any, custom_spelling: [map]?, disfluencies: bool?, domain: str?, entities: [map]?, entity_detection: bool?, error: str, filter_profanity: bool?, format_text: bool?, iab_categories: bool?, iab_categories_result: any, id: str(uuid), keyterms_prompt: [str], language_code: any, language_codes: [str]?, language_confidence: num(double)?, language_confidence_threshold: num(float)?, language_detection: bool?, language_detection_options: map{expected_languages: [str], fallback_language: str, code_switching: bool, code_switching_confidence_threshold: num}, multichannel: bool?, prompt: str, punctuate: bool?, redact_pii: bool, redact_pii_audio: bool?, redact_pii_audio_options: map{return_redacted_no_speech_audio: bool, override_audio_redaction_method: str}, redact_pii_audio_quality: any, redact_pii_policies: [str]?, redact_pii_sub: str, sentiment_analysis: bool?, sentiment_analysis_results: [map]?, speaker_labels: bool?, speakers_expected: int?, speech_model_used: str, speech_models: [str]?, speech_threshold: num(float)?, speech_understanding: map{request: any, response: any}, status: str, summarization: bool, summary: str?, summary_model: str?, summary_type: str?, remove_audio_tags: any, temperature: num?, text: str?, throttled: bool?, utterances: [map]?, webhook_auth: bool, webhook_auth_header_name: str?, webhook_status_code: int?, webhook_url: str(url)?, words: [map]?, acoustic_model: str, custom_topics: bool?, language_model: str, speech_model: any, speed_boost: bool?, topics: [str], translated_texts: map{language_code: str}}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript
@optional {limit: int=10, status: str, created_on: str(date), before_id: str(uuid), after_id: str(uuid), throttled_only: bool=false}
@returns(200) {page_details: map{limit: int, result_count: int, current_url: str(url), prev_url: str(url)?, next_url: str(url)?}, transcripts: [map]}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}
@required {transcript_id: str}
@returns(200) {audio_channels: int, audio_duration: int?, audio_end_at: int?, audio_start_from: int?, audio_url: str(url), auto_chapters: bool?, auto_highlights: bool, auto_highlights_result: any, chapters: [map]?, confidence: num(double)?, content_safety: bool?, content_safety_labels: any, custom_spelling: [map]?, disfluencies: bool?, domain: str?, entities: [map]?, entity_detection: bool?, error: str, filter_profanity: bool?, format_text: bool?, iab_categories: bool?, iab_categories_result: any, id: str(uuid), keyterms_prompt: [str], language_code: any, language_codes: [str]?, language_confidence: num(double)?, language_confidence_threshold: num(float)?, language_detection: bool?, language_detection_options: map{expected_languages: [str], fallback_language: str, code_switching: bool, code_switching_confidence_threshold: num}, multichannel: bool?, prompt: str, punctuate: bool?, redact_pii: bool, redact_pii_audio: bool?, redact_pii_audio_options: map{return_redacted_no_speech_audio: bool, override_audio_redaction_method: str}, redact_pii_audio_quality: any, redact_pii_policies: [str]?, redact_pii_sub: str, sentiment_analysis: bool?, sentiment_analysis_results: [map]?, speaker_labels: bool?, speakers_expected: int?, speech_model_used: str, speech_models: [str]?, speech_threshold: num(float)?, speech_understanding: map{request: any, response: any}, status: str, summarization: bool, summary: str?, summary_model: str?, summary_type: str?, remove_audio_tags: any, temperature: num?, text: str?, throttled: bool?, utterances: [map]?, webhook_auth: bool, webhook_auth_header_name: str?, webhook_status_code: int?, webhook_url: str(url)?, words: [map]?, acoustic_model: str, custom_topics: bool?, language_model: str, speech_model: any, speed_boost: bool?, topics: [str], translated_texts: map{language_code: str}}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint DELETE /v2/transcript/{transcript_id}
@required {transcript_id: str}
@returns(200) {audio_channels: int, audio_duration: int?, audio_end_at: int?, audio_start_from: int?, audio_url: str(url), auto_chapters: bool?, auto_highlights: bool, auto_highlights_result: any, chapters: [map]?, confidence: num(double)?, content_safety: bool?, content_safety_labels: any, custom_spelling: [map]?, disfluencies: bool?, domain: str?, entities: [map]?, entity_detection: bool?, error: str, filter_profanity: bool?, format_text: bool?, iab_categories: bool?, iab_categories_result: any, id: str(uuid), keyterms_prompt: [str], language_code: any, language_codes: [str]?, language_confidence: num(double)?, language_confidence_threshold: num(float)?, language_detection: bool?, language_detection_options: map{expected_languages: [str], fallback_language: str, code_switching: bool, code_switching_confidence_threshold: num}, multichannel: bool?, prompt: str, punctuate: bool?, redact_pii: bool, redact_pii_audio: bool?, redact_pii_audio_options: map{return_redacted_no_speech_audio: bool, override_audio_redaction_method: str}, redact_pii_audio_quality: any, redact_pii_policies: [str]?, redact_pii_sub: str, sentiment_analysis: bool?, sentiment_analysis_results: [map]?, speaker_labels: bool?, speakers_expected: int?, speech_model_used: str, speech_models: [str]?, speech_threshold: num(float)?, speech_understanding: map{request: any, response: any}, status: str, summarization: bool, summary: str?, summary_model: str?, summary_type: str?, remove_audio_tags: any, temperature: num?, text: str?, throttled: bool?, utterances: [map]?, webhook_auth: bool, webhook_auth_header_name: str?, webhook_status_code: int?, webhook_url: str(url)?, words: [map]?, acoustic_model: str, custom_topics: bool?, language_model: str, speech_model: any, speed_boost: bool?, topics: [str], translated_texts: map{language_code: str}}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}/{subtitle_format}
@required {transcript_id: str, subtitle_format: str}
@optional {chars_per_caption: int}
@returns(200)
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}/sentences
@required {transcript_id: str}
@returns(200) {id: str(uuid), confidence: num(double), audio_duration: num, sentences: [map]}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}/paragraphs
@required {transcript_id: str}
@returns(200) {id: str(uuid), confidence: num(double), audio_duration: num, paragraphs: [map]}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}/word-search
@required {transcript_id: str, words: [str]}
@returns(200) {id: str(uuid), total_count: int, matches: [map]}
@errors {400, 401, 404, 429, 500, 503, 504}

@endpoint GET /v2/transcript/{transcript_id}/redacted-audio
@required {transcript_id: str}
@returns(200) {status: str, redacted_audio_url: str(url)}
@errors {400, 401, 404, 429, 500, 503, 504}

@endgroup

@end
