Skip to content

Compatible AI / Local LLM Translation Channel

What is it?

In pyVideoTrans, AI large language models can serve as highly effective translation channels by leveraging context for significantly improved translation quality. The Compatible AI / Local Model channel supports all AI services that use an OpenAI ChatGPT-compatible interface, including:

  • Online AI platforms (Moonshot AI, Baichuan AI, 01.AI, etc.)
  • Locally deployed models (via Ollama, LM Studio, etc.)
  • Any third-party service with an OpenAI-compatible API

Prerequisites

  • pyVideoTrans software
  • An API key from the AI platform (for online services) or a local model (for offline use)

Using Online AI Platforms

Moonshot AI (月之暗面)

  1. Open the menu bar → Translation SettingsOpenAI ChatGPT API Settings
  2. In the API URL field, enter: https://api.moonshot.cn/v1
  3. Enter the API key from the Moonshot platform in the SK field (get it at: https://platform.moonshot.cn/console/api-keys)
  4. In the model text box, enter: moonshot-v1-8k,moonshot-v1-32k,moonshot-v1-128k
  5. Select a model from the dropdown
  6. Click Test, then save after success

Baichuan AI (百川智能)

  1. Open the menu bar → Translation SettingsOpenAI ChatGPT API Settings
  2. In the API URL field, enter: https://api.baichuan-ai.com/v1
  3. Enter the API key from the Baichuan platform in the SK field (get it at: https://platform.baichuan-ai.com/console/apikey)
  4. In the model text box, enter: Baichuan4,Baichuan3-Turbo,Baichuan3-Turbo-128k,Baichuan2-Turbo
  5. Select a model from the dropdown
  6. Click Test, then save after success

01.AI (零一万物)

SettingValue
API URLhttps://api.lingyiwanwu.com/v1
API KeyGet from https://platform.lingyiwanwu.com/apikeys
Modelyi-lightning

Using Ollama for Local Model Deployment

Step 1: Install Ollama

  1. Go to https://ollama.com/download
  2. Download the installer for your operating system

  1. Run the installer and click Install to complete setup

Step 2: Download a Model

After installation, a command window will open automatically. Enter the following command to download the Qwen model:

ollama run qwen

Wait for the download to complete:

When you see "Success", the model deployment is complete.

The default API endpoint is http://localhost:11434

How to reopen the command window? Press Win+Q, search for cmd, open Command Prompt, and enter ollama run qwen.

Step 3 (Optional): Install a GUI

If you prefer a graphical interface, install ChatBox for a better UI experience:

  1. Go to https://chatboxai.app/zh and download

  1. After installation, click "Start Setup"
  2. In settings, select "Ollama" as the AI model provider, enter http://localhost:11434 as the API domain, and select Qwen:latest as the model
  3. Save and start using

Step 4: Configure in pyVideoTrans

  1. Open MenuSettingsOpenAI Compatible / Local LLM
  2. In the middle text box, add the model name (e.g., qwen — separate multiple models with commas)
  3. In the API URL field, enter: http://localhost:11434/v1
  4. Enter anything in the SK field (e.g., 1234)
  5. Select the model to use
  6. Click Test, then save after success

Step 5: Use Other Models

Beyond Qwen, Ollama supports many models. The process is just as simple:

  1. Browse all available models at https://ollama.com/library
  2. Copy the model name
  3. In the command window, run ollama run <model-name>

For example, to install the openchat model:

ollama run openchat


Important Notes

  1. Request rate limits: Most AI translation channels may limit requests per minute. If you see rate limit errors, click "Translation Channel ↓" on the main interface and increase the pause seconds to 10 — meaning a 10-second wait after each translation, capping at 6 requests per minute.

  1. Excessive blank lines in output: If the model you selected is not intelligent enough (especially smaller locally deployed models), it may fail to follow formatting instructions, resulting in many blank lines. You can try:
    • Using a larger model
    • Going to MenuTools/OptionsAdvanced OptionsSend full subtitle content when using AI translation, and unchecking it

Troubleshooting

IssueCauseSolution
Failed to connect to OllamaOllama not runningMake sure the Ollama service is running (port 11434)
API URL incorrectFormat wrongLocal models should use http://localhost:11434/v1
Empty translation resultModel capability insufficientTry a larger model (e.g., 14B or 32B version)
Slow local model translationInsufficient hardware resourcesUse GPU acceleration, or choose a smaller model