Skip to main content

Generative AI

Kvery integrates OpenAI models so you can write and understand SQL faster. You can ask the assistant to draft a query from a plain-language request, explain an existing query, or generate a description for it — all from inside the editor.

Bring your own key

The AI features use your own OpenAI API key. You add it once on your profile (see OpenAI key); Kvery then calls OpenAI on your behalf and the usage is billed to your OpenAI account. Without a key, the AI features are unavailable.

Available models

Kvery exposes three OpenAI models, each suited to a different need:

Name in KveryModelBest forOpenAI price (USD / 1M tokens)
o3 (SQL PRO)o3Hardest SQL, deep reasoninginput $10 · output $40
GPT-5 mini (FAST)gpt-5-miniQuick everyday help, low costinput $0.40 · output $1.60
GPT-5gpt-5High-quality general SQLinput $10 · output $40

Pick GPT-5 mini for fast, inexpensive iterations and o3 when a query is genuinely complex. Pricing shown is OpenAI's per-million-token rate and may change on OpenAI's side.

What the assistant can do

  • Generate SQL from a natural-language description of what you want.
  • Explain an existing query so you understand it before running it.
  • Generate a description for a query to keep your workspace documented.

How the conversation is bounded

To keep requests efficient and predictable, Kvery caps each AI interaction:

  • Up to 3,000 completion tokens per chat response (1,500 for a generated description).
  • The conversation history forwarded to OpenAI is limited to 20 user/assistant turn pairs and 50,000 characters in total.

These limits keep responses fast and your OpenAI costs in check; longer back-and-forths simply forget the oldest turns.

Tips

  • Give the assistant context — table and column names, what you're trying to achieve — for better SQL.
  • Always review generated SQL before running it, especially write statements.
  • Use drafts to test AI-generated changes safely before publishing.