falaai-api 1.21.47

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.
Files changed (130) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +205 -0
  4. data/docs/AnalysisApi.md +147 -0
  5. data/docs/AudioEvent.md +26 -0
  6. data/docs/AudioInputMeta.md +26 -0
  7. data/docs/AuditoriaRiscoAnalysisV2.md +22 -0
  8. data/docs/AuditoriaRiscoAppliedActionV2.md +32 -0
  9. data/docs/AuditoriaRiscoAudioEventModelV2.md +22 -0
  10. data/docs/AuditoriaRiscoAuditDecisionsV2.md +22 -0
  11. data/docs/AuditoriaRiscoConversationScoresV2.md +38 -0
  12. data/docs/AuditoriaRiscoDetectionItemV2.md +110 -0
  13. data/docs/AuditoriaRiscoDetectionsV2.md +26 -0
  14. data/docs/AuditoriaRiscoIndexerV2.md +18 -0
  15. data/docs/AuditoriaRiscoMetaV2.md +28 -0
  16. data/docs/AuditoriaRiscoParticipantV2.md +22 -0
  17. data/docs/AuditoriaRiscoParticipantsV2.md +26 -0
  18. data/docs/AuditoriaRiscoRequest.md +38 -0
  19. data/docs/AuditoriaRiscoScoresV2.md +20 -0
  20. data/docs/AuditoriaRiscoScoringExplanationV2.md +20 -0
  21. data/docs/AuditoriaRiscoSummaryV2.md +48 -0
  22. data/docs/AuditoriaRiscoTimelineV2.md +22 -0
  23. data/docs/AuditoriaRiscoUsageV2.md +22 -0
  24. data/docs/AuditoriaRiscoV2.md +46 -0
  25. data/docs/AuditoriaRiscoV2Response.md +18 -0
  26. data/docs/AuditoriaRiscoVerdictV2.md +30 -0
  27. data/docs/CreateEmailAlertRequest.md +22 -0
  28. data/docs/CreateWebhookRequest.md +24 -0
  29. data/docs/DiagnosticAnalysisMap.md +28 -0
  30. data/docs/DiagnosticAudioEvent.md +26 -0
  31. data/docs/DiagnosticCategoricalAnalysis.md +22 -0
  32. data/docs/DiagnosticRequest.md +30 -0
  33. data/docs/DiagnosticResponse.md +28 -0
  34. data/docs/DiagnosticTextAnalysis.md +18 -0
  35. data/docs/DiagnosticUsage.md +22 -0
  36. data/docs/EmailAlertItem.md +32 -0
  37. data/docs/EmailAlertListResponse.md +22 -0
  38. data/docs/EmailAlertMessageResponse.md +18 -0
  39. data/docs/EmailAlertsApi.md +285 -0
  40. data/docs/EmailEvent.md +15 -0
  41. data/docs/HTTPValidationError.md +18 -0
  42. data/docs/HealthApi.md +137 -0
  43. data/docs/HealthResponse.md +28 -0
  44. data/docs/LocationInner.md +15 -0
  45. data/docs/MessageResponse.md +18 -0
  46. data/docs/Participant.md +22 -0
  47. data/docs/ParticipantDiagnostic.md +26 -0
  48. data/docs/SpeechApi.md +85 -0
  49. data/docs/TranscriptionResponse.md +49 -0
  50. data/docs/TranscriptionUsage.md +22 -0
  51. data/docs/UpdateEmailAlertRequest.md +24 -0
  52. data/docs/UpdateWebhookRequest.md +26 -0
  53. data/docs/UsageApi.md +151 -0
  54. data/docs/UsageByKeyItem.md +26 -0
  55. data/docs/UsageLogItem.md +28 -0
  56. data/docs/UsageLogResponse.md +22 -0
  57. data/docs/ValidationError.md +26 -0
  58. data/docs/VersionApi.md +72 -0
  59. data/docs/VersionResponse.md +22 -0
  60. data/docs/WebhookEvent.md +15 -0
  61. data/docs/WebhookItem.md +42 -0
  62. data/docs/WebhookListResponse.md +22 -0
  63. data/docs/WebhooksApi.md +293 -0
  64. data/lib/falaai-api/api/analysis_api.rb +158 -0
  65. data/lib/falaai-api/api/email_alerts_api.rb +294 -0
  66. data/lib/falaai-api/api/health_api.rb +132 -0
  67. data/lib/falaai-api/api/speech_api.rb +100 -0
  68. data/lib/falaai-api/api/usage_api.rb +156 -0
  69. data/lib/falaai-api/api/version_api.rb +77 -0
  70. data/lib/falaai-api/api/webhooks_api.rb +302 -0
  71. data/lib/falaai-api/api_client.rb +397 -0
  72. data/lib/falaai-api/api_error.rb +58 -0
  73. data/lib/falaai-api/api_model_base.rb +88 -0
  74. data/lib/falaai-api/configuration.rb +309 -0
  75. data/lib/falaai-api/models/audio_event.rb +273 -0
  76. data/lib/falaai-api/models/audio_input_meta.rb +273 -0
  77. data/lib/falaai-api/models/auditoria_risco_analysis_v2.rb +174 -0
  78. data/lib/falaai-api/models/auditoria_risco_applied_action_v2.rb +292 -0
  79. data/lib/falaai-api/models/auditoria_risco_audio_event_model_v2.rb +174 -0
  80. data/lib/falaai-api/models/auditoria_risco_audit_decisions_v2.rb +170 -0
  81. data/lib/falaai-api/models/auditoria_risco_conversation_scores_v2.rb +251 -0
  82. data/lib/falaai-api/models/auditoria_risco_detection_item_v2.rb +651 -0
  83. data/lib/falaai-api/models/auditoria_risco_detections_v2.rb +198 -0
  84. data/lib/falaai-api/models/auditoria_risco_indexer_v2.rb +150 -0
  85. data/lib/falaai-api/models/auditoria_risco_meta_v2.rb +234 -0
  86. data/lib/falaai-api/models/auditoria_risco_participant_v2.rb +168 -0
  87. data/lib/falaai-api/models/auditoria_risco_participants_v2.rb +196 -0
  88. data/lib/falaai-api/models/auditoria_risco_request.rb +451 -0
  89. data/lib/falaai-api/models/auditoria_risco_scores_v2.rb +177 -0
  90. data/lib/falaai-api/models/auditoria_risco_scoring_explanation_v2.rb +160 -0
  91. data/lib/falaai-api/models/auditoria_risco_summary_v2.rb +300 -0
  92. data/lib/falaai-api/models/auditoria_risco_timeline_v2.rb +174 -0
  93. data/lib/falaai-api/models/auditoria_risco_usage_v2.rb +219 -0
  94. data/lib/falaai-api/models/auditoria_risco_v2.rb +548 -0
  95. data/lib/falaai-api/models/auditoria_risco_v2_response.rb +165 -0
  96. data/lib/falaai-api/models/auditoria_risco_verdict_v2.rb +213 -0
  97. data/lib/falaai-api/models/create_email_alert_request.rb +221 -0
  98. data/lib/falaai-api/models/create_webhook_request.rb +233 -0
  99. data/lib/falaai-api/models/diagnostic_analysis_map.rb +285 -0
  100. data/lib/falaai-api/models/diagnostic_audio_event.rb +205 -0
  101. data/lib/falaai-api/models/diagnostic_categorical_analysis.rb +170 -0
  102. data/lib/falaai-api/models/diagnostic_request.rb +316 -0
  103. data/lib/falaai-api/models/diagnostic_response.rb +283 -0
  104. data/lib/falaai-api/models/diagnostic_text_analysis.rb +148 -0
  105. data/lib/falaai-api/models/diagnostic_usage.rb +219 -0
  106. data/lib/falaai-api/models/email_alert_item.rb +356 -0
  107. data/lib/falaai-api/models/email_alert_list_response.rb +218 -0
  108. data/lib/falaai-api/models/email_alert_message_response.rb +165 -0
  109. data/lib/falaai-api/models/email_event.rb +47 -0
  110. data/lib/falaai-api/models/health_response.rb +300 -0
  111. data/lib/falaai-api/models/http_validation_error.rb +149 -0
  112. data/lib/falaai-api/models/location_inner.rb +103 -0
  113. data/lib/falaai-api/models/message_response.rb +165 -0
  114. data/lib/falaai-api/models/participant.rb +226 -0
  115. data/lib/falaai-api/models/participant_diagnostic.rb +222 -0
  116. data/lib/falaai-api/models/transcription_response.rb +540 -0
  117. data/lib/falaai-api/models/transcription_usage.rb +219 -0
  118. data/lib/falaai-api/models/update_email_alert_request.rb +176 -0
  119. data/lib/falaai-api/models/update_webhook_request.rb +190 -0
  120. data/lib/falaai-api/models/usage_by_key_item.rb +256 -0
  121. data/lib/falaai-api/models/usage_log_item.rb +300 -0
  122. data/lib/falaai-api/models/usage_log_response.rb +218 -0
  123. data/lib/falaai-api/models/validation_error.rb +237 -0
  124. data/lib/falaai-api/models/version_response.rb +219 -0
  125. data/lib/falaai-api/models/webhook_event.rb +48 -0
  126. data/lib/falaai-api/models/webhook_item.rb +442 -0
  127. data/lib/falaai-api/models/webhook_list_response.rb +218 -0
  128. data/lib/falaai-api/version.rb +15 -0
  129. data/lib/falaai-api.rb +100 -0
  130. metadata +229 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3381038826725700d977c7fa6fa28f2f6ee14c5432bb3bfb490573763752f17f
4
+ data.tar.gz: 39803b031fa1bd7d247fd98e7dfd22c3ebe60b69081c9b23150ad98e99b68a67
5
+ SHA512:
6
+ metadata.gz: 677fbbf0ba09380ef989b37a05cc9a9ba049377d750f36ee9187fcb98bdc4a1004e4622c6596aff24d06d9f7af59ea376a2f2b76ed4fdeccc5934c22d5bf5e38
7
+ data.tar.gz: a10e570c6bce24ceae199beb013566355677787c6d0b293f8c63419c74030287ccba5182365044dc792a0aa01b06aaf09712155cb8a9641660febc57e76a8df8
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Action Tec Br
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,205 @@
1
+ # falaai-api
2
+
3
+ FalaAI - the Ruby gem for the FalaAI API
4
+
5
+ Transcribe, diagnose and score calls with 3 simple endpoints.
6
+
7
+ **Endpoints:**
8
+ - `POST /v1/audio/transcriptions` — Audio to text
9
+ - `POST /v1/analyze/diagnostic` — Conversation analysis
10
+ - `POST /v1/analyze/auditoriaRisco` — Compliance audit
11
+
12
+ **Complete flow (Python):**
13
+ ```python
14
+ import httpx
15
+
16
+ API = 'https://api.fala.ai'
17
+ KEY = 'fai_xxx'
18
+ HD = {'Authorization': f'Bearer {KEY}'}
19
+
20
+ # 1. Transcribe
21
+ files = {'file': open('call.mp3', 'rb')}
22
+ resp = httpx.post(f'{API}/v1/audio/transcriptions', headers=HD, files=files, data={'model': 'falaai-transcribe-1', 'language': 'pt'})
23
+ tr = resp.json()
24
+ print(f'Text: {tr[\"text\"][:100]}...')
25
+
26
+ # 2. Diagnose
27
+ resp = httpx.post(f'{API}/v1/analyze/diagnostic', headers=HD, json={'dialog': tr['dialog'], 'language': 'pt-BR', 'duration_seconds': tr['duration_seconds']})
28
+ diag = resp.json()
29
+ print(f'Sentiment: {diag[\"analysis\"][\"sentiment\"][\"list_choice\"]}')
30
+ print(f'Summary: {diag[\"analysis\"][\"dialogue_summary\"][\"explanation\"][:100]}...')
31
+
32
+ # 3. Audit
33
+ resp = httpx.post(f'{API}/v1/analyze/auditoriaRisco', headers=HD, json={'dialogo': tr['dialog'], 'duration_seconds': tr['duration_seconds']})
34
+ audit = resp.json()
35
+ print(f'Score: {audit[\"audit_score\"]} | Verdict: {audit[\"verdict\"]}')
36
+ print(f'Detections: {audit[\"total_detections\"]} | Violations: {len(audit[\"violations\"])} | Positives: {len(audit[\"positives\"])}')
37
+ ```
38
+
39
+ **Authentication:** All endpoints require an API Key in the `Authorization` header: `Bearer fai_xxx`
40
+
41
+ Get your API Key at [falaai.action.tec.br/api](https://falaai.action.tec.br/api)
42
+
43
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
44
+
45
+ - API version: 1.21.47
46
+ - Package version: 1.0.0
47
+ - Generator version: 7.25.0
48
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
49
+
50
+ ## Installation
51
+
52
+ ### Build a gem
53
+
54
+ To build the Ruby code into a gem:
55
+
56
+ ```shell
57
+ gem build falaai-api.gemspec
58
+ ```
59
+
60
+ Then either install the gem locally:
61
+
62
+ ```shell
63
+ gem install ./falaai-api-1.0.0.gem
64
+ ```
65
+
66
+ (for development, run `gem install --dev ./falaai-api-1.0.0.gem` to install the development dependencies)
67
+
68
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
69
+
70
+ Finally add this to the Gemfile:
71
+
72
+ gem 'falaai-api', '~> 1.0.0'
73
+
74
+ ### Install from Git
75
+
76
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
77
+
78
+ gem 'falaai-api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
79
+
80
+ ### Include the Ruby code directly
81
+
82
+ Include the Ruby code directly using `-I` as follows:
83
+
84
+ ```shell
85
+ ruby -Ilib script.rb
86
+ ```
87
+
88
+ ## Getting Started
89
+
90
+ Please follow the [installation](#installation) procedure and then run the following code:
91
+
92
+ ```ruby
93
+ # Load the gem
94
+ require 'falaai-api'
95
+
96
+ # Setup authorization
97
+ FalaAI.configure do |config|
98
+ # Configure Bearer authorization (fai_xxx): ApiKeyAuth
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ # Configure a proc to get access tokens in lieu of the static access_token configuration
101
+ config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
102
+ end
103
+
104
+ api_instance = FalaAI::AnalysisApi.new
105
+ auditoria_risco_request = FalaAI::AuditoriaRiscoRequest.new({duration_seconds: 3.56, language: 'pt-BR', response_language: 'en-US'}) # AuditoriaRiscoRequest |
106
+
107
+ begin
108
+ #Compliance Risk Audit — conversation compliance analysis
109
+ result = api_instance.create_auditoria_risco_v1_analyze_auditoria_risco_post(auditoria_risco_request)
110
+ p result
111
+ rescue FalaAI::ApiError => e
112
+ puts "Exception when calling AnalysisApi->create_auditoria_risco_v1_analyze_auditoria_risco_post: #{e}"
113
+ end
114
+
115
+ ```
116
+
117
+ ## Documentation for API Endpoints
118
+
119
+ All URIs are relative to *http://localhost*
120
+
121
+ Class | Method | HTTP request | Description
122
+ ------------ | ------------- | ------------- | -------------
123
+ *FalaAI::AnalysisApi* | [**create_auditoria_risco_v1_analyze_auditoria_risco_post**](docs/AnalysisApi.md#create_auditoria_risco_v1_analyze_auditoria_risco_post) | **POST** /v1/analyze/auditoriaRisco | Compliance Risk Audit — conversation compliance analysis
124
+ *FalaAI::AnalysisApi* | [**create_diagnostic_v1_analyze_diagnostic_post**](docs/AnalysisApi.md#create_diagnostic_v1_analyze_diagnostic_post) | **POST** /v1/analyze/diagnostic | Analyze a call transcript — 5 parallel analyses
125
+ *FalaAI::EmailAlertsApi* | [**create_email_alert_v1_email_alerts_post**](docs/EmailAlertsApi.md#create_email_alert_v1_email_alerts_post) | **POST** /v1/email-alerts | Criar email de alerta
126
+ *FalaAI::EmailAlertsApi* | [**delete_email_alert_v1_email_alerts_alert_id_delete**](docs/EmailAlertsApi.md#delete_email_alert_v1_email_alerts_alert_id_delete) | **DELETE** /v1/email-alerts/{alert_id} | Remover email de alerta
127
+ *FalaAI::EmailAlertsApi* | [**list_email_alerts_v1_email_alerts_get**](docs/EmailAlertsApi.md#list_email_alerts_v1_email_alerts_get) | **GET** /v1/email-alerts | Listar emails de alerta
128
+ *FalaAI::EmailAlertsApi* | [**update_email_alert_v1_email_alerts_alert_id_put**](docs/EmailAlertsApi.md#update_email_alert_v1_email_alerts_alert_id_put) | **PUT** /v1/email-alerts/{alert_id} | Atualizar email de alerta
129
+ *FalaAI::HealthApi* | [**health_check**](docs/HealthApi.md#health_check) | **GET** /v1/health | Health Check
130
+ *FalaAI::HealthApi* | [**health_check_head**](docs/HealthApi.md#health_check_head) | **HEAD** /v1/health | Health Check
131
+ *FalaAI::SpeechApi* | [**create_transcription_v1_audio_transcriptions_post**](docs/SpeechApi.md#create_transcription_v1_audio_transcriptions_post) | **POST** /v1/audio/transcriptions | Transcribe audio to text
132
+ *FalaAI::UsageApi* | [**get_usage_by_key_v1_usage_by_key_get**](docs/UsageApi.md#get_usage_by_key_v1_usage_by_key_get) | **GET** /v1/usage/by-key | Get Usage By Key
133
+ *FalaAI::UsageApi* | [**get_usage_log_v1_usage_log_get**](docs/UsageApi.md#get_usage_log_v1_usage_log_get) | **GET** /v1/usage/log | Get Usage Log
134
+ *FalaAI::VersionApi* | [**get_version_api_version_get**](docs/VersionApi.md#get_version_api_version_get) | **GET** /api/version | Get Version
135
+ *FalaAI::WebhooksApi* | [**create_webhook_v1_webhooks_post**](docs/WebhooksApi.md#create_webhook_v1_webhooks_post) | **POST** /v1/webhooks | Criar webhook de alertas
136
+ *FalaAI::WebhooksApi* | [**delete_webhook_v1_webhooks_webhook_id_delete**](docs/WebhooksApi.md#delete_webhook_v1_webhooks_webhook_id_delete) | **DELETE** /v1/webhooks/{webhook_id} | Remover webhook
137
+ *FalaAI::WebhooksApi* | [**list_webhooks_v1_webhooks_get**](docs/WebhooksApi.md#list_webhooks_v1_webhooks_get) | **GET** /v1/webhooks | Listar webhooks de alertas
138
+ *FalaAI::WebhooksApi* | [**update_webhook_v1_webhooks_webhook_id_put**](docs/WebhooksApi.md#update_webhook_v1_webhooks_webhook_id_put) | **PUT** /v1/webhooks/{webhook_id} | Atualizar webhook
139
+
140
+
141
+ ## Documentation for Models
142
+
143
+ - [FalaAI::AudioEvent](docs/AudioEvent.md)
144
+ - [FalaAI::AudioInputMeta](docs/AudioInputMeta.md)
145
+ - [FalaAI::AuditoriaRiscoAnalysisV2](docs/AuditoriaRiscoAnalysisV2.md)
146
+ - [FalaAI::AuditoriaRiscoAppliedActionV2](docs/AuditoriaRiscoAppliedActionV2.md)
147
+ - [FalaAI::AuditoriaRiscoAudioEventModelV2](docs/AuditoriaRiscoAudioEventModelV2.md)
148
+ - [FalaAI::AuditoriaRiscoAuditDecisionsV2](docs/AuditoriaRiscoAuditDecisionsV2.md)
149
+ - [FalaAI::AuditoriaRiscoConversationScoresV2](docs/AuditoriaRiscoConversationScoresV2.md)
150
+ - [FalaAI::AuditoriaRiscoDetectionItemV2](docs/AuditoriaRiscoDetectionItemV2.md)
151
+ - [FalaAI::AuditoriaRiscoDetectionsV2](docs/AuditoriaRiscoDetectionsV2.md)
152
+ - [FalaAI::AuditoriaRiscoIndexerV2](docs/AuditoriaRiscoIndexerV2.md)
153
+ - [FalaAI::AuditoriaRiscoMetaV2](docs/AuditoriaRiscoMetaV2.md)
154
+ - [FalaAI::AuditoriaRiscoParticipantV2](docs/AuditoriaRiscoParticipantV2.md)
155
+ - [FalaAI::AuditoriaRiscoParticipantsV2](docs/AuditoriaRiscoParticipantsV2.md)
156
+ - [FalaAI::AuditoriaRiscoRequest](docs/AuditoriaRiscoRequest.md)
157
+ - [FalaAI::AuditoriaRiscoScoresV2](docs/AuditoriaRiscoScoresV2.md)
158
+ - [FalaAI::AuditoriaRiscoScoringExplanationV2](docs/AuditoriaRiscoScoringExplanationV2.md)
159
+ - [FalaAI::AuditoriaRiscoSummaryV2](docs/AuditoriaRiscoSummaryV2.md)
160
+ - [FalaAI::AuditoriaRiscoTimelineV2](docs/AuditoriaRiscoTimelineV2.md)
161
+ - [FalaAI::AuditoriaRiscoUsageV2](docs/AuditoriaRiscoUsageV2.md)
162
+ - [FalaAI::AuditoriaRiscoV2](docs/AuditoriaRiscoV2.md)
163
+ - [FalaAI::AuditoriaRiscoV2Response](docs/AuditoriaRiscoV2Response.md)
164
+ - [FalaAI::AuditoriaRiscoVerdictV2](docs/AuditoriaRiscoVerdictV2.md)
165
+ - [FalaAI::CreateEmailAlertRequest](docs/CreateEmailAlertRequest.md)
166
+ - [FalaAI::CreateWebhookRequest](docs/CreateWebhookRequest.md)
167
+ - [FalaAI::DiagnosticAnalysisMap](docs/DiagnosticAnalysisMap.md)
168
+ - [FalaAI::DiagnosticAudioEvent](docs/DiagnosticAudioEvent.md)
169
+ - [FalaAI::DiagnosticCategoricalAnalysis](docs/DiagnosticCategoricalAnalysis.md)
170
+ - [FalaAI::DiagnosticRequest](docs/DiagnosticRequest.md)
171
+ - [FalaAI::DiagnosticResponse](docs/DiagnosticResponse.md)
172
+ - [FalaAI::DiagnosticTextAnalysis](docs/DiagnosticTextAnalysis.md)
173
+ - [FalaAI::DiagnosticUsage](docs/DiagnosticUsage.md)
174
+ - [FalaAI::EmailAlertItem](docs/EmailAlertItem.md)
175
+ - [FalaAI::EmailAlertListResponse](docs/EmailAlertListResponse.md)
176
+ - [FalaAI::EmailAlertMessageResponse](docs/EmailAlertMessageResponse.md)
177
+ - [FalaAI::EmailEvent](docs/EmailEvent.md)
178
+ - [FalaAI::HTTPValidationError](docs/HTTPValidationError.md)
179
+ - [FalaAI::HealthResponse](docs/HealthResponse.md)
180
+ - [FalaAI::LocationInner](docs/LocationInner.md)
181
+ - [FalaAI::MessageResponse](docs/MessageResponse.md)
182
+ - [FalaAI::Participant](docs/Participant.md)
183
+ - [FalaAI::ParticipantDiagnostic](docs/ParticipantDiagnostic.md)
184
+ - [FalaAI::TranscriptionResponse](docs/TranscriptionResponse.md)
185
+ - [FalaAI::TranscriptionUsage](docs/TranscriptionUsage.md)
186
+ - [FalaAI::UpdateEmailAlertRequest](docs/UpdateEmailAlertRequest.md)
187
+ - [FalaAI::UpdateWebhookRequest](docs/UpdateWebhookRequest.md)
188
+ - [FalaAI::UsageByKeyItem](docs/UsageByKeyItem.md)
189
+ - [FalaAI::UsageLogItem](docs/UsageLogItem.md)
190
+ - [FalaAI::UsageLogResponse](docs/UsageLogResponse.md)
191
+ - [FalaAI::ValidationError](docs/ValidationError.md)
192
+ - [FalaAI::VersionResponse](docs/VersionResponse.md)
193
+ - [FalaAI::WebhookEvent](docs/WebhookEvent.md)
194
+ - [FalaAI::WebhookItem](docs/WebhookItem.md)
195
+ - [FalaAI::WebhookListResponse](docs/WebhookListResponse.md)
196
+
197
+
198
+ ## Documentation for Authorization
199
+
200
+
201
+ Authentication schemes defined for the API:
202
+ ### ApiKeyAuth
203
+
204
+ - **Type**: Bearer authentication (fai_xxx)
205
+
@@ -0,0 +1,147 @@
1
+ # FalaAI::AnalysisApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_auditoria_risco_v1_analyze_auditoria_risco_post**](AnalysisApi.md#create_auditoria_risco_v1_analyze_auditoria_risco_post) | **POST** /v1/analyze/auditoriaRisco | Compliance Risk Audit — conversation compliance analysis |
8
+ | [**create_diagnostic_v1_analyze_diagnostic_post**](AnalysisApi.md#create_diagnostic_v1_analyze_diagnostic_post) | **POST** /v1/analyze/diagnostic | Analyze a call transcript — 5 parallel analyses |
9
+
10
+
11
+ ## create_auditoria_risco_v1_analyze_auditoria_risco_post
12
+
13
+ > <AuditoriaRiscoV2Response> create_auditoria_risco_v1_analyze_auditoria_risco_post(auditoria_risco_request)
14
+
15
+ Compliance Risk Audit — conversation compliance analysis
16
+
17
+ Analyzes a call transcript for compliance risks. Returns a score (0-100), classification level, violations, positives, and a detailed HTML report. **Python:** ```python import httpx response = httpx.post( 'https://api.fala.ai/v1/analyze/auditoriaRisco', headers={'Authorization': 'Bearer fai_xxx'}, json={ 'dialog': 'Speaker 1: [00:00:00.540 - 00:00:01.139] Hi, Alex.', 'duration_seconds': 151.0, 'language': 'pt-BR', 'response_language': 'en-US' } ) print(response.json()) ``` **cURL:** ```bash curl https://api.fala.ai/v1/analyze/auditoriaRisco \\ -H 'Authorization: Bearer fai_xxx' \\ -H 'Content-Type: application/json' \\ -d '{ \"dialog\": \"Speaker 1: [00:00:00.540 - 00:00:01.139] Hi, Alex.\", \"duration_seconds\": 151.0, \"language\": \"pt-BR\", \"response_language\": \"en-US\" }' ```
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'falaai-api'
24
+ # setup authorization
25
+ FalaAI.configure do |config|
26
+ # Configure Bearer authorization (fai_xxx): ApiKeyAuth
27
+ config.access_token = 'YOUR_BEARER_TOKEN'
28
+ end
29
+
30
+ api_instance = FalaAI::AnalysisApi.new
31
+ auditoria_risco_request = FalaAI::AuditoriaRiscoRequest.new({duration_seconds: 3.56, language: 'pt-BR', response_language: 'en-US'}) # AuditoriaRiscoRequest |
32
+
33
+ begin
34
+ # Compliance Risk Audit — conversation compliance analysis
35
+ result = api_instance.create_auditoria_risco_v1_analyze_auditoria_risco_post(auditoria_risco_request)
36
+ p result
37
+ rescue FalaAI::ApiError => e
38
+ puts "Error when calling AnalysisApi->create_auditoria_risco_v1_analyze_auditoria_risco_post: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the create_auditoria_risco_v1_analyze_auditoria_risco_post_with_http_info variant
43
+
44
+ This returns an Array which contains the response data, status code and headers.
45
+
46
+ > <Array(<AuditoriaRiscoV2Response>, Integer, Hash)> create_auditoria_risco_v1_analyze_auditoria_risco_post_with_http_info(auditoria_risco_request)
47
+
48
+ ```ruby
49
+ begin
50
+ # Compliance Risk Audit — conversation compliance analysis
51
+ data, status_code, headers = api_instance.create_auditoria_risco_v1_analyze_auditoria_risco_post_with_http_info(auditoria_risco_request)
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => <AuditoriaRiscoV2Response>
55
+ rescue FalaAI::ApiError => e
56
+ puts "Error when calling AnalysisApi->create_auditoria_risco_v1_analyze_auditoria_risco_post_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ | Name | Type | Description | Notes |
63
+ | ---- | ---- | ----------- | ----- |
64
+ | **auditoria_risco_request** | [**AuditoriaRiscoRequest**](AuditoriaRiscoRequest.md) | | |
65
+
66
+ ### Return type
67
+
68
+ [**AuditoriaRiscoV2Response**](AuditoriaRiscoV2Response.md)
69
+
70
+ ### Authorization
71
+
72
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: application/json
77
+ - **Accept**: application/json
78
+
79
+
80
+ ## create_diagnostic_v1_analyze_diagnostic_post
81
+
82
+ > <DiagnosticResponse> create_diagnostic_v1_analyze_diagnostic_post(diagnostic_request)
83
+
84
+ Analyze a call transcript — 5 parallel analyses
85
+
86
+ Runs 5 independent analyses on a call transcript: dialogue summary, contact reason, identified action, label classification, and sentiment. **Python:** ```python import httpx response = httpx.post( 'https://api.fala.ai/v1/analyze/diagnostic', headers={'Authorization': 'Bearer fai_xxx'}, json={ 'dialog': 'Speaker 1: [00:00:00.540 - 00:00:01.139] Hi, Alex.', 'language': 'pt-BR', 'duration_seconds': 151.0 } ) print(response.json()) ``` **cURL:** ```bash curl https://api.fala.ai/v1/analyze/diagnostic \\ -H 'Authorization: Bearer fai_xxx' \\ -H 'Content-Type: application/json' \\ -d '{ \"dialog\": \"Speaker 1: [00:00:00.540 - 00:00:01.139] Hi, Alex.\", \"language\": \"pt-BR\", \"duration_seconds\": 151.0 }' ```
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'falaai-api'
93
+ # setup authorization
94
+ FalaAI.configure do |config|
95
+ # Configure Bearer authorization (fai_xxx): ApiKeyAuth
96
+ config.access_token = 'YOUR_BEARER_TOKEN'
97
+ end
98
+
99
+ api_instance = FalaAI::AnalysisApi.new
100
+ diagnostic_request = FalaAI::DiagnosticRequest.new({language: 'pt-BR', duration_seconds: 3.56}) # DiagnosticRequest |
101
+
102
+ begin
103
+ # Analyze a call transcript — 5 parallel analyses
104
+ result = api_instance.create_diagnostic_v1_analyze_diagnostic_post(diagnostic_request)
105
+ p result
106
+ rescue FalaAI::ApiError => e
107
+ puts "Error when calling AnalysisApi->create_diagnostic_v1_analyze_diagnostic_post: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the create_diagnostic_v1_analyze_diagnostic_post_with_http_info variant
112
+
113
+ This returns an Array which contains the response data, status code and headers.
114
+
115
+ > <Array(<DiagnosticResponse>, Integer, Hash)> create_diagnostic_v1_analyze_diagnostic_post_with_http_info(diagnostic_request)
116
+
117
+ ```ruby
118
+ begin
119
+ # Analyze a call transcript — 5 parallel analyses
120
+ data, status_code, headers = api_instance.create_diagnostic_v1_analyze_diagnostic_post_with_http_info(diagnostic_request)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => <DiagnosticResponse>
124
+ rescue FalaAI::ApiError => e
125
+ puts "Error when calling AnalysisApi->create_diagnostic_v1_analyze_diagnostic_post_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **diagnostic_request** | [**DiagnosticRequest**](DiagnosticRequest.md) | | |
134
+
135
+ ### Return type
136
+
137
+ [**DiagnosticResponse**](DiagnosticResponse.md)
138
+
139
+ ### Authorization
140
+
141
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: application/json
146
+ - **Accept**: application/json
147
+
@@ -0,0 +1,26 @@
1
+ # FalaAI::AudioEvent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event** | **String** | Type of identified audio event. Ex: [riso], [suspiro], [pausa], [tosse] | |
8
+ | **start_s** | **Float** | Start time of audio event in seconds | |
9
+ | **end_s** | **Float** | End time of audio event in seconds | |
10
+ | **duration_s** | **Float** | Event duration in seconds | |
11
+ | **formatted_timestamp** | **String** | Formatted timestamp HH:MM:SS.mmm of event start | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'falaai-api'
17
+
18
+ instance = FalaAI::AudioEvent.new(
19
+ event: [suspiro],
20
+ start_s: 75.42,
21
+ end_s: 75.43,
22
+ duration_s: 0.01,
23
+ formatted_timestamp: 00:01:15.420
24
+ )
25
+ ```
26
+
@@ -0,0 +1,26 @@
1
+ # FalaAI::AudioInputMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **duration_s** | **Float** | Exact audio duration sent in seconds | |
8
+ | **original_format** | **String** | Original file format (wav, mp3, ogg, etc) | |
9
+ | **codec** | **String** | Audio codec sent | |
10
+ | **sample_rate** | **Integer** | Audio sample rate in Hz | |
11
+ | **channels** | **Integer** | Number of channels (1&#x3D;mono, 2&#x3D;stereo) | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'falaai-api'
17
+
18
+ instance = FalaAI::AudioInputMeta.new(
19
+ duration_s: 151.04,
20
+ original_format: wav,
21
+ codec: pcm_s16le,
22
+ sample_rate: 44100,
23
+ channels: 2
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # FalaAI::AuditoriaRiscoAnalysisV2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **global_metrics** | **Hash&lt;String, Object&gt;** | Global metrics | [optional] |
8
+ | **final_analysis** | **Hash&lt;String, Object&gt;** | Final analysis | [optional] |
9
+ | **frameworks** | **Hash&lt;String, Object&gt;** | Frameworks (COPC/ISO/Kirkpatrick/CES) | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'falaai-api'
15
+
16
+ instance = FalaAI::AuditoriaRiscoAnalysisV2.new(
17
+ global_metrics: null,
18
+ final_analysis: null,
19
+ frameworks: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,32 @@
1
+ # FalaAI::AuditoriaRiscoAppliedActionV2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **action_type** | **String** | Action type code | |
8
+ | **label** | **String** | Action label | |
9
+ | **description** | **String** | Action description | |
10
+ | **priority** | **String** | CRITICO/ALTO/MEDIO/BAIXO | |
11
+ | **color** | **String** | Color | [optional][default to &#39;&#39;] |
12
+ | **icon** | **String** | Icon | [optional][default to &#39;&#39;] |
13
+ | **condition** | **String** | Condition | [optional] |
14
+ | **reason** | **String** | Reason | [optional][default to &#39;&#39;] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'falaai-api'
20
+
21
+ instance = FalaAI::AuditoriaRiscoAppliedActionV2.new(
22
+ action_type: null,
23
+ label: null,
24
+ description: null,
25
+ priority: null,
26
+ color: null,
27
+ icon: null,
28
+ condition: null,
29
+ reason: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,22 @@
1
+ # FalaAI::AuditoriaRiscoAudioEventModelV2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **model** | **String** | MAC model text (i18n) | [optional][default to &#39;&#39;] |
8
+ | **description** | **String** | MAC description (i18n) | [optional][default to &#39;&#39;] |
9
+ | **windows_s** | **Hash&lt;String, Object&gt;** | Temporal windows (s) | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'falaai-api'
15
+
16
+ instance = FalaAI::AuditoriaRiscoAudioEventModelV2.new(
17
+ model: null,
18
+ description: null,
19
+ windows_s: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # FalaAI::AuditoriaRiscoAuditDecisionsV2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **risk_origin** | **String** | Risk origin | [optional] |
8
+ | **has_zero_tolerance_violation** | **Boolean** | Has zero-tolerance violation | [optional] |
9
+ | **deterministic_validator_changes** | **Array&lt;Object&gt;** | Deterministic validator changes | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'falaai-api'
15
+
16
+ instance = FalaAI::AuditoriaRiscoAuditDecisionsV2.new(
17
+ risk_origin: null,
18
+ has_zero_tolerance_violation: null,
19
+ deterministic_validator_changes: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,38 @@
1
+ # FalaAI::AuditoriaRiscoConversationScoresV2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **consolidated_score** | **Float** | Consolidated score | [optional] |
8
+ | **violation_density_per_min** | **Float** | Violation density/min | [optional] |
9
+ | **sentiment_trend** | **Object** | Sentiment trend | [optional] |
10
+ | **pct_turns_with_violation** | **Float** | % turns with violation | [optional] |
11
+ | **most_critical_turn** | **Object** | Most critical turn | [optional] |
12
+ | **positive_negative_ratio** | **Object** | Positive:negative ratio | [optional] |
13
+ | **global_risk_severity** | **String** | Global risk severity code | [optional] |
14
+ | **global_risk_severity_label** | **String** | Global risk severity label | [optional] |
15
+ | **global_risk_severity_color** | **String** | Global risk severity color | [optional] |
16
+ | **risk_likelihood_avg** | **Float** | Risk likelihood avg | [optional] |
17
+ | **risk_impact_avg** | **Float** | Risk impact avg | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'falaai-api'
23
+
24
+ instance = FalaAI::AuditoriaRiscoConversationScoresV2.new(
25
+ consolidated_score: null,
26
+ violation_density_per_min: null,
27
+ sentiment_trend: null,
28
+ pct_turns_with_violation: null,
29
+ most_critical_turn: null,
30
+ positive_negative_ratio: null,
31
+ global_risk_severity: null,
32
+ global_risk_severity_label: null,
33
+ global_risk_severity_color: null,
34
+ risk_likelihood_avg: null,
35
+ risk_impact_avg: null
36
+ )
37
+ ```
38
+