How it Works
Authentication
The API supports two authentication methods: API keys and session-based authentication.
API Keys: Users can generate API keys with specific scopes (e.g., transcribe, summarize). API keys are passed in the X-API-Key header.
Session-based Authentication: Users can authenticate using their Supabase session JWT, passed in the Authorization header.
Transcription
The /transcribe endpoint accepts an audio file or URL and transcribes it to text using Deepgram's speech-to-text API. The transcription can be returned in various formats (plain text, SRT, VTT). For YouTube URLs, the API first attempts to fetch subtitles. If subtitles are unavailable, it downloads the audio and sends it to Deepgram for transcription.
Summarization
The /summarize endpoint accepts a text input and generates a summary using Cohere's summarization model. Users can specify the desired summary length, format (bullet points or paragraph), and an optional additional command for the model.
User Credits
Each transcription or summarization task consumes user credits based on the audio/text duration. Users can check their credit balance and add more credits as needed.