On this page
Model configuration
Last updated: 2026-11-22
Keragi’s AI capabilities are provided by agix. Each user adds their own model key in the client under Settings → AI assistant → Model key configuration; it is stored in agix’s per-account provider config. Server .env files do not hold model keys. This page uses placeholders only. Never put real keys into documentation, screenshots or tickets.
Deployment note (important): text, vision, images, video, music, TTS and ASR work on both native and WASM deployments. WASM media requires
AGIX_WASM_MEDIAand outbound HTTP from the host. The models actually available depend on the keys and upstream quota configured by the operator. Knowledge-base retrieval is still maturing, and AI conversation history differs by deployment form.
1. Model categories
| Category | Typical use | Main configuration | Current wasm deployment |
|---|---|---|---|
| Text / chat | AI conversations, AI takeover | DeepSeek, Qianwen | Available |
| Image generation | Text-to-image | Qianwen (Bailian) | Available (configured qwen-image) |
| Video generation | Text-to-video, image-to-video | Qianwen, Volcano Ark Seedance 2.5 / 2.5 Flash | Available (native + WASM) |
| Voice / music | TTS, ASR, music generation | Qianwen, DeepSeek, Stability | Available (native + WASM) |
2. General rules
- Restart the host after changing
.env. - Prefer each user’s own key. If a shared fallback is unavoidable, keep it in a platform secret store rather than a committed
.env, and never in the frontendconfig.json. - One provider key may cover several categories (for example Qianwen text, image and voice).
- Optional models are not registered when unconfigured; the feature reports “model not configured” or the model disappears from the list.
- Any user can add their own key under Me → Settings → AI assistant → Model key configuration; keys are isolated per account. Do not put model keys in server
.envfiles. - Calls using a user-supplied key are not metered against platform credits (BYOK).
3. Text / chat models
AGIX_DEFAULT_MODEL=deepseek-flash
AGIX_DEEPSEEK_URL=https://api.deepseek.com/v1
Qianwen can also serve as a text provider:
AGIX_QIANWEN_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
AGIX_DEFAULT_MODELis the registry name used when a request does not specify a model.- In the client’s AI takeover dialog, users can switch between the internal AI and connector models.
- If you see
model '...' not configured, the catalog contains the model but no provider resolved; check the key and restart.
4. Image generation
Image generation uses Qianwen (Alibaba Cloud Bailian):
AGIX_QIANWEN_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
AGIX_DASHSCOPE_URL=https://dashscope.aliyuncs.com/api/v1
Once configured, image models appear under /agix/v1/models. Generated media is stored in the server media directory and shown or downloaded by the client.
5. Video generation
There are two video paths. Both native and WASM deployments support video; WASM requires AGIX_WASM_MEDIA and outbound HTTP from the host.
Qianwen (Bailian)
AGIX_DASHSCOPE_URL=https://dashscope.aliyuncs.com/api/v1
Volcano Ark Seedance
AGIX_ARK_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
AGIX_SEEDANCE_MODEL=<SEEDANCE_MODEL_ID>
AGIX_SEEDANCE_FLASH_MODEL=<SEEDANCE_FLASH_MODEL_ID>
seedance and seedance-flash share the Ark key and base URL; AGIX_SEEDANCE_MODEL / AGIX_SEEDANCE_FLASH_MODEL override their model IDs, defaulting to doubao-seedance-2-5-260628 and doubao-seedance-2-5-flash-261115.
Video jobs are asynchronous; adjust polling and timeout with:
AGIX_VIDEO_POLL_INTERVAL_MS=5000
AGIX_VIDEO_TIMEOUT_MS=300000
6. Voice and music
TTS/ASR can use DeepSeek’s native voice tools (deepseek-tts / deepseek-asr, reusing the same DeepSeek provider and AGIX_DEEPSEEK_URL), or Qianwen. Voice and music work on both native and WASM deployments; WASM requires AGIX_WASM_MEDIA and outbound HTTP from the host.
AGIX_DASHSCOPE_URL=https://dashscope.aliyuncs.com/api/v1
Music generation uses Stability Stable Audio (optional):
AGIX_STABLE_AUDIO_URL=https://api.stability.ai/v2beta
AGIX_STABLE_AUDIO_MODEL=stable-audio-2.5
Polling and timeout:
AGIX_MUSIC_POLL_INTERVAL_MS=2000
AGIX_MUSIC_TIMEOUT_MS=300000
7. Metering and quota
AGIX_DEFAULT_DAILY_QUOTA=1000000
AGIX_DB_CONFIG_TTL_MS=5000
AGIX_DEFAULT_DAILY_QUOTA=0disables metering.- The client shows used/remaining quota and history under Settings → AI assistant → Usage.
- Metering and quotas affect server calls only; they do not change provider billing.
8. Verification
- Restart the host.
- Sign in as an administrator and check Settings → AI assistant for available models.
- Or query the model list and send a minimal request:
curl -H "Authorization: Bearer <token>" http://127.0.0.1:3001/agix/v1/models
curl -X POST http://127.0.0.1:3001/agix/v1/responses \
-H "Authorization: Bearer <token>" -H 'Content-Type: application/json' \
-d '{"model":"deepseek-flash","input":"Reply with exactly OK"}'
- If image/video/voice models are missing, confirm the provider key, model id and (for WASM)
AGIX_WASM_MEDIA.
9. Security
- Never write real keys into this documentation, frontend configuration, client logs or tickets.
- In production, inject secrets through a platform secret store or
.envwith600permissions, and rotate them regularly. - Grant execution scopes such as
agix:execonly to trusted accounts; quotas and rate limits reduce misuse risk. - See Environment variable troubleshooting for
.envsyntax and troubleshooting.