A small web app for sending one prompt to several AI models at once and comparing the answers side by side.
Supported providers:
| Provider | API key variable | Default model | Get a key |
|---|---|---|---|
| OpenAI | OPENAI_API_KEY |
gpt-6-astra |
https://platform.openai.com/api-keys |
| Claude (Anthropic) | ANTHROPIC_API_KEY |
claude-opus-5-5 |
https://console.anthropic.com/settings/keys |
| Meta | META_API_KEY |
muse-spark-1.3 |
https://dev.meta.ai/ |
| Gemini (Google) | GEMINI_API_KEY |
gemini-4-argon |
https://aistudio.google.com/apikey |
| Grok (xAI) | XAI_API_KEY |
grok-4.7 |
https://console.x.ai/ |
| DeepSeek | DEEPSEEK_API_KEY |
deepseek-v4-pro |
https://platform.deepseek.com/api_keys |
| Perplexity | PERPLEXITY_API_KEY |
perplexity/sonar |
https://console.perplexity.ai/ |
| Kimi (Moonshot AI) | KIMI_API_KEY |
kimi-k3.1-pro |
https://platform.kimi.ai/console/api-keys |
You only need keys for the providers you want to use. Providers without a key are shown but greyed out.
Requires Node.js 20.12 or newer (22.13 or newer if you turn on billing, which uses Node's built-in SQLite). There are no npm dependencies to install. Requires Node.js 22.13 or newer.
git clone https://github.com/juporter/Default-AI.git
cd Default-AI
npm install # one dependency: pdf.js, for reading PDF attachments
npm startEverything except PDF attachments also works without npm install.
Open http://127.0.0.1:3000. Add your API keys in Settings → Import settings (or copy .env.example to .env and fill it in), tick the models you want, type a prompt and press Send (or Ctrl+Enter).
- Pick any mix of eight providers. Your selection is remembered in the browser.
- Choose the model per provider. Each dropdown is loaded live from that provider's model list, so new models show up without changing the code. If a list can't be loaded, suggested models are shown instead. Choose Other model ID… to type any ID.
- Attach files. Add text files (code, Markdown, CSV, JSON, logs and so on), PDFs and Word (.docx) files with Attach files or by dropping them on the prompt. Their text is sent to every selected model with your prompt. PDFs and Word files can be up to 20 MB; the text from all attachments together can be up to 2 MB. Scanned PDFs (pictures of pages, with no text layer), password-protected PDFs, old
.docfiles and images aren't supported. - Optional system prompt, sent to every selected model.
- Answers stream in word by word. Each card shows the elapsed time, token counts and cost, and warns when an answer was cut off. Reasoning models show Thinking… until they start to answer. Cancel stops every model and keeps the text that arrived.
- Ask follow-up questions. Under each set of answers, Ask all models a follow-up sends your next question to the same models. Each one sees its own earlier answers (and any attached files), so you can keep comparing as the conversation goes on.
- See what each answer cost. Each card shows its cost, worked out from the token counts the provider reports and the list prices in
pricing.json, and each conversation shows its total. A cost is marked as estimated when the provider didn't report token counts, and then the tokens are estimated from the length of the text. Models with no price listed show no cost. With billing on, cards show what the user was charged instead. - Perplexity searches the web. Its answers come with a numbered list of sources.
- Formatted or raw output. Markdown (code blocks, tables and lists) is rendered safely. Toggle Raw to see the original text, or use Copy.
-
Every prompt is saved, with each model's answers, any follow-up questions and attached files. History is stored in your browser, so it stays after you close the page.
-
Search prompts, follow-ups and answers, and filter by where they came from.
-
Continue conversation reopens a saved conversation in Compare so you can ask more follow-ups.
-
Use this prompt puts an old prompt (and its files) back in the composer so you can send it to other models.
-
Import chats from other apps:
From What to upload ChatGPT Settings → Data controls → Export data. Upload the .zip you receive, or the conversations.jsoninside it.Claude Settings → Privacy → Export data. Upload the .zip, or the conversations.jsoninside it.Gemini Google Takeout → My Activity → Gemini Apps, with the format set to JSON. Upload the .zip, or MyActivity.json.Anything else A JSON list of chats: [{"title": "…", "messages": [{"role": "user", "content": "…"}, …]}] -
Export history saves everything (your conversations and imported chats) to one JSON file. Import that file to restore it later or on another computer. Files exported by older versions still import.
-
Delete shown removes whatever matches the current search and source filter.
- See which providers are ready and where to get each key.
- Import settings from a
.envfile or a JSON file such as{"OPENAI_API_KEY": "sk-…"}, or paste them in. You see a preview first, with keys masked, then Save settings writes them to the app's.envfile. They take effect right away, with no restart. - Settings can only be changed from the computer that runs the app.
The page has two ad spaces, one under the header and one at the bottom. They stay hidden until you configure them.
| Variable | Purpose |
|---|---|
ADSENSE_CLIENT |
Your AdSense publisher ID, e.g. ca-pub-1234567890123456. Turns AdSense on. |
ADSENSE_SLOT_TOP / ADSENSE_SLOT_BOTTOM |
The ad unit ID for each space (AdSense → Ads → By ad unit → Display ads). Leave both empty to let AdSense Auto ads place ads for you. |
ADS_PLACEHOLDER |
true shows empty, labelled boxes where the ads will go, so you can check the layout before AdSense is set up. |
With ADSENSE_CLIENT set, the app also serves /ads.txt for you, and it switches to the nonce-based Content Security Policy that Google requires for AdSense.
Before you rely on ads, note:
- AdSense only shows ads on a public website that Google has reviewed and approved. On
127.0.0.1the spaces load but stay empty. To earn from ads you need to host the app on your own domain and add that site in your AdSense account. - Hosting the app publicly means visitors use your API keys. Every prompt anyone sends is billed to your accounts with OpenAI, Anthropic and the rest. Before going public, turn on billing so users pay for their usage, and set spending caps with each provider.
- To host it, see DEPLOY.md for a step-by-step guide to Fly.io (about $4 a month, HTTPS included). On another host, set
HOST=0.0.0.0and run it behind an HTTPS reverse proxy. Settings import stays limited to the server itself.
If you host the app for other people, billing lets them pay for what they use instead of spending your API credit. It is off until you set STRIPE_SECRET_KEY. When it's on:
- Visitors need an account (email and password) to send prompts. The Account tab shows their balance, every answer's tokens and cost, and the price list.
- Credit is prepaid. Users top up with Add $5 / $10 / $25 on Stripe Checkout. Prompts are refused once the balance reaches zero.
- Each answer is charged from the token counts the provider reports:
(input tokens × input price + output tokens × output price) × (1 + markup). If a provider doesn't report tokens, they are estimated at 4 characters per token and marked as estimated. - Only priced models can be used. Prices live in
pricing.json, in US dollars per million tokens. It ships with the providers' list prices as of November 2026, with sources noted in the file. Where a provider has cheaper off-peak, promotional or short-prompt rates, the file uses the higher standard rate. Providers change prices, so check it now and then.
| Variable | Purpose |
|---|---|
STRIPE_SECRET_KEY |
Your Stripe secret key (sk_test_… while testing). Turns billing on. |
STRIPE_WEBHOOK_SECRET |
Signing secret of a webhook endpoint at https://your-site/api/billing/webhook listening for checkout.session.completed and checkout.session.async_payment_succeeded. Optional: payments are also credited when the user returns from Checkout, but the webhook covers users who close the tab. |
BILLING_MARKUP_PERCENT |
Added on top of provider prices (default 20). |
BILLING_TOPUP_AMOUNTS |
Top-up amounts in dollars (default 5,10,25). |
PUBLIC_URL |
Your site's address, for Stripe's return links and password reset emails. Defaults to the address the browser used. |
ADMIN_EMAILS |
Accounts that get the Admin tab, separated by commas, e.g. you@example.com. |
RESEND_API_KEY / EMAIL_FROM |
Sends password reset emails through Resend. EMAIL_FROM is the sender, e.g. Default AI <billing@yourdomain.com>, on a domain you've verified in Resend. Without these, reset links are printed in the server's console instead. |
Forgot password? on the sign-in form emails a reset link that works once, for an hour. Using it signs the account out everywhere else. The page gives the same answer whether or not an account exists, so it can't be used to find out who has one.
Admin (for ADMIN_EMAILS) lists every account with its balance, what it has paid and spent, and how many answers it has had. Open an account to see its payments and usage, add or take away credit with a reason the user sees, or refund part or all of a card payment. Refunds go back to the card through Stripe, and the refunded amount comes off the user's balance.
Accounts, balances, payments and usage are kept in a SQLite database, data/billing.db (set BILLING_DATA_FILE to put it elsewhere). It's created the first time billing is used. Passwords are hashed with scrypt, and session and reset tokens are stored hashed. If you used an earlier version, data/billing.json is imported automatically on first start and renamed to billing.json.imported.
Back up the database: it is the record of what users have paid for. While the app is running, run npm run backup-db (it writes a dated copy next to the database), or stop the app and copy data/billing.db. Node prints a one-time "SQLite is an experimental feature" warning at startup; that's expected.
A user who sends to several models at once can go slightly below zero, because every answer in that batch is charged after it arrives. The next prompt is then refused until they top up.
Streamed answers are charged when they finish. If the user cancels, or the stream breaks off, the text that had arrived is charged, with its tokens estimated, because the provider bills for it too. Follow-up questions are charged like any prompt; each one includes the earlier conversation, so a long conversation costs more per question. Gemini's "thinking" tokens are counted as output tokens, as Google bills them.
browser ──► server.js ──► OpenAI / Anthropic / Meta / Google / xAI / DeepSeek / Perplexity / Moonshot
server.js serves the page and forwards each prompt to the provider's API. Your API keys stay in .env on the server and are never sent to the browser. The browser makes one request per selected provider, so a slow model never holds up the others.
providers.jsdescribes each provider and converts between the app's format and each API. OpenAI, Meta, Grok, DeepSeek and Kimi use the OpenAI Chat Completions format. Claude uses the Anthropic Messages API. Gemini usesgenerateContent. Perplexity uses its Agent API with web search turned on.settings.jsreads, checks and saves imported settings files, and holds the ad settings.billing.jsholds pricing, passwords, the Stripe calls and email (plainfetch, no SDKs).billing-store.jskeeps accounts, balances and usage in SQLite.billing.jsholds accounts, pricing, charges and the Stripe calls (plainfetch, no Stripe SDK).extract.jstakes the text out of PDF and Word attachments: PDFs with Mozilla's pdf.js (pdfjs-dist, with font code evaluation turned off), Word files with the app's own .zip reader (public/zip.js).- Answers stream from each provider as server-sent events, and the server passes them to the browser as newline-delimited JSON (
POST /api/chatwith"stream": true). Follow-up questions send the whole conversation in each API's own format. public/runs.jsholds a conversation (the first prompt, its follow-ups and every model's answers) and draws it in Compare and History.public/holds the UI: plain HTML, CSS and JavaScript with no build step.public/importers.jsreads chat exports (including .zip files) in the browser, andpublic/store.jskeeps History in the browser's IndexedDB.
Everything goes in .env, either edited by hand or through Settings → Import settings. See .env.example for the full list. Values in .env take precedence over variables already set in your shell.
| Variable | Purpose |
|---|---|
<PROVIDER>_API_KEY |
A provider's API key (Kimi also accepts MOONSHOT_API_KEY) |
<PROVIDER>_MODEL |
Change a provider's default model, e.g. OPENAI_MODEL=gpt-6-luna |
<PROVIDER>_BASE_URL |
Send a provider's requests to a compatible endpoint, such as a proxy or gateway |
MAX_TOKENS |
Output limit for Claude, which requires one (default 4096) |
REQUEST_TIMEOUT_MS |
How long to wait for each provider (default 120000) |
HOST / PORT |
Where the app listens (default 127.0.0.1:3000) |
ADSENSE_*, ADS_PLACEHOLDER |
Ads, see above |
STRIPE_*, BILLING_*, PUBLIC_URL |
Billing, see above |
CLIENT_IP_HEADER |
Behind a proxy, the header holding the visitor's real address, for the login attempt limit (e.g. fly-client-ip on Fly.io). Leave unset without a proxy. |
<PROVIDER> is one of OPENAI, ANTHROPIC, META, GEMINI, XAI, DEEPSEEK, PERPLEXITY or KIMI.
Meta's developer API (https://api.meta.ai/v1) serves Meta's current Muse models. To use Llama models, point the Meta slot at any OpenAI-compatible host that serves them, for example:
META_API_KEY=your-key-for-that-host
META_BASE_URL=https://api.groq.com/openai/v1 # or https://api.together.xyz/v1, etc.
META_MODEL=<that host's Llama model ID>Once the key is set, the model dropdown lists that host's models.
- The server listens on
127.0.0.1only, so only your computer can reach it. Anyone who can reach the port can spend your API credits, so think carefully before changingHOST. - Requests must be JSON, and the server checks the
Hostheader. This stops other websites you visit from using the app in the background. - Settings import only accepts requests from the computer running the app, only writes the variables listed above (never
HOSTorPORT), and rejects values that could break the.envfile. Keys are shown masked. - Model output and imported chats are HTML-escaped before they are displayed, and links are only created for
http(s)URLs.
npm testThe tests check the request and response conversion for every provider (including each one's streaming format and follow-up conversations), the chat-export importers (including real .zip files), text extraction from real PDF and Word files in test/fixtures/, settings import, the Markdown renderer's escaping, cost estimates, billing (pricing maths, Stripe signatures, sign-up → top-up → charge, charges for streamed and cut-off answers, password reset, and admin credits and refunds, through the server against a fake Stripe and email service), and the whole server. The server tests run against fake providers, so no API keys are needed.