Transcription

Turn raw audio into structured text with one endpoint.

The audio transcription API streams files to providers such as OpenAI Whisper, records token usage, and emits normalized responses that work inside n8n or your own apps.

Endpoint

Send audio through POST /audio/transcribe and receive structured text plus usage metadata.

Base URL https://luntrex.com/api/v1

Required fields

  • model ? provider/model pair (e.g. openai/whisper-1).
  • audio ? multipart file upload or audio_base64 string.
  • Optional: filename, mime_type when using base64.

If you send both audio and audio_base64, the file upload wins.

Multipart (recommended)

curl -X POST https://luntrex.com/api/v1/audio/transcribe \
  -H "Authorization: Bearer <API_KEY>" \
  -F "model=openai/whisper-1" \
  -F "audio=@Recording.m4a"

Use this mode from n8n?s HTTP Request node (?Send Binary Data?).

JSON with base64

POST /audio/transcribe
{
  "model": "openai/whisper-1",
  "audio_base64": "<base64 string>",
  "filename": "meeting.m4a",
  "mime_type": "audio/x-m4a"
}

Ideal when you already have base64 bytes coming from a form or browser.

Response

{
  "text": "Are you ready for help me?",
  "status": "success",
  "raw": {
    "text": "Are you ready for help me?",
    "usage": {
      "type": "duration",
      "seconds": 4
    }
  }
}

The raw block mirrors the provider response for troubleshooting.

Usage & billing

  • Each call logs a usage row with input_tokens, output_tokens, and total_cost_tokens.
  • If the provider returns explicit token counts, we use them. Otherwise we estimate input_tokens from audio duration and output_tokens from transcript length.
  • Tokens are multiplied by price_input / price_output on the selected model.

n8n quick start

  1. Add HTTP Request node > Method POST > URL https://luntrex.com/api/v1/audio/transcribe.
  2. Toggle Send Binary Data, choose the property from the previous node (e.g. sdfsd).
  3. Add fields: model=openai/whisper-1, optional filename, mime_type with expressions {{ $binary.sdfsd.fileName }}, {{ $binary.sdfsd.mimeType }}.
  4. Set header Authorization: Bearer <API_KEY>.
  5. The node output contains text; use it downstream in Slack, email, etc.

Errors

  • 401 api_key_missing ? invalid or missing bearer token.
  • 403 insufficient credits ? user balance is 0.
  • 415 ? unsupported MIME type (ensure audio matches allowed list).
  • 5xx ? provider error; check raw response.

Tips

  • Max file size is 25 MB; larger recordings should be chunked before upload.
  • Use the filename parameter to keep transcripts organized in logs.
  • Balance checks are serialized with cache locks to avoid race conditions.
Back to top