|
| 1 | +# Supported AI Services |
| 2 | + |
| 3 | +### Executing AI requests |
| 4 | +<warning id="key-warning"> |
| 5 | + By default your keys will be exposed to manager users over network requests, so it is recommended to use a site-specific key |
| 6 | + that can be easily revoked. |
| 7 | +</warning> |
| 8 | + |
| 9 | +Enabling system setting `modai.api.execute_on_server` will move the execution to the server side, hiding the network traffic. |
| 10 | + |
| 11 | +It can be enabled per service using `modai.api.{service}.execute_on_server}` format, for example, to enable this only for chatgpt, the setting would be: `modai.api.anthropic.execute_on_server`. |
| 12 | + |
| 13 | +## OpenAI (ChatGPT) |
| 14 | +- Service name: openai |
| 15 | +- Supported modes: |
| 16 | + - **text generation** – [](https://platform.openai.com/docs/guides/text-generation) |
| 17 | + - **image to text** – [](https://platform.openai.com/docs/guides/vision) |
| 18 | + - **DALL-E image creation** – [](https://platform.openai.com/docs/guides/images) |
| 19 | + |
| 20 | +ChatGPT is the default AI service assumed. Fill out the `modai.api.openai.key` and adjust any models as desired. |
| 21 | + |
| 22 | +## Google Gemini |
| 23 | +- Service name: google |
| 24 | +- Supported modes: |
| 25 | + - **text generation** - [](https://ai.google.dev/gemini-api/docs/models/gemini) |
| 26 | + - **image to text** – [](https://ai.google.dev/gemini-api/docs/vision) |
| 27 | + - **image generation** – [](https://ai.google.dev/gemini-api/docs/imagen) |
| 28 | + |
| 29 | +Add a valide API key to the `modai.api.google.key` to use Google Gemini. |
| 30 | + |
| 31 | +To change a prompt to use Google Gemini, set its corresponding model setting, e.g: |
| 32 | + |
| 33 | +- `global.global.model` → `google/gemini-2.0-flash` |
| 34 | + |
| 35 | +## Anthropic (Claude) |
| 36 | + |
| 37 | +<warning id="claude-server-only"> |
| 38 | + At this moment Claude can only work serverside. Setting either "modai.api.execute_on_server" or "modai.api.claude.execute_on_server" to "true". |
| 39 | +</warning> |
| 40 | + |
| 41 | +- Service name: anthropic |
| 42 | +- Supported modes: |
| 43 | + - **text generation** - [](https://docs.anthropic.com/en/docs/about-claude/models) |
| 44 | + - **image to text** - [](https://docs.anthropic.com/en/docs/about-claude/models) |
| 45 | + |
| 46 | +Add a valid API key to the `modai.api.anthropic.key` to use Claude. |
| 47 | + |
| 48 | +To change a prompt to use Claude, set its corresponding model setting, e.g: |
| 49 | + |
| 50 | +- `global.global.model` → `anthropic/claude-3-5-haiku-latest` |
| 51 | + |
| 52 | +## OpenRouter.ai |
| 53 | + |
| 54 | +- Service name: openrouter |
| 55 | +- Supported modes: |
| 56 | + - **text generation** - [](https://openrouter.ai/models?fmt=cards&output_modalities=text) |
| 57 | + - **image to text** - [](https://openrouter.ai/models?fmt=cards&input_modalities=image) |
| 58 | + |
| 59 | +Add a valid API key to the `modai.api.openrouter.key` to use OpenRouter. |
| 60 | + |
| 61 | +To change a prompt to use OpenRouter, set its corresponding model setting, e.g: |
| 62 | + |
| 63 | +- `global.global.model` → `openrouter/meta-llama/llama-4-scout:free` |
| 64 | + |
| 65 | + |
| 66 | +## Custom Services/Models |
| 67 | + |
| 68 | +- Service name: custom |
| 69 | + |
| 70 | +Some services like [Open WebUI](https://docs.openwebui.com) provide a wrapper for multiple models. To use a custom model via these services you need to fill out the `modai.api.custom.url`, `modai.api.custom.key` and optionally the `modai.custom.compatibility`, which tells the model what API emulation to use (almost alway leave this as openai). |
| 71 | + |
| 72 | +To use the custom service, set the following fields: |
| 73 | + |
| 74 | +- `modai.api.custom.url` → `{your custom URL}` |
| 75 | +- `modai.api.custom.key` → `{your API key}` |
| 76 | + |
| 77 | +Then, you for each model you want to use, set the corresponding "model" field with the prefix "custom/" followed by the model name, e.g: |
| 78 | + |
| 79 | +- `modai.global.model` → `custom/llama3.1:8b` |
| 80 | + |
| 81 | +<seealso> |
| 82 | + <category ref="external"> |
| 83 | + <a href="https://platform.openai.com/docs/guides/">OpenAI Guides</a> |
| 84 | + <a href="https://ai.google.dev/gemini-api/docs/">Gemini Docs</a> |
| 85 | + <a href="https://docs.anthropic.com/en/docs/">Anthropic Docs</a> |
| 86 | + <a href="https://openrouter.ai/">OpenRouter Docs</a> |
| 87 | + <a href="https://docs.openwebui.com">Open WebUI Docs</a> |
| 88 | + </category> |
| 89 | +</seealso> |
0 commit comments