Backends
yaku supports four translation backends. Each sends your text to a different LLM provider.
Available backends
Section titled “Available backends”| Backend | Default model | Streaming | Notes |
|---|---|---|---|
hosted | Server-side | No | Zero-config default. Refined per-language prompts. |
gemini | gemini-2.5-flash | Yes | Free API key from Google AI Studio. |
openai | gpt-4o-mini | Yes | Works with any OpenAI-compatible API (Groq, Together, DeepSeek, Ollama). |
anthropic | claude-haiku-4-5-20251001 | Yes | Via the Anthropic SDK. |
All backends use a temperature of 0.3 for consistent, low-variance translations. With --verbose, yaku reports the actual model version used by the API (which may differ from the alias you specified).
How yaku picks a backend
Section titled “How yaku picks a backend”The backend is resolved in this order:
--backendflag — always wins if specified.- Config
backendfield — used if no flag is passed. - Default —
hosted. Having an API key does not change the default. You must explicitly choose a local backend.
# No config at all → uses hosted (the default)yaku --to en "Bonjour"
# API key set, but no backend configured → still uses hostedyaku config set api-key AIza...yaku --to en "Bonjour"
# Explicitly select a local backend to use your API keyyaku config set backend geminiyaku --to en "Bonjour"
# Override per-command with --backend flagyaku --backend openai --to en "Bonjour"Hosted backend
Section titled “Hosted backend”The default backend. Uses refined, per-language prompts with higher translation quality than local backends. See Hosted Service & Plans for a comparison, plan tiers, and quota limits.
# Use the hosted backend (always the default)yaku --to en "こんにちは"Customize the hosted endpoint:
yaku config set hosted-url https://api.staging.yakulang.comGemini backend
Section titled “Gemini backend”Uses Google’s Gemini API. Get a free API key from Google AI Studio. yaku disables Gemini’s thinking mode to reduce latency and token cost — translation is instruction-following, not a reasoning task.
# Configureyaku config set api-key YOUR_GEMINI_API_KEY
# Or use environment variableexport GOOGLE_API_KEY=YOUR_GEMINI_API_KEYOverride the model:
yaku --model gemini-2.5-pro --to en "Bonjour"OpenAI backend
Section titled “OpenAI backend”Works with OpenAI’s API and any OpenAI-compatible provider.
# OpenAIyaku config set backend openaiyaku config set api-key YOUR_OPENAI_API_KEY
# Or use environment variableexport OPENAI_API_KEY=YOUR_OPENAI_API_KEYyaku --backend openai --to en "Bonjour"OpenAI-compatible providers
Section titled “OpenAI-compatible providers”Use --api-base to point to any compatible endpoint:
# Groqyaku --backend openai \ --api-base https://api.groq.com/openai/v1 \ --model llama-3.3-70b-versatile \ --to en "Bonjour"
# Together.aiyaku --backend openai \ --api-base https://api.together.xyz/v1 \ --model meta-llama/Llama-3-70b-chat-hf \ --to en "Bonjour"
# Local Ollamayaku --backend openai \ --api-base http://localhost:11434/v1 \ --model llama3 \ --to en "Bonjour"
# DeepSeekyaku --backend openai \ --api-base https://api.deepseek.com/v1 \ --model deepseek-chat \ --to en "Bonjour"Save as defaults so you don’t repeat flags:
yaku config set backend openaiyaku config set api-base https://api.groq.com/openai/v1yaku config set model llama-3.3-70b-versatileyaku config set api-key YOUR_GROQ_API_KEYAnthropic backend
Section titled “Anthropic backend”Uses Claude models via the Anthropic SDK.
yaku config set backend anthropicyaku config set api-key YOUR_ANTHROPIC_API_KEY
# Or use environment variableexport ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEYyaku --backend anthropic --to en "Bonjour"Override the model:
yaku --backend anthropic --model claude-sonnet-4-5-20250514 --to en "Bonjour"Switching between backends
Section titled “Switching between backends”You can switch backends per-command without changing your config:
# Config says gemini, but use openai for this oneyaku --backend openai --to en "Bonjour"
# Compare outputs from different backendsecho "Bonjour" | yaku --backend gemini --to enecho "Bonjour" | yaku --backend openai --to enecho "Bonjour" | yaku --backend anthropic --to enecho "Bonjour" | yaku --backend hosted --to en