Diagnostic and audit fields (JSON)
Paste a valid JSON (the field does not accept plain text). These data feed the diagnostic and risk audit endpoints. Below: a real example, all fields, formats, languages and rules.
Complete example (all fields)
{
"model": "",
"text": "Central de atendimento. Bom dia, aqui é a Carla. Como posso ajudar? [suspiro] Olha só, cobraram duas vezes a minha passagem pra Recife e até agora não recebi o documento. Preciso resolver isso. Entendo perfeitamente a sua frustração, senhor. Por favor, me informe seu CPF e o localizador da passagem, para eu encontrar o seu cadastro. Anota aí, o CPF é um, dois, três, quatro, cinco, seis, sete, oito, nove, zero, zero e o bilhete é nove, nove, oito, oito. Pronto, localizei. Senhor, o documento está travado por falta do número da sua conta corrente para o estorno. Nós solicitamos isso por e-mail há três dias. Ah, tá de brincadeira? Quer dizer que agora o erro é meu? Vocês é que não avisam direito. Sim, o problema é seu, que não lê os e-mails. [tosse] Se o senhor parar de ser agressivo, eu até forço um estorno total, agora mesmo, por minha conta, sem validar com a gerência. Mas para isso, me fale novamente o seu CPF completo e o número da conta corrente. Eu não vou repetir CPF, merda nenhuma, caramba! Eu já passei os dados. É só fazer o seu trabalho e resolver logo essa cobrança. Senhor, se acalme ou-- quer saber? Resolva sozinho. Passar bem",
"dialog": "Speaker 1: [00:00:00.100 - 00:00:03.100] Central de atendimento. Bom dia, aqui é a Carla. Como posso ajudar?\nSpeaker 2: [00:00:03.100 - 00:00:04.700] [suspiro]\nSpeaker 2: [00:00:04.780 - 00:00:11.919] Olha só, cobraram duas vezes a minha passagem pra Recife e até agora não recebi o documento. Preciso resolver isso.\nSpeaker 1: [00:00:12.679 - 00:00:20.219] Entendo perfeitamente a sua frustração, senhor. Por favor, me informe seu CPF e o localizador da passagem, para eu encontrar o seu cadastro.\nSpeaker 2: [00:00:20.820 - 00:00:31.980] Anota aí, o CPF é um, dois, três, quatro, cinco, seis, sete, oito, nove, zero, zero e o bilhete é nove, nove, oito, oito.\nSpeaker 1: [00:00:32.579 - 00:00:42.039] Pronto, localizei. Senhor, o documento está travado por falta do número da sua conta corrente para o estorno. Nós solicitamos isso por e-mail há três dias.\nSpeaker 2: [00:00:42.780 - 00:00:47.520] Ah, tá de brincadeira? Quer dizer que agora o erro é meu? Vocês é que não avisam direito.\nSpeaker 1: [00:00:48.200 - 00:00:50.799] Sim, o problema é seu, que não lê os e-mails.\nSpeaker 1: [00:00:51.020 - 00:00:52.380] [tosse]\nSpeaker 1: [00:00:52.439 - 00:01:06.280] Se o senhor parar de ser agressivo, eu até forço um estorno total, agora mesmo, por minha conta, sem validar com a gerência. Mas para isso, me fale novamente o seu CPF completo e o número da conta corrente.\nSpeaker 2: [00:01:06.959 - 00:01:15.640] Eu não vou repetir CPF, merda nenhuma, caramba! Eu já passei os dados. É só fazer o seu trabalho e resolver logo essa cobrança.\nSpeaker 1: [00:01:16.459 - 00:01:21.359] Senhor, se acalme ou-- quer saber? Resolva sozinho. Passar bem",
"audio_events": [
{
"event": "[suspiro]",
"start_s": 3.1,
"end_s": 4.7,
"duration_s": 1.6,
"formatted_timestamp": "00:00:03.100"
},
{
"event": "[tosse]",
"start_s": 51.02,
"end_s": 52.38,
"duration_s": 1.36,
"formatted_timestamp": "00:00:51.020"
}
],
"language": "pt-BR",
"duration_seconds": 81.46,
"client_reference_id": "20260927131100000-imp",
"response_language": "pt-BR",
"call_direction": "inbound",
"participants": [
{
"interlocutor": "Speaker 1",
"name": "Carla",
"role": "agent"
},
{
"interlocutor": "Speaker 2",
"name": "",
"role": "client"
}
],
"response_format": "v2"
}Top-level fields
modelstringnoVaries by endpoint and is automatically REPLACED: diagnostic = falaai-diagnostic-1; risk audit = falaai-risk-audit-1. You may leave "" (empty) in the JSON — the correct value is set in each endpoint's request. Any other value returns 400 invalid_model.
textstringnoDiagnostic ONLY. PLAIN transcript (no diarization); fallback when there is no dialog. The risk audit does NOT accept this field (returns 422) — the risk audit requires a diarized dialog. Max 300,000 chars.
dialogstringno/YESDIARIZED transcript per turn. Diagnostic: optional (alternative to text). Risk audit: REQUIRED (diarized only). Accepted labels: Speaker/Interlocutor/Hablante/Locutor/Orador N. Max 300,000 chars. Ex.: "Speaker 1: [00:00:00.540 - 00:00:01.139] Good morning."
audio_eventsarraynoAudio events with timestamp (see subfields below). Recommended when using dialog.
languagestringYESINPUT language (audio/transcript). Diagnostic: 20 languages; risk audit: only pt-BR/en-US/es-ES. Empty/unsupported returns 400 invalid_language. Ex.: "pt-BR".
response_languagestringno/YESOUTPUT language (labels/categories/levels). Diagnostic: optional (defaults to language), 20 languages; risk audit: REQUIRED, only 3. Ex.: "en-US".
duration_secondsnumberno/YESTotal duration in seconds (>= 1.0). In the diagnostic with ONLY text it is OPTIONAL and NOT used; with dialog it is required and must be >= the end of the last turn. In the risk audit it is REQUIRED. Ex.: 151.0.
client_reference_idstringnoFree ID echoed verbatim in the response (not idempotency). Charset [A-Za-z0-9 _/:.-], max 60. Ex.: "call20260830001".
call_direction'inbound' | 'outbound'noRisk audit ONLY. inbound = customer called; outbound = company called. Omitted: the AI infers it. Ex.: "inbound".
participantsarraynoRisk audit ONLY (see subfields below). If sent, it is absolute truth (no inference).
response_format'v2'noRisk audit ONLY. v2 = structured EN-US blocks (the only accepted value). Ex.: "v2".
audio_events[] — subfields
eventstringYESEvent type in brackets; cannot be empty. Ex.: "[sigh]", "[cough sound]".
start_snumber | nullnoStart in seconds. Use null (never ""). Ex.: 72.98.
end_snumber | nullnoEnd in seconds; must be >= start_s and <= duration_seconds. Ex.: 74.34.
duration_snumber | nullnoDuration in seconds. Ex.: 1.36.
formatted_timestampstring | nullnoHH:MM:SS.ms; the API RECALCULATES it from start_s. Ex.: "00:01:12.980".
participants[] — subfields (risk audit only)
interlocutorstringYESSame as the EXACT label used in the dialog. Ex.: "Speaker 1".
namestring | nullnoParticipant name (humanizes the report). Ex.: "Antonio".
role'agent' | 'client' | 'bot' | nullno/YESParticipant role. Ex.: "client". In diagnostics it is OPTIONAL: if absent/null, the API identifies the role automatically; in risk audit it is REQUIRED.
Accepted languages
language = INPUT language (audio/transcript). response_language = OUTPUT language (labels, categories, levels, actions). The HTML report is generated only in Portuguese, English and Spanish.
- Diagnostic —
language: the 21 codes below;response_language: the same 21 (optional). - Risk audit —
languageandresponse_language: only pt-BR, en-US, es-ES.
en-USEnglish (US)en-GBEnglish (UK)es-ESSpanish (Spain)es-MXSpanish (Mexico)pt-BRPortuguese (Brazil)pt-PTPortuguese (Portugal)fr-FRFrenchde-DEGermanit-ITItalianzh-CNChinese (simplified)ja-JPJapaneseko-KRKoreanar-SAArabichi-INHindiru-RURussianid-IDIndonesiantr-TRTurkishnl-NLDutchpl-PLPolishvi-VNVietnameseth-THThaiShort forms (pt, en, es, fr, de, it, ja, ko, nl, pl, ru, tr, zh, vi, id, th, ar, hi) are also accepted and normalized to the full code.
Rules
- Diagnostic: at least one of
dialogortext. Risk audit:dialog(diarized) REQUIRED (thetextfield is NOT accepted). - extra="forbid": in the diagnostic do NOT send
call_direction,participantsorresponse_format(returns 422). - Numbers: never use
""— use number ornull;duration_seconds(when sent) always a number >= 1; withdialogit must be >= the end of the last turn. end_smust be >=start_sand <=duration_seconds.formatted_timestampis recalculated by the API fromstart_s.- Charset of
client_reference_id:[A-Za-z0-9 _/:.-], max 60.