falaai-api 1.21.67 → 2.21.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/AnalysisApi.md +2 -2
- data/docs/DiagnosticParticipant.md +1 -1
- data/docs/DiagnosticUsage.md +1 -1
- data/docs/Participant.md +1 -1
- data/docs/ParticipantDiagnostic.md +7 -3
- data/docs/UsageByKeyItem.md +1 -1
- data/docs/UsageLogItem.md +1 -1
- data/docs/WebhooksApi.md +1 -1
- data/docs/WhatsappApi.md +1 -1
- data/docs/WhatsappPreviewItemBreakdown.md +1 -1
- data/docs/WhatsappPreviewItemMedia.md +1 -1
- data/docs/WhatsappUsage.md +6 -6
- data/docs/index.html +10 -10
- data/lib/falaai-api/api/analysis_api.rb +5 -5
- data/lib/falaai-api/api/email_alerts_api.rb +1 -1
- data/lib/falaai-api/api/health_api.rb +1 -1
- data/lib/falaai-api/api/speech_api.rb +1 -1
- data/lib/falaai-api/api/usage_api.rb +1 -1
- data/lib/falaai-api/api/version_api.rb +1 -1
- data/lib/falaai-api/api/webhooks_api.rb +3 -3
- data/lib/falaai-api/api/whatsapp_api.rb +3 -3
- data/lib/falaai-api/api_client.rb +1 -1
- data/lib/falaai-api/api_error.rb +1 -1
- data/lib/falaai-api/api_model_base.rb +1 -1
- data/lib/falaai-api/configuration.rb +1 -1
- data/lib/falaai-api/models/audio_event.rb +1 -1
- data/lib/falaai-api/models/audio_input_meta.rb +1 -1
- data/lib/falaai-api/models/create_email_alert_request.rb +1 -1
- data/lib/falaai-api/models/create_webhook_request.rb +1 -1
- data/lib/falaai-api/models/diagnostic_analysis_map.rb +1 -1
- data/lib/falaai-api/models/diagnostic_audio_event.rb +1 -1
- data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +1 -1
- data/lib/falaai-api/models/diagnostic_participant.rb +4 -4
- data/lib/falaai-api/models/diagnostic_request.rb +3 -3
- data/lib/falaai-api/models/diagnostic_response.rb +1 -1
- data/lib/falaai-api/models/diagnostic_text_analysis.rb +1 -1
- data/lib/falaai-api/models/diagnostic_usage.rb +2 -2
- data/lib/falaai-api/models/email_alert_item.rb +1 -1
- data/lib/falaai-api/models/email_alert_list_response.rb +1 -1
- data/lib/falaai-api/models/email_alert_message_response.rb +1 -1
- data/lib/falaai-api/models/email_event.rb +1 -1
- data/lib/falaai-api/models/health_response.rb +1 -1
- data/lib/falaai-api/models/http_validation_error.rb +1 -1
- data/lib/falaai-api/models/location_inner.rb +1 -1
- data/lib/falaai-api/models/message_response.rb +1 -1
- data/lib/falaai-api/models/participant.rb +4 -4
- data/lib/falaai-api/models/participant_diagnostic.rb +63 -7
- data/lib/falaai-api/models/response_extract_conversations_v1_whatsapp_extractconversations_post.rb +1 -1
- data/lib/falaai-api/models/risk_audit_analysis_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_applied_action_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_audio_event_model_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_audit_decisions_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_conversation_scores_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_detection_item_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_detections_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_indexer_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_meta_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_participant_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_participants_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_request.rb +3 -3
- data/lib/falaai-api/models/risk_audit_scores_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_scoring_explanation_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_summary_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_timeline_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_usage_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_v2.rb +1 -1
- data/lib/falaai-api/models/risk_audit_v2_response.rb +1 -1
- data/lib/falaai-api/models/risk_audit_verdict_v2.rb +1 -1
- data/lib/falaai-api/models/transcription_response.rb +1 -1
- data/lib/falaai-api/models/transcription_usage.rb +1 -1
- data/lib/falaai-api/models/update_email_alert_request.rb +1 -1
- data/lib/falaai-api/models/update_webhook_request.rb +1 -1
- data/lib/falaai-api/models/usage_by_key_item.rb +2 -2
- data/lib/falaai-api/models/usage_log_item.rb +2 -2
- data/lib/falaai-api/models/usage_log_response.rb +1 -1
- data/lib/falaai-api/models/validation_error.rb +1 -1
- data/lib/falaai-api/models/version_response.rb +1 -1
- data/lib/falaai-api/models/webhook_event.rb +1 -1
- data/lib/falaai-api/models/webhook_item.rb +1 -1
- data/lib/falaai-api/models/webhook_list_response.rb +1 -1
- data/lib/falaai-api/models/whatsapp_conversation.rb +1 -1
- data/lib/falaai-api/models/whatsapp_conversations_response.rb +1 -1
- data/lib/falaai-api/models/whatsapp_meta.rb +1 -1
- data/lib/falaai-api/models/whatsapp_preview_item.rb +1 -1
- data/lib/falaai-api/models/whatsapp_preview_item_breakdown.rb +2 -2
- data/lib/falaai-api/models/whatsapp_preview_item_credits.rb +1 -1
- data/lib/falaai-api/models/whatsapp_preview_item_media.rb +2 -2
- data/lib/falaai-api/models/whatsapp_preview_params.rb +1 -1
- data/lib/falaai-api/models/whatsapp_preview_response.rb +1 -1
- data/lib/falaai-api/models/whatsapp_preview_window.rb +1 -1
- data/lib/falaai-api/models/whatsapp_speaker.rb +1 -1
- data/lib/falaai-api/models/whatsapp_usage.rb +7 -7
- data/lib/falaai-api/version.rb +15 -15
- data/lib/falaai-api.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e197cfc751eccc10465b035df845f710971663ecd53663b5f462bac494cb278
|
|
4
|
+
data.tar.gz: 3c96f417cbb29e163f4f38d3672866b45f9c3d67a07ffc7986b6471d80f14aef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22e460dca203ada67da920a6b443cb6a246b9eaea1d0d70a9b015158ef9df1a32e97a3741082d577b782d59e148c69993a224860f8dc93bcc89669534f41e66b
|
|
7
|
+
data.tar.gz: 6f98abca2c2e9c8d3e4a66098d6ef82d506a15bfbec34e73eb3d4fc11bf76e3edf25da4ca0aa36f6a67e97151e41e461397fa95442888e90abffa679e00df8d8
|
data/README.md
CHANGED
|
@@ -19,7 +19,7 @@ FalaAI is a set of **independent REST APIs**. You **do not** need FalaAI Transcr
|
|
|
19
19
|
| An existing transcript | `FalaAI::AnalysisApi` — Diagnostic |
|
|
20
20
|
| A transcript needing compliance analysis | `FalaAI::AnalysisApi` — Risk Audit |
|
|
21
21
|
| An existing transcript needing both | Diagnostic + Risk Audit |
|
|
22
|
-
| Your own
|
|
22
|
+
| Your own speech-to-text provider | Skip FalaAI Transcription |
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
25
|
Your STT -> FalaAI Diagnostic -> FalaAI Risk Audit
|
|
@@ -156,7 +156,7 @@ FalaAI is **language-independent** - integrate at **any point** of your pipeline
|
|
|
156
156
|
|
|
157
157
|
## BYOT - Bring Your Own Transcription
|
|
158
158
|
|
|
159
|
-
Already have speech-to-text (
|
|
159
|
+
Already have speech-to-text (your own engine or provider)? **Skip Transcription** and send the text straight to **Diagnostic** and/or **Risk Audit**. You only pay for what you use.
|
|
160
160
|
|
|
161
161
|
## SDK surface (Ruby)
|
|
162
162
|
|
|
@@ -176,7 +176,7 @@ Already have speech-to-text (Whisper, Deepgram, AssemblyAI, your own)? **Skip Tr
|
|
|
176
176
|
|
|
177
177
|
## Examples
|
|
178
178
|
|
|
179
|
-
Runnable examples in [`examples/`](https://github.com/ActionTecBr/falaai-api-ruby/tree/main/examples): `health.rb`, `transcribe.rb`, `diagnose.rb`, `audit.rb`, `
|
|
179
|
+
Runnable examples in [`examples/`](https://github.com/ActionTecBr/falaai-api-ruby/tree/main/examples): `health.rb`, `transcribe.rb`, `diagnose.rb`, `audit.rb`, `whatsapp_preview.rb`, `whatsapp_periodo.rb`, `whatsapp_janelas.rb`.
|
|
180
180
|
|
|
181
181
|
## Authentication
|
|
182
182
|
|
|
@@ -208,7 +208,7 @@ end
|
|
|
208
208
|
| Requirement | Version |
|
|
209
209
|
|---|---|
|
|
210
210
|
| Ruby | 2.7+ |
|
|
211
|
-
| API |
|
|
211
|
+
| API | v2.21.273 |
|
|
212
212
|
|
|
213
213
|
## Documentation
|
|
214
214
|
|
|
@@ -221,7 +221,7 @@ end
|
|
|
221
221
|
|
|
222
222
|
## Versioning
|
|
223
223
|
|
|
224
|
-
Semantic versioning; the SDK version tracks the API version (`
|
|
224
|
+
Semantic versioning; the SDK version tracks the API version (`2.21.273`). See [CHANGELOG.md](CHANGELOG.md) and [Releases](https://github.com/ActionTecBr/falaai-api-ruby/releases).
|
|
225
225
|
|
|
226
226
|
## Security
|
|
227
227
|
|
data/docs/AnalysisApi.md
CHANGED
|
@@ -14,7 +14,7 @@ All URIs are relative to *https://api01-falaai.action.tec.br*
|
|
|
14
14
|
|
|
15
15
|
Analyze a call transcript — 5 parallel analyses
|
|
16
16
|
|
|
17
|
-
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 (
|
|
17
|
+
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/agent_requester/agent_custodian as an EN-US token, 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 (see GET /v1/pricing, group diagnostic: rate and minimum; counted without speaker labels, timestamps and inline expression tokens) plus a fixed 10.0 credits per audio event (see GET /v1/pricing, group diagnostic: credits_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.
|
|
18
18
|
|
|
19
19
|
### Examples
|
|
20
20
|
|
|
@@ -83,7 +83,7 @@ end
|
|
|
83
83
|
|
|
84
84
|
Compliance Risk Audit — conversation compliance analysis
|
|
85
85
|
|
|
86
|
-
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 (
|
|
86
|
+
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/agent_requester/agent_custodian as an EN-US token, 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 (see GET /v1/pricing, group risk_audit: rate and minimum; counted without speaker labels and inline expression tokens) plus a fixed 30.0 credits per audio event (see GET /v1/pricing, group risk_audit: credits_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.
|
|
87
87
|
|
|
88
88
|
### Examples
|
|
89
89
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **interlocutor** | **String** | Exact speaker label from the dialog (e.g. 'Speaker 1') | |
|
|
8
8
|
| **name** | **String** | Participant name (optional) | [optional] |
|
|
9
|
-
| **role** | **String** | agent | client | bot (optional — omit/empty when unknown) | [optional] |
|
|
9
|
+
| **role** | **String** | Role (always EN-US token): agent | client | bot | agent_requester | agent_custodian (optional — omit/empty when unknown) | [optional] |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
data/docs/DiagnosticUsage.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **characters** | **Integer** | Total characters analyzed | |
|
|
8
|
-
| **credits_consumed** | **Float** | Credits consumed: per character, round(max(characters,
|
|
8
|
+
| **credits_consumed** | **Float** | Credits consumed: per character, round(max(characters, 667) * 0.14, 2), plus round(audio_events * 10.0, 2) | |
|
|
9
9
|
| **processing_ms** | **Integer** | Total processing time in milliseconds | |
|
|
10
10
|
|
|
11
11
|
## Example
|
data/docs/Participant.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **interlocutor** | **String** | Exact identifier as used in dialog (e.g. 'Interlocutor 1', 'Antonio') | |
|
|
8
8
|
| **name** | **String** | Participant name (humanizes report, does not affect logic) | [optional] |
|
|
9
|
-
| **role** | **String** | Role: agent (human operator), client (customer), bot (IVR/AI). Required for risk audit. | |
|
|
9
|
+
| **role** | **String** | Role (always EN-US token): agent (human operator), client (customer), bot (IVR/AI), agent_requester (B2B agent who requests the data), agent_custodian (B2B agent who holds/provides the data). Required for risk audit. | |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **interlocutor** | **String** | Exact speaker label from the dialog (e.g. 'Speaker 1') | |
|
|
8
|
-
| **role** | **String** | Role: agent | client | bot | agent_requester | agent_custodian (null when not informed/inferred) | [optional] |
|
|
8
|
+
| **role** | **String** | Role (always EN-US token): agent | client | bot | agent_requester | agent_custodian (null when not informed/inferred) | [optional] |
|
|
9
9
|
| **name** | **String** | Participant name if mentioned in the dialogue | [optional] |
|
|
10
10
|
| **confidence** | **String** | high | medium | low | [optional] |
|
|
11
|
-
| **
|
|
11
|
+
| **source** | **String** | Role source (input/inferred) | [optional] |
|
|
12
|
+
| **evidence** | **String** | Primeira evidencia valida (compatibilidade; no timestamps) | [optional] |
|
|
13
|
+
| **evidences** | **Array<String>** | Ate 3 evidencias literais discriminantes do papel | [optional] |
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,7 +22,9 @@ instance = FalaAI::ParticipantDiagnostic.new(
|
|
|
20
22
|
role: null,
|
|
21
23
|
name: null,
|
|
22
24
|
confidence: null,
|
|
23
|
-
|
|
25
|
+
source: null,
|
|
26
|
+
evidence: null,
|
|
27
|
+
evidences: null
|
|
24
28
|
)
|
|
25
29
|
```
|
|
26
30
|
|
data/docs/UsageByKeyItem.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **key_id** | **String** | API key id | |
|
|
8
8
|
| **key_name** | **String** | API key name | |
|
|
9
|
-
| **total_credits** | **
|
|
9
|
+
| **total_credits** | **Float** | Total credits consumed by the key | |
|
|
10
10
|
| **request_count** | **Integer** | Number of requests | |
|
|
11
11
|
| **last_used** | **String** | ISO 8601 of last use (null if never) | [optional] |
|
|
12
12
|
|
data/docs/UsageLogItem.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | Usage log entry id | |
|
|
8
8
|
| **endpoint** | **String** | Endpoint called | |
|
|
9
|
-
| **credits_cost** | **
|
|
9
|
+
| **credits_cost** | **Float** | Credits consumed | |
|
|
10
10
|
| **status** | **String** | Result status | |
|
|
11
11
|
| **errors_count** | **Integer** | Errors count | |
|
|
12
12
|
| **created_at** | **String** | ISO 8601 timestamp | |
|
data/docs/WebhooksApi.md
CHANGED
|
@@ -16,7 +16,7 @@ All URIs are relative to *https://api01-falaai.action.tec.br*
|
|
|
16
16
|
|
|
17
17
|
Create webhook
|
|
18
18
|
|
|
19
|
-
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.
|
|
19
|
+
Creates a subscription for alert events (10 alerts). Payload delivered: WebhookPayload(id, event, data, timestamp) with HMAC FalaAI-Signature. To verify the origin, recompute HMAC-SHA256 of \"timestamp.body\" with your secret. Each retry is signed again (new t). Use the payload id to deduplicate retries.
|
|
20
20
|
|
|
21
21
|
### Examples
|
|
22
22
|
|
data/docs/WhatsappApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *https://api01-falaai.action.tec.br*
|
|
|
13
13
|
|
|
14
14
|
Extract and segment WhatsApp conversations from an export
|
|
15
15
|
|
|
16
|
-
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
|
|
16
|
+
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 follows GET /v1/pricing (group whatsapp) - credits per conversation, per figurinha, per GIF, per emoji (only with expression=true) and 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.
|
|
17
17
|
|
|
18
18
|
### Examples
|
|
19
19
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **conversation** | **Float** | Conversation credit (0
|
|
7
|
+
| **conversation** | **Float** | Conversation credit (0.8) | |
|
|
8
8
|
| **figurinha** | **Float** | Figurinha credits of this conversation | |
|
|
9
9
|
| **gif** | **Float** | GIF credits of this conversation | |
|
|
10
10
|
| **emoji** | **Float** | Emoji credits of this conversation | |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **figurinha** | **Integer** | Figurinha occurrences in this conversation (0 quando expression=false) | |
|
|
8
8
|
| **gif** | **Integer** | GIF occurrences in this conversation (0 quando expression=false) | |
|
|
9
9
|
| **emoji** | **Integer** | Emoji occurrences in this conversation (0 quando expression=false) | |
|
|
10
|
-
| **ptt** | **Integer** | Voice/audio/video turns in this conversation (cobra
|
|
10
|
+
| **ptt** | **Integer** | Voice/audio/video turns in this conversation (cobra 1.6/segundo SO quando voice_note=true, piso 5 s) | |
|
|
11
11
|
| **ptt_seconds** | **Float** | Voice/video SECONDS counted in this conversation (0 quando voice_note=false) | |
|
|
12
12
|
| **anexos** | **Integer** | Image/document turns in this conversation (ANEXO: nunca cobrado) | |
|
|
13
13
|
| **by_type** | **Hash<String, Integer>** | Media turns by type in THIS conversation (voz/audio/video/imagem/figurinha/gif/arquivo/oculta/chamada) | |
|
data/docs/WhatsappUsage.md
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
| **conversations** | **Integer** | Number of conversations returned | |
|
|
8
8
|
| **characters** | **Integer** | Total characters across conversations | |
|
|
9
9
|
| **expressions** | **Integer** | Chargeable expression occurrences (figurinha+GIF+emoji); 0 quando expression=false | |
|
|
10
|
-
| **expressions_figurinha** | **Integer** | Figurinha occurrences (cobra 0
|
|
11
|
-
| **expressions_gif** | **Integer** | GIF occurrences (cobra 0
|
|
12
|
-
| **expressions_emoji** | **Integer** | Emoji occurrences (cobra 0
|
|
10
|
+
| **expressions_figurinha** | **Integer** | Figurinha occurrences (cobra 0.8 cada quando expression=true) | |
|
|
11
|
+
| **expressions_gif** | **Integer** | GIF occurrences (cobra 0.8 cada quando expression=true) | |
|
|
12
|
+
| **expressions_emoji** | **Integer** | Emoji occurrences (cobra 0.5 cada quando expression=true) | |
|
|
13
13
|
| **voice_notes** | **Integer** | Voice notes (PTT) resolved to text | |
|
|
14
|
-
| **conversation_credits** | **Float** | Credits for conversations (0
|
|
15
|
-
| **expression_credits** | **Float** | Credits for expressions (figurinha 0
|
|
16
|
-
| **audio_credits** | **Float** | Credits for transcribed voice seconds (
|
|
14
|
+
| **conversation_credits** | **Float** | Credits for conversations (0.8 each) | |
|
|
15
|
+
| **expression_credits** | **Float** | Credits for expressions (figurinha 0.8 / GIF 0.8 / emoji 0.5) | |
|
|
16
|
+
| **audio_credits** | **Float** | Credits for transcribed voice seconds (1.6 per second, piso 5 s so quando ha audio; 0 quando voice_note=false) | |
|
|
17
17
|
| **credits_consumed** | **Float** | Total credits = round(conversation_credits + expression_credits + audio_credits, 2) | |
|
|
18
18
|
| **processing_ms** | **Integer** | Total processing time in milliseconds | |
|
|
19
19
|
|