Custom Endpoints
Add custom AI providers like OpenRouter, Ollama, and Anthropic-compatible gateways to IntelliAsk using intelliask.yaml
IntelliAsk supports OpenAI API-compatible services as custom endpoints. It also supports Anthropic-compatible custom endpoints with provider: "anthropic". In the stack deployment you configure endpoints in config/intelliask.yaml and store API keys in config/.env (referenced with ${VAR_NAME} syntax).
Which File Does What?
Custom endpoint setup involves two configuration files:
config/intelliask.yaml-- Defines your custom endpoints (name, API URL, models, display settings). It is already mounted into the IntelliAsk container byintelliask.compose.yml.config/.env-- Stores sensitive values like API keys (referenced fromintelliask.yamlusing${VAR_NAME}syntax).
For a full overview of how configuration is organised, see Configuration & secrets.
Before You Start
This guide assumes you have a provisioned IntelliAsk stack running. If not, complete Installation first.
Step 1. Open the mounted config
The stack already mounts config/intelliask.yaml into the container, so there's nothing extra to wire up — just edit that file on the host.
Here is an example with OpenRouter, Ollama, and an Anthropic-compatible gateway:
Browse all compatible providers in the AI Endpoints section. For the full field reference, see Custom Endpoint Object Structure.
Anthropic-Compatible Endpoints
Use provider: "anthropic" only for endpoints that speak the native Anthropic Messages API. For OpenAI-compatible gateways that merely expose Anthropic models, omit provider and use the regular OpenAI-compatible custom endpoint shape.
API Key Configuration
When configuring API keys in custom endpoints, you have three options:
- Environment variable (recommended):
apiKey: '${OPENROUTER_KEY}'reads one shared key from.env, so the key needs a matching entry in Step 3. - User provided:
apiKey: 'user_provided'asks each user for their own key in the IntelliAsk UI instead of reading one from.env. No.enventry is needed for the key itself. IntelliAsk stores each user's key encrypted and prompts for it the first time they select the endpoint. - Direct value (not recommended):
apiKey: 'sk-your-actual-key'hardcodes the key inintelliask.yamlin plain text.
baseURL accepts user_provided in the same way, which lets each user point the endpoint at their own gateway.
The example above deliberately mixes styles: OpenRouter and the Anthropic-compatible gateway use option 1, while Ollama passes the literal string 'ollama' because a local Ollama server ignores the key entirely.
Step 3. Set Environment Variables
This step covers every ${VARIABLE_NAME} reference in your intelliask.yaml, whether it sits in apiKey, baseURL, or a headers value. If nothing you added uses that form, skip to Step 4.
Add each variable your intelliask.yaml references to config/.env. The example above references two:
Every ${VARIABLE_NAME} in intelliask.yaml needs a matching entry. A missing one does not drop the endpoint: it still appears in the selector, and the problem only surfaces once someone sends a message through it. An unresolved apiKey fails with Missing API Key for <endpoint>, and an unresolved baseURL with Missing Base URL for <endpoint>. An unresolved headers value behaves differently: it is sent upstream as the literal text ${VARIABLE_NAME}, so the failure comes back from the provider rather than from IntelliAsk.
Step 4. Restart and Verify
After editing the config or .env, restart IntelliAsk for changes to take effect:
Open IntelliAsk in your browser. Your custom endpoints should appear in the endpoint selector dropdown.
Not Seeing Your Endpoint? An Incomplete Block Is Dropped Silently
Start with the server logs:
But do not stop there. IntelliAsk keeps a custom endpoint only if name, baseURL, apiKey, and models are all present. An entry missing any of them is removed from the endpoint list with no error and no log line at all: the provider simply never appears, and the logs look clean.
A models block is different: models.default must list at least one model even when fetch: true is set. An empty or missing default is a validation error that stops startup.
So when an endpoint is missing, check the block itself before hunting through logs:
- Is every one of
name,baseURL,apiKey,modelsspelled correctly? A single typo drops the whole entry. - Does
models.defaultlist at least one model (required even withfetch: true)? - Is the block indented inside the
endpoints.customlist, rather than at the top level? - Is the
nameunique? A second endpoint with the same name (case-insensitively) silently replaces the first.
Compare your block against the Custom Endpoint Object Structure reference.
Also note that a schema error anywhere in intelliask.yaml stops the server rather than disabling one section, so one bad block elsewhere can take every custom endpoint down with it. Validate syntax with the YAML Validator, which checks YAML syntax only, not IntelliAsk's schema.
OpenRouter Still Does Not Show Up
For OpenRouter specifically, verify the chain:
config/.envhasOPENROUTER_KEY=...intelliask.yamlhasapiKey: "${OPENROUTER_KEY}"under the OpenRouter custom endpoint
Then restart with:
If the endpoint appears but returns 402 Payment Required, the request reached OpenRouter successfully and the issue is usually account credits, billing, or model availability on OpenRouter.
Next Steps
Last updated on