FalaAI API (1.21.67)

Download OpenAPI specification:

speech

Transcribe audio to text

Transcribes one uploaded audio file into text with speaker diarization and timestamped audio events (laughs, sighs, pauses), returning the full transcript, a turn-by-turn dialog with speaker labels and start/end timestamps, the detected events and the word count. Use it when a recording must become text for analysis, review or storage of the transcript. The required file field takes a single audio upload limited to 1GB and 3 hours, with accepted MIME types audio/mpeg, audio/mp3, audio/mp4, audio/m4a, audio/wav, audio/wave, audio/x-wav, audio/flac, audio/x-flac, audio/ogg, audio/opus, video/ogg, audio/webm, video/webm, audio/aac and audio/x-aac. model is optional and defaults to falaai-transcribe-1, the only supported value; language is an optional two-letter code (pt, en, es, fr, de, it, ja, ko, nl, pl, ru, tr, zh, vi, id, th, ar, hi, cs, da, el, fi, he, hu, ms, no, ro, sk, sv, ta, uk) that forces the audio language and is auto-detected when omitted; client_reference_id is optional, charset A-Za-z0-9 space _/:.- up to 60 chars, echoed verbatim (not idempotency). Billing is 1 credit per second of processed audio with a minimum of 10 credits per request, rounded to 2 decimals; usage reports credits_consumed and processing_ms. Stateless: the audio is processed in memory and never persisted (LGPD). Returns id (tr-), language, language_confidence, duration_seconds, text, dialog, audio_events, event_types, word_count and input metadata (duration, format, codec, sample rate, channels).

Authorizations:
ApiKeyAuth
Request Body schema: multipart/form-data
required
file
required
string <binary> (File)
model
string (Model)
Default: "falaai-transcribe-1"
language
string (Language)
client_reference_id
string (Client Reference Id)

Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency.

Responses

Request samples

# frozen_string_literal: true
require 'falaai-api'

config = FalaAI::Configuration.new
config.scheme = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').start_with?('https') ? 'https' : 'http'
config.host = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').sub(%r{^https?://}, '')
config.base_path = ''
config.access_token = ENV['FALAAI_API_KEY']
client = FalaAI::ApiClient.new(config)

audio = File.open("demo_callcenter.mp3")
# REQUIRED: file (audio) + Authorization (fai_ key)
# OPTIONAL (server defaults): model -> falaai-transcribe-1 | language -> pt | client_reference_id -> (empty)
transcription, _status = FalaAI::SpeechApi.new(client).create_transcription_v1_audio_transcriptions_post_with_http_info(
  audio,
    model: "falaai-transcribe-1",
    language: "pt",
    client_reference_id: "20260927140800000-aud"
)
puts JSON.pretty_generate(transcription.to_hash)

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "string",
  • "model": "string",
  • "filename": "string",
  • "processed_at": "string",
  • "usage": {
    },
  • "language": "string",
  • "language_confidence": 0,
  • "duration_seconds": 0,
  • "text": "string",
  • "dialog": "string",
  • "audio_events": [
    ],
  • "event_types": [
    ],
  • "word_count": 0,
  • "input": {
    },
  • "client_reference_id": "string"
}

analysis

Analyze a call transcript — 5 parallel analyses

Analyzes a call transcript and returns six structured blocks: dialogue summary, contact reason, identified action, theme label, predominant sentiment and identified participants with roles, names, confidence and evidence; use it for a fast, generic diagnosis of what happened in a call, and use /v1/analyze/riskAudit instead when the goal is compliance violation auditing. Provide at least one of dialog (primary source: diarized transcript in the format 'Speaker 1: [00:00:00.540 - 00:00:01.139] text', speaker labels accepted in any case as Speaker, Interlocutor, Hablante, Locutor or Orador plus number) or text (plain transcript fallback), each up to 300,000 characters; when dialog is used duration_seconds is required by the schema and, when provided, must be >= the last turn end time. Required: language; optional: model (always 'falaai-diagnostic-1'), audio_events, response_language (language of the results, defaulting to language), participants (up to 10 with interlocutor and optional name and role agent/client/bot, ground truth when the role is informed and otherwise inferred), call_direction (inferred when omitted), client_reference_id (echoed verbatim, charset [A-Za-z0-9 _/:.-], max 60). Returns id, object 'analysis', response_language, analysis with the six blocks, usage (characters, credits_consumed, processing_ms) and html_report (base64 gzip) only when dialog is provided; with text-only input the participant roles are forced to confidence 'low'. Credits are charged per character of the transcript (0.03/char, counted without speaker labels, timestamps and inline expression tokens, minimum 500 characters, plus 50 characters per audio event) and the amount charged is returned in usage.credits_consumed. Stateless: neither the transcript nor the analysis is persisted (only billing and usage metadata is logged), protecting personal data under LGPD.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
model
string (Model)
Default: "falaai-diagnostic-1"

Analysis model. Always 'falaai-diagnostic-1'

text
string (Text) <= 300000 characters
Default: ""

Plain transcript (fallback if dialog is empty). At least one of 'dialog' or 'text' required. Max 300,000 characters

dialog
string (Dialog) <= 300000 characters
Default: ""

Diarized transcript with speaker turns. PRIMARY source. At least one of 'dialog' or 'text' required. Speaker labels accepted (any case): 'Speaker N', 'Interlocutor N', 'Hablante N', 'Locutor N', 'Orador N' (space or underscore). Normalized internally to 'Speaker N' in the response. Max 300,000 characters

Array of objects (Audio Events) <= 500 items
Default: []

Detected audio events with timestamps (required when using dialog)

language
required
string (Language)

Transcript language. Required. Accepted: en-US, pt-BR, es-ES, es-MX, fr-FR, de-DE, it-IT, pt-PT, zh-CN, ja-JP, ko-KR, ar-SA, hi-IN, ru-RU, id-ID, tr-TR, nl-NL, pl-PL, vi-VN, th-TH, en-GB

Response Language (string) or Response Language (null) (Response Language)

Language for the analysis results (labels, categories, levels). Can differ from 'language' (input). If omitted, uses 'language'. Accepted: en-US, es-ES, es-MX, pt-BR, fr-FR, de-DE, it-IT, pt-PT, zh-CN, ja-JP, ko-KR, ar-SA, hi-IN, ru-RU, id-ID, tr-TR, nl-NL, pl-PL, vi-VN, th-TH, en-GB.

Duration Seconds (number) or Duration Seconds (null) (Duration Seconds)

Total audio duration in seconds. Optional when using only 'text' (ignored — not read/used). Required when using 'dialog' (must be >= last turn end). Max 3h (10800s).

Client Reference Id (string) or Client Reference Id (null) (Client Reference Id)

Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency.

Call Direction (string) or Call Direction (null) (Call Direction)

Who originated the call. inbound=client called, outbound=company called. If omitted, the LLM infers from context.

Array of Participants (objects) or Participants (null) (Participants)

Explicit participant roles. If omitted, the LLM infers from the dialog. When provided, used as ground truth (no inference) and echoed in analysis.participants_identified.

Responses

Request samples

# frozen_string_literal: true
require 'falaai-api'

config = FalaAI::Configuration.new
config.scheme = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').start_with?('https') ? 'https' : 'http'
config.host = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').sub(%r{^https?://}, '')
config.base_path = ''
config.access_token = ENV['FALAAI_API_KEY']
client = FalaAI::ApiClient.new(config)

# REQUIRED: language + Authorization
# RULE: dialog OR text. duration_seconds is OPTIONAL when using only text (ignored) and REQUIRED when using dialog (must be >= last turn end)
# OPTIONAL: model -> falaai-diagnostic-1 | audio_events -> [] |
#           response_language -> (uses language) | call_direction / participants / client_reference_id -> null
diagnostic, _status = FalaAI::AnalysisApi.new(client).create_diagnostic_v1_analyze_diagnostic_post_with_http_info(
  FalaAI::DiagnosticRequest.new(
    model: "falaai-diagnostic-1",
    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",
    response_language: "pt-BR",
    duration_seconds: 81.46,
    call_direction: "inbound",
    participants: [
      {
        "interlocutor": "Speaker 1",
        "name": "Carla",
        "role": "agent"
      },
      {
        "interlocutor": "Speaker 2",
        "name": "",
        "role": "client"
      }
    ],
    client_reference_id: "20260927131100000-imp"
  )
)
puts JSON.pretty_generate(diagnostic.to_hash)

Response samples

Content type
application/json
{
  • "id": "string",
  • "response_language": "string",
  • "object": "string",
  • "analysis": {
    },
  • "usage": {
    },
  • "client_reference_id": "string",
  • "html_report": "string"
}

Compliance Risk Audit — conversation compliance analysis

Runs a compliance risk audit on a diarized call transcript, detecting violations and positives, applying the ISO 31000 risk matrix, classifying the conversation into a level and returning the verdict with the applied actions and the NIST/OWASP risk framework enquadramento; use it for compliance and quality audits of company-agent-to-client calls, not for generic conversation summarization. Required fields: dialog (diarized transcript in the format 'Speaker 1: [00:00:00.540 - 00:00:01.139] text', speaker labels accepted in any case as Speaker, Interlocutor, Hablante, Locutor or Orador plus number; plain text is not accepted; max 300,000 characters), duration_seconds (total audio duration in seconds, must be >= the last turn end time) and language plus response_language (only pt-BR, en-US or es-ES). Optional: model (always 'falaai-risk-audit-1'), audio_events (up to 500, each requiring event and start_s), participants (up to 10 with interlocutor and role agent/client/bot, ground truth when provided, else inferred), call_direction (inbound/outbound, inferred when omitted), response_format (only 'v2'), client_reference_id (echoed verbatim, charset [A-Za-z0-9 _/:.-], max 60). Returns response (V2) with meta+usage, participants, verdict with level and applied actions, scores, detections (violations, positives, client alerts), analysis frameworks, timeline, categories_summary, executive summary, scoring explanation and an HTML report (gzip+base64). Credits are charged per character of the spoken transcript (0.09/char, counted without speaker labels and inline expression tokens, minimum 1,000 characters, plus 50 characters per audio event) and a minimum-cost guard may raise the final amount, so response.meta.usage.credits_consumed is the amount actually charged. Stateless: neither the transcript nor the analysis is persisted (only billing and usage metadata is logged), protecting personal data under LGPD.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
model
string (Model)
Default: "falaai-risk-audit-1"

Analysis model. Always 'falaai-risk-audit-1'

dialog
required
string (Dialog) <= 300000 characters

Diarized transcript with speaker turns. REQUIRED — risk audit only accepts diarized conversations; plain 'text' is not accepted. Speaker labels accepted (any case): 'Speaker N', 'Interlocutor N', 'Hablante N', 'Locutor N', 'Orador N' (space or underscore). Normalized internally to 'Speaker N' in the response. Max 300,000 characters

Array of objects (Audio Events) <= 500 items
Default: []

Audio events with timestamps (correlated with turns when diarization is present)

duration_seconds
required
number (Duration Seconds) >= 1

Total audio duration in seconds. Required. Must be >= last turn end. Max 3h (10800s).

language
required
string (Language)

Language of the transcript being analyzed. Must match the dialog/text language. Accepted: pt-BR, en-US, es-ES.

response_language
required
string (Response Language)

Language for analysis results (labels, categories, levels, actions, HTML report). Can differ from 'language'. Accepted: pt-BR, en-US, es-ES.

Call Direction (string) or Call Direction (null) (Call Direction)

Who originated the call. inbound=client called, outbound=company called. If omitted, LLM infers from context.

Array of Participants (objects) or Participants (null) (Participants)

Explicit participant roles. If omitted, LLM infers from dialog (Lei 17). When provided, used as ground truth — no inference.

response_format
string (Response Format)
Default: "v2"
Value: "v2"

Response format version. Only 'v2' (structured EN-US blocks) is available today.

Client Reference Id (string) or Client Reference Id (null) (Client Reference Id)

Optional client-supplied ID echoed verbatim in the response. Use to correlate/sync with your system. Accepted charset: [A-Za-z0-9 _/:.-], max 60 chars. Not idempotency.

Responses

Request samples

# frozen_string_literal: true
require 'falaai-api'

config = FalaAI::Configuration.new
config.scheme = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').start_with?('https') ? 'https' : 'http'
config.host = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').sub(%r{^https?://}, '')
config.base_path = ''
config.access_token = ENV['FALAAI_API_KEY']
client = FalaAI::ApiClient.new(config)

# REQUIRED: language, response_language, duration_seconds (>= 1.0) + Authorization; dialog (diarized) REQUIRED
# RULE: dialog ONLY (diarized). 'text' is NOT accepted
# OPTIONAL: model -> falaai-risk-audit-1 | audio_events -> [] |
#           call_direction / participants / response_format / client_reference_id -> null
audit, _status = FalaAI::AnalysisApi.new(client).create_risk_audit_v1_analyze_risk_audit_post_with_http_info(
  FalaAI::RiskAuditRequest.new(
    model: "falaai-risk-audit-1",
    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"
      }
    ],
    duration_seconds: 81.46,
    language: "pt-BR",
    response_language: "pt-BR",
    call_direction: "inbound",
    participants: [
      {
        "interlocutor": "Speaker 1",
        "name": "Carla",
        "role": "agent"
      },
      {
        "interlocutor": "Speaker 2",
        "name": "",
        "role": "client"
      }
    ],
    response_format: "v2",
    client_reference_id: "20260927131100000-imp"
  )
)
puts JSON.pretty_generate(audit.to_hash)

Response samples

Content type
application/json
{
  • "response": {
    }
}

usage

Get Usage Log

Authorizations:
ApiKeyAuth
query Parameters
page
integer (Page) >= 1
Default: 1
limit
integer (Limit) [ 1 .. 100 ]
Default: 20
Api Key Id (string) or Api Key Id (null) (Api Key Id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "limit": 0
}

Get Usage By Key

Authorizations:
ApiKeyAuth
query Parameters
Key Id (string) or Key Id (null) (Key Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

webhooks

List webhooks

Lists the authenticated user's webhooks (10 alerts). Paginated. Includes the URL signature secret (always visible to the owner).

Authorizations:
ApiKeyAuth
query Parameters
page
integer (Page) >= 1
Default: 1

Pagina (1-indexed)

limit
integer (Limit) [ 1 .. 100 ]
Default: 20

Itens por pagina (max 100)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "limit": 0
}

Create webhook

Creates a subscription for alert events (10 alerts). Payload delivered: WebhookPayload(event, data, timestamp) with HMAC FalaAI-Signature. To verify the origin, recompute HMAC-SHA256 of "timestamp.body" with your secret.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string (Name)

Nome identificador do webhook

url
required
string (Url)

URL HTTPS que recebera POST com HMAC FalaAI-Signature

events
required
Array of strings (Events)
Items Enum: "subscription.created" "avulso.completed" "subscription.upgraded" "subscription.downgraded" "subscription.canceled" "credits.low" "credits.exhausted" "subscription.renewed" "subscription.expired" "payment.failed"

Eventos subscritos (10 alertas)

retry_enabled
boolean (Retry Enabled)
Default: false

Retry exponencial 5 tentativas quando true (false=1 tentativa)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "user_id": "string",
  • "name": "string",
  • "url": "string",
  • "secret": "string",
  • "events": [
    ],
  • "active": true,
  • "retry_enabled": true,
  • "last_delivery_at": "string",
  • "last_status": 0,
  • "failure_count": 0,
  • "created_at": "string",
  • "updated_at": "string"
}

Update webhook

Updates the webhook's name/url/events/retry_enabled/active. Valid events: 10 alerts.

Authorizations:
ApiKeyAuth
path Parameters
webhook_id
required
string (Webhook Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)

Nome identificador

Url (string) or Url (null) (Url)

URL HTTPS destino

Array of Events (strings) or Events (null) (Events)

Eventos subscritos

Retry Enabled (boolean) or Retry Enabled (null) (Retry Enabled)

Habilita retry exponencial

Active (boolean) or Active (null) (Active)

Ativa/desativa sem deletar

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete webhook

Deletes a webhook subscription by ID.

Authorizations:
ApiKeyAuth
path Parameters
webhook_id
required
string (Webhook Id)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

email-alerts

List email alerts

Authorizations:
ApiKeyAuth
query Parameters
page
integer (Page) >= 1
Default: 1
limit
integer (Limit) [ 1 .. 100 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "page": 0,
  • "limit": 0
}

Create email alert

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string (Name)

Nome identificador

email
required
string (Email)

Email destino

events
required
Array of strings (Events)
Items Enum: "subscription.created" "avulso.completed" "subscription.upgraded" "subscription.downgraded" "subscription.canceled" "credits.low" "credits.exhausted" "subscription.renewed" "payment.failed"

Eventos subscritos

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "user_id": "string",
  • "name": "string",
  • "email": "string",
  • "events": [
    ],
  • "active": true,
  • "created_at": "string",
  • "updated_at": "string"
}

Update email alert

Authorizations:
ApiKeyAuth
path Parameters
alert_id
required
string (Alert Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)
Email (string) or Email (null) (Email)
Array of Events (strings) or Events (null) (Events)
Active (boolean) or Active (null) (Active)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Delete email alert

Authorizations:
ApiKeyAuth
path Parameters
alert_id
required
string (Alert Id)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

whatsapp

Extract and segment WhatsApp conversations from an export

Extracts and segments the conversations of a WhatsApp export (.zip or .txt containing chat.txt in UTF-8 with at least one turn) and, unless it is a preview, resolves each selected conversation with AI by transcribing voice/audio/video notes and describing visual expressions, returning the segmented conversations with speakers, dialogs, counts and usage. Use dry_run=true for a PREVIEW: it validates the file, segments the conversations, counts media and ESTIMATES the credits WITHOUT calling the AI and WITHOUT charging (credits_charged=0), returning object whatsapp_preview with credits_total, the params actually used, the windows, per-conversation items and warnings. The window is given either as a single start/end pair or as windows, a JSON string holding a non-empty list of sub-objects each with start and end; windows must not be combined with start/end, and a windows selection is the deduplicated chronological union of the overlaps, which bypasses the noise filter and keeps conversations that are monologues or below min_messages, while for a single window sending only one of start/end is rejected and empty/all-zeros values select the real period of the export, both being allowed to be omitted in dry_run while outside dry_run both absent is rejected. timezone and date_format are required, where date_format must be day_first, month_first or year_first. gap_minutes is optional (default 720) and splits conversations on idle gaps, min_messages is optional (default 2) and is the minimum messages kept per conversation outside the explicit windows selection, voice_note is optional (default true) and turns voice/audio/video media into text, expression is optional (default true) and describes visual expressions (figurinha, GIF, emoji), and client_reference_id is optional, echoed verbatim, charset A-Za-z0-9 space _/:.- up to 60 chars. Billing outside the preview is 0.15 credit per conversation plus 0.15 per figurinha, 0.18 per GIF and 0.1 per emoji (only with expression=true) plus 0.19 per second of voice/audio/video (only with voice_note=true), rounded to 2 decimals with no rounding up, and the preview credits_total is the same exact sum with 2 decimals; files are limited to 1GB and the endpoint is stateless (export and media processed in memory, temporary files removed, nothing persisted), returning object conversations with id (wc-), usage and the conversations (conversation_id, first_at, last_at, duration_seconds, speakers, dialog, message_count, characters) plus meta.

Authorizations:
ApiKeyAuth
Request Body schema: multipart/form-data
required
file
required
string <binary> (File)
start
string (Start)

Inicio da janela. Obrigatorio fora do dry_run; no dry_run ausente = primeiro turno do export.

end
string (End)

Fim da janela. Obrigatorio fora do dry_run; no dry_run ausente = ultimo turno do export.

windows
string (Windows)

Selecao explicita por varias janelas: JSON [{"start":"...","end":"..."}]. Nao combinar com 'start'/'end'.

timezone
required
string (Timezone)
date_format
required
string (Date Format)
gap_minutes
number (Gap Minutes)
Default: 720
min_messages
integer (Min Messages)
Default: 2
voice_note
boolean (Voice Note)
Default: true

Transcrever mensagens de voz/video gravadas na hora?

expression
boolean (Expression)
Default: true

Descrever expressoes visuais (figurinha/GIF/imagem)?

dry_run
boolean (Dry Run)
Default: false

So analisa o arquivo: valida, segmenta e ESTIMA os creditos SEM chamar a IA e SEM debitar (credits_charged=0).

client_reference_id
string (Client Reference Id)

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "object": "conversations",
  • "usage": {
    },
  • "conversations": [
    ],
  • "client_reference_id": "string",
  • "meta": {
    }
}

version

Get Version

Responses

Response samples

Content type
application/json
{
  • "service": "string",
  • "version": "string",
  • "deployDate": "string"
}

health

Health Check

Responses

Request samples

# frozen_string_literal: true
require 'falaai-api'

config = FalaAI::Configuration.new
config.scheme = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').start_with?('https') ? 'https' : 'http'
config.host = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').sub(%r{^https?://}, '')
config.base_path = ''
client = FalaAI::ApiClient.new(config)

health = FalaAI::HealthApi.new(client).health_check
puts JSON.pretty_generate(health.to_hash)

FalaAI::HealthApi.new(client).health_check_head

Response samples

Content type
application/json
{
  • "status": "string",
  • "version": "string",
  • "uptime_seconds": 0,
  • "database": true,
  • "phase": "string",
  • "launch_date": "string"
}

Health Check

Responses

Request samples

# frozen_string_literal: true
require 'falaai-api'

config = FalaAI::Configuration.new
config.scheme = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').start_with?('https') ? 'https' : 'http'
config.host = ENV.fetch('FALAAI_BASE_URL', 'https://api01-falaai.action.tec.br').sub(%r{^https?://}, '')
config.base_path = ''
client = FalaAI::ApiClient.new(config)

health = FalaAI::HealthApi.new(client).health_check
puts JSON.pretty_generate(health.to_hash)

FalaAI::HealthApi.new(client).health_check_head

Response samples

Content type
application/json
{
  • "status": "string",
  • "version": "string",
  • "uptime_seconds": 0,
  • "database": true,
  • "phase": "string",
  • "launch_date": "string"
}