extract_whatsapp
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. Provide the export as file_base64 (base64 of the .zip/.txt bytes) plus optional filename. 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. Outside the preview, this call consumes credits and the amount actually charged is returned in usage.credits_consumed; the preview credits_total is an estimate and the preview charges nothing; 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. IMPORTANT: this call charges credits and the result is NOT stored — you MUST read the FULL response and relay ALL of its information to the user (the complete list of conversations with their dialogs and counts, usage and meta; no omissions, no shortening), and persist it if the user may need it later; calling again charges again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| start | No | ||
| dry_run | No | ||
| windows | No | ||
| filename | No | export.zip | |
| timezone | Yes | ||
| expression | No | ||
| voice_note | No | ||
| date_format | Yes | ||
| file_base64 | Yes | ||
| gap_minutes | No | ||
| min_messages | No | ||
| client_reference_id | No |