BrowserCSV
Ask AI · Bring your own key

Ask questions about your sheet, using an AI provider you choose.

Ask AI is a chat panel in the editor. You connect it to any OpenAI-compatible API with your own key, and it answers by running read-only SQL on the sheet you have open. BrowserCSV has no AI service of its own, so there is no account to create and nothing to pay us.

How it works

  1. Step 1

    Open the panel

    Open a file, then click Ask AI in the toolbar or pick “Ask AI About This Sheet” from the command palette (Ctrl+K).

  2. Step 2

    Connect your provider

    Enter a base URL, an API key, and a model name, then save. The settings form opens by itself the first time, and the gear icon brings it back.

  3. Step 3

    Ask a question

    Type a question about the sheet in plain language, or start from one of the suggestions. Each sheet keeps its own conversation.

  4. Step 4

    Get a computed answer

    The model writes SQL, BrowserCSV runs it on your data with DuckDB in the browser, and the model turns the results into an answer or a chart.

The three settings

Base URLhttps://api.openai.com/v1
The root of an OpenAI-compatible API. BrowserCSV sends requests to /chat/completions under this address.
API keysk-…
Sent as a Bearer token to the base URL. Leave it blank for a server that needs no key, such as a model running on your own machine.
Modelgpt-4o-mini
Any model your provider offers that supports tool calling (also called function calling).

The values shown are the defaults. A blank base URL or model falls back to them when you save.

Example base URLs

  • OpenAI
    https://api.openai.com/v1
  • OpenRouter
    https://openrouter.ai/api/v1
  • Ollama (local)
    http://localhost:11434/v1
  • LM Studio (local)
    http://localhost:1234/v1

Any service that speaks the OpenAI chat completions format should work, as long as it allows requests from the browser.

What is sent, and what stays with you

Sent to your provider
  • The sheet name, its row count, and every column name and type
  • The first 5 rows of the sheet, as a sample
  • Your questions and the conversation so far for that sheet
  • The results of the queries the model runs: at most 200 rows per query, with long text cells shortened
Stays in your browser
  • The file itself. It is never uploaded; only the items listed on the left are sent.
  • Your API key, saved in this browser's local storage and sent only to the base URL you entered
  • Your conversations, held in memory and gone when you reload the page or press Reset
  • Every request, which goes straight from your browser to your provider with no BrowserCSV server in between

Query results can contain any value in the sheet, so treat Ask AI as sharing that data with the provider you configured. If the sheet holds something that provider should not see, use a model running on your own machine or leave the panel closed. Nothing is sent until you ask a question.

Built so you can check its work

Read-only by construction

Every query the model writes runs as a subquery of a SELECT, so DuckDB rejects anything that would insert, update, delete, or alter a table. Ask AI cannot change your sheet.

Nothing is hidden

Each answer shows a “Ran SQL” line for every query behind it. Expand it to read the exact SQL and see how many rows came back.

Numbers come from your data

The model is told to compute rather than guess, and charts are drawn from the query results themselves, not from values the model types out.

Bounded work per question

One question can trigger at most 8 rounds of queries, and you can press Stop at any time to cancel a request in progress.

Cost and your key

Usage is billed by your provider to the key you enter. One question usually means several requests, since each query the model runs is a round trip.

The key sits in this browser's local storage, where anyone using this browser profile can reach it. Prefer a key made just for this, with a spending limit, and clear it from the settings form on a shared computer.

If something goes wrong
“Could not reach the API”
Check the base URL. The provider also has to accept requests made directly from a web page (CORS). Local servers usually need this site's address added to their allowed origins.
An authentication or quota error
The message comes from your provider. Check that the key is valid, has access to the model you named, and has credit or quota left.
The model answers without running any SQL, or errors on tools
Pick a model that supports tool calling. Small local models often do not.
“Stopped after too many query steps”
The model used all 8 rounds without finishing. Ask a narrower question, or press Reset and try again.

Try it on your own data

Open a file in the editor, click Ask AI, and paste in your key.

Open the editor