Skip to content

feat(transcribe): add OpenRouter as an STT/transcription provider #440

Description

@HeMuling

Summary

Would you be open to adding OpenRouter as a transcription provider for Agent Reach?

Today the transcription path appears to support only Groq and OpenAI:

At the same time, OpenRouter now provides a dedicated STT endpoint:

I searched the existing issues/PRs and did not find an existing OpenRouter feature request.

Why this would help

This would be useful for users who:

  • already route most model usage through OpenRouter
  • want a single key / billing surface for transcription too
  • want access to OpenRouter-hosted STT models without adding a new provider integration each time
  • want to use OpenRouter routing / BYOK capabilities for speech-to-text

Proposed scope

A minimal version would be enough:

  • add openrouter as a transcription provider
  • add openrouter_api_key config support
  • allow provider="openrouter" in the transcription path / CLI
  • call OpenRouter's /api/v1/audio/transcriptions endpoint with its required JSON payload
  • use a reasonable default model slug (for example openai/whisper-1), with optional model configurability later if desired

Implementation note

This looks like a small but real provider-specific change, not just a new endpoint string.

Current code posts multipart form data like:

  • files={"file": ...}
  • data={"model": ..., "response_format": "text"}

OpenRouter's STT API expects JSON with base64-encoded audio under input_audio, for example:

  • input_audio.data
  • input_audio.format
  • model

So the clean path seems to be adding a provider-specific request branch for OpenRouter while keeping the current Groq/OpenAI flow unchanged.

Offer

If this direction makes sense, I’m happy to implement it and open the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions