{"name":"WhatsApp Media Decryptor API","version":"2.1.0","description":"API para descriptografar mídias do WhatsApp e converter mídia genérica","endpoints":{"/decrypt-media":{"method":"POST","description":"Endpoint genérico para descriptografar qualquer tipo de mídia","supportedTypes":["image","video","audio","sticker","document"]},"/decrypt-image":{"method":"POST","description":"Endpoint específico para imagens"},"/decrypt-video":{"method":"POST","description":"Endpoint específico para vídeos"},"/decrypt-audio":{"method":"POST","description":"Endpoint específico para áudios"},"/decrypt-sticker":{"method":"POST","description":"Endpoint específico para figurinhas/stickers"},"/decrypt-document":{"method":"POST","description":"Endpoint específico para documentos (PDF, Word, etc.)"},"/convert":{"method":"POST","description":"Endpoint principal de conversão de mídia genérica","body":{"url":"string (opcional)","base64":"string (opcional)","targetType":"string (obrigatório)","options":"object (opcional)","output":"string (opcional: base64 | file | both, default file)"},"targetTypes":["video","videoplay","ptv","audio","myaudio","ptt","image","sticker","document"],"acceptedVideoFormats":["video","videoplay","ptv"],"acceptedAudioFormats":["audio","myaudio","ptt"],"acceptedImageFormats":["image","sticker"],"acceptedOtherFormats":["document"],"outputModes":{"file":"Default. Salva o arquivo em disco e retorna fileUrl/filePath auto-destrutiva (TTL 60min)","base64":"Retorna o arquivo embutido nos campos base64/dataUrl (sem URL)","both":"Retorna tanto o fileUrl quanto o base64/dataUrl"}},"/convert-video":{"method":"POST","description":"Atalho para converter para MP4 (H.264 + AAC) [targetType: video]"},"/convert-ptv":{"method":"POST","description":"Atalho para converter para MP4 quadrado (video note) [targetType: ptv]"},"/convert-ptt":{"method":"POST","description":"Atalho para converter para OGG Opus mono 16kHz (mensagem de voz) [targetType: ptt]"},"/convert-audio":{"method":"POST","description":"Atalho para converter para MP3/OGG [targetType: audio]"},"/convert-image":{"method":"POST","description":"Atalho para converter para JPEG [targetType: image]"},"/convert-sticker":{"method":"POST","description":"Atalho para converter para WEBP 512x512 [targetType: sticker]"},"/detect-format":{"method":"POST","description":"Detecta o formato real do arquivo pelos magic bytes","body":{"url":"string (opcional)","base64":"string (opcional)"},"response":{"mimetype":"string","extension":"string"}},"/media/:token":{"method":"GET","description":"Download de um arquivo convertido salvo em disco (auto-destruição após TTL)"}},"convertTargets":{"video":"MP4 (H.264 + AAC)","videoplay":"MP4 (H.264 + AAC)","ptv":"MP4 (H.264 + AAC, crop quadrado centralizado)","audio":"MP3 (default) ou OGG via options.audioFormat","myaudio":"MP3 (default) ou OGG via options.audioFormat","ptt":"OGG Opus mono 16kHz (mensagem de voz)","image":"JPEG","sticker":"WEBP 512x512 (transparência preservada)","document":"Sem conversão (pass-through)"},"convertExamples":{"convert":"POST /convert { \"url\": \"https://.../arquivo.mov\", \"targetType\": \"video\", \"options\": { \"quality\": \"high\", \"maxWidth\": 720 } }","convertPtt":"POST /convert-ptt { \"base64\": \"data:audio/ogg;base64,...\" }","detect":"POST /detect-format { \"url\": \"https://.../arquivo.heic\" }","convertFile":"POST /convert { \"url\": \"https://.../arquivo.mov\", \"targetType\": \"video\", \"output\": \"file\" } // só fileUrl","convertBoth":"POST /convert { \"url\": \"https://.../arquivo.mov\", \"targetType\": \"video\", \"output\": \"both\" } // fileUrl + base64"},"usage":{"format1":"Enviar { \"content\": {...}, \"messageType\": \"...\", \"mediaType\": \"...\" }","format2":"Enviar { \"message\": { \"content\": {...}, \"messageType\": \"...\", \"mediaType\": \"...\" } }","format3":"Enviar o content diretamente: { \"URL\": \"...\", \"mediaKey\": \"...\", ... }"},"requiredFields":["URL","mediaKey","fileSHA256"],"response":{"success":true,"mediaType":"string","base64":"string","mimetype":"string","size":"number","fileName":"string"}}