Skip to content

OpenRouter AI Translation Channel

What is it?

OpenRouter is an AI model aggregation platform that provides unified API access to a wide variety of AI models (including Claude, Llama, Mistral, GPT, and more). With OpenRouter, a single API key gives you access to models from multiple providers — perfect for users who want the flexibility to switch between models.

Prerequisites

  • pyVideoTrans v3.74 or higher
  • An OpenRouter platform account (to obtain an API key)

How to Get an API Key

Step 1: Sign up and log in to OpenRouter

Go to https://openrouter.ai and register with a Google account or email.

Step 2: Create an API Key

  1. After logging in, visit https://openrouter.ai/settings/keys
  2. Click "Create Key"
  3. Give the key a name
  4. Copy the generated API key and save it

Step 3: Add credit to your account

OpenRouter requires paid usage (some models have free tiers). Go to https://openrouter.ai/credits to top up.

Configuring in pyVideoTrans

  1. Open the menu bar → Translation SettingsOpenRouter Settings
  2. Enter the API key from the OpenRouter platform in the API KEY field
  3. Select a model from the dropdown, for example anthropic/claude-sonnet-4, google/gemini-flash-1.5, etc.
    • You can also manually enter other model names supported by OpenRouter
  4. Optionally set the Reasoning Effort level
  5. Click the Test button to verify the connection
  6. Save after a successful test

SettingRecommended Value
API URLhttps://openrouter.ai/api/v1 (default, no changes needed)
API KeyObtained from OpenRouter platform
Modelanthropic/claude-sonnet-4 (high quality) or google/gemini-flash-1.5 (good value)
Max Output Tokens8192 (default, adjust based on model)
ModelFeaturesBest For
anthropic/claude-sonnet-4Excellent translation qualityHigh-quality translations
google/gemini-flash-1.5Fast and cost-effectiveEveryday translations
meta-llama/llama-3.1-8b-instructFree tier availableFree trial
mistralai/mistral-7b-instructFree tier availableFree trial

Browse all available models and pricing at https://openrouter.ai/models.

Troubleshooting

IssueCauseSolution
"Authentication Error"API key incorrectLog in to OpenRouter and generate a new key
"Insufficient balance"Account balance too lowTop up at https://openrouter.ai/credits
Model returns errorIncorrect model name formatEnsure the model name follows the provider/model-name format
Connection timeoutNetwork issueCheck your network connection
Rate limit errorsToo many requestsIncrease the post-translation pause time