Example Setup

This guide walks you through a concrete setup of the AI Assistant using OpenRouter as the AI provider.

OpenRouter is used here as the example because it is the quickest way to get started:

  • Free models available — several capable models require no payment at all.
  • No credit card required to use the free tier.
  • Single endpoint for hundreds of models from different providers (Meta, Google, Mistral, DeepSeek, and more) — switch models by changing one field.
  • Easy sign-up via Google, GitHub, or e-mail.

Once you are familiar with the setup, you can switch to any other supported provider (Anthropic, OpenAI-compatible, or Ollama) in the same dialog.


Step 1 — Create an OpenRouter account

  1. Open openrouter.ai in your browser.
  2. Click Sign In and create a free account (Google, GitHub, or e-mail).

Step 2 — Generate an API key

  1. After logging in, go to Settings → API Keys (direct link: openrouter.ai/settings/keys).
  2. Click Create Key, give it a name (e.g. “Jailer”), and confirm.
  3. Copy the key that is shown — it starts with sk-or-. Store it safely; it will not be shown again.

Step 3 — Configure Jailer

  1. Open the AI Assistant dialog via Edit → AI Assistant, or via the AI Assistant button in the SQL Console toolbar (Data Browser).
  2. At the bottom of the dialog, set Provider to OpenRouter.
    The API URL is filled in automatically: https://openrouter.ai/api/v1/chat/completions
  3. Paste your API key into the API Key field.
  4. Enter the Model identifier (see table below).

Step 4 — Choose a model

OpenRouter uses the format provider/model-name. The following models are available free of charge (no credits required):

Model identifier Notes
meta-llama/llama-3.1-8b-instruct Fast, good SQL quality.
meta-llama/llama-3.3-70b-instruct Larger Llama 3.3 variant — higher quality, slightly slower.
mistralai/mistral-7b-instruct Mistral 7B — compact and capable for standard queries.
google/gemma-3-27b-it Google Gemma 3 27B — strong reasoning, good for complex schemas. Default model.
deepseek/deepseek-r1 DeepSeek R1 — best SQL quality, large context window. Slower than the models above. Recommended when result quality matters.

The full list of available (including free) models is at openrouter.ai/models.


Note: Free models are a convenient way to get started, but they are usually subject to usage limits (rate limits, daily request caps, lower response priority).
Paid models often deliver significantly better results — in SQL quality, reasoning accuracy, and handling of complex schemas.
If you already have a paid subscription with another provider (e.g. Anthropic or OpenAI), it is recommended to use that instead.


Tip: If a model returns an error about context length, enable Smart Table Selection in the settings (see the AI Assistant page) or try a model with a larger context window.