AI Support Copilot
Product guide
Upload any file and chat with AI — grounded answers with source citations.
Overview
AI Support Copilot lets you upload any supported file and chat with AI about it — like ChatGPT, but every answer is grounded in your upload. Hybrid vector + keyword search finds the right passages; the model streams cited replies. No account required.
- Chat at /chat — upload a file, ask anything, get cited answers.
- Supports PDF, text, Markdown, JSON, CSV, and HTML.
- 100K token free-trial budget (enforced server-side per device/network).
- Files in sessionStorage; usage history in IndexedDB at /usage.
Quick start
- 1
Open /chat
No account required. Meet AI Support Copilot.
- 2
Upload any file
PDF, text, Markdown, JSON, CSV, or HTML in the sidebar (max 5 files, 5 MB each).
- 3
Ask a question
Chat naturally — pick a suggested prompt or type your own. Answers stream with source chips.
- 4
Check /usage
See estimated OpenAI spend from your sessions — stored in IndexedDB.
Chat (/chat)
Upload any file and chat with AI Support Copilot. The experience feels like ChatGPT, but retrieval runs over your upload only — answers include source citations from your file.
- 1
Open /chat
No account required.
- 2
Upload any file
Text/JSON/MD parse in-browser; PDF uses POST /api/demo/parse (stateless, not stored).
- 3
Ask anything
Suggested prompts come from your file title and headings.
- 4
Watch your token budget
Sidebar meter tracks usage (100K max — enforced on the server, not reset by clearing browser data).
- 5 files per session · 5 MB each · PDF, text, MD, JSON, CSV, HTML
- 100K OpenAI tokens per device/network (server-enforced)
- Documents in sessionStorage — not saved to any database
Usage dashboard
The usage dashboard reads from IndexedDB in your browser. Each chat session records input/output tokens and estimated USD/INR cost using published model rates.
- Token budget is tracked server-side — clearing browser data does not reset it.
- Filter by 7, 30, or 90 days.
- Breakdown by endpoint and model; daily series for the last 14 days.
API routes
AI Support Copilot runs on Next.js. These API routes power chat and PDF parsing:
POST /api/chat
Streams chat via SSE. Receives your question and uploaded file chunks. Enforces 100K token budget server-side (cookie + IP). Calls OpenAI for embeddings + chat.
POST /api/demo/parse
Extracts text from a PDF upload. Stateless — file content is not stored on the server.
Server env: OPENAI_API_KEY (required), OPENAI_CHAT_MODEL, OPENAI_EMBEDDING_MODEL, USD_TO_INR.
FAQ
How is this different from ChatGPT?+
ChatGPT answers from its general training. AI Support Copilot only answers from files you upload — every reply is grounded in your document with a source citation.
What files can I upload?+
PDF, plain text, Markdown, JSON, HTML, and CSV — up to 5 MB each, 5 files per session.
Do I need an account?+
No. Upload a file and start chatting. Documents, token budget, and usage all stay in your browser.
Is my data stored on a server?+
Upload text stays in sessionStorage. PDFs are parsed via a stateless API call and not persisted. Only OpenAI receives the question and retrieved chunks for each chat request.
What happens when I hit the token limit?+
Chat is disabled after 100K tokens. The limit is enforced on the server (tied to your device cookie and network), so clearing browser data will not reset it.
Can the AI hallucinate?+
It answers from retrieved chunks of your file only. Low-confidence queries are declined instead of guessed.
OpenAI model pricing
Published rates per model for 1M tokens: input, output, and combined total (input + output). USD and INR (₹) shown for each. Live usage is tracked in your Usage dashboard.
INR at ₹90/USD · Cost = (input tokens ÷ 1M × input rate) + (output tokens ÷ 1M × output rate). Total column = input + output at 1M each.
| Model | Type | Input · 1M tokens | Output · 1M tokens | Total · 1M tokens | |||
|---|---|---|---|---|---|---|---|
| USD | INR | USD | INR | USD | INR | ||
| gpt-4o-mini· default | Chat | $0.15 | ₹13.50 | $0.60 | ₹54.00 | $0.75 | ₹67.50 |
| gpt-4.1-mini | Chat | $0.40 | ₹36.00 | $1.60 | ₹144.00 | $2.00 | ₹180.00 |
| gpt-4.1-nano | Chat | $0.10 | ₹9.00 | $0.40 | ₹36.00 | $0.50 | ₹45.00 |
| gpt-5-mini | Chat | $0.25 | ₹22.50 | $2.00 | ₹180.00 | $2.25 | ₹202.50 |
| gpt-4.1 | Chat | $2.00 | ₹180.00 | $8.00 | ₹720.00 | $10.00 | ₹900.00 |
| gpt-4o | Chat | $2.50 | ₹225.00 | $10.00 | ₹900.00 | $12.50 | ₹1,125.00 |
| gpt-5 | Chat | $1.25 | ₹112.50 | $10.00 | ₹900.00 | $11.25 | ₹1,012.50 |
| o4-mini | Reasoning | $1.10 | ₹99.00 | $4.40 | ₹396.00 | $5.50 | ₹495.00 |
| o3-mini | Reasoning | $1.10 | ₹99.00 | $4.40 | ₹396.00 | $5.50 | ₹495.00 |
| text-embedding-3-small· default | Embedding | $0.02 | ₹1.80 | — | — | $0.02 | ₹1.80 |
| text-embedding-3-large | Embedding | $0.13 | ₹11.70 | — | — | $0.13 | ₹11.70 |
Total = input + output at 1M tokens each. Embedding models are input-only (output —). Reasoning models may bill extra hidden tokens. Defaults: gpt-4o-mini, text-embedding-3-small.
Example costs & configuration
| Action | USD | INR |
|---|---|---|
| One chat question | $0.0012 | ₹0.11 |
| Embed one upload (~10 pages) | $0.0004 | ₹0.04 |
| 100 questions / day | $0.12 | ₹11.01 |
| Env variable | Default | Purpose |
|---|---|---|
| OPENAI_API_KEY | — | Required — OpenAI API authentication |
| OPENAI_CHAT_MODEL | gpt-4o-mini | Chat and planning |
| OPENAI_EMBEDDING_MODEL | text-embedding-3-small | Document & query embeddings |
| USD_TO_INR | 90 | INR conversion in Usage dashboard |
How RAG worksOptionalOptional technical overview of the retrieval pipeline.
+
- 1
Chunk & embed
Your file is split into paragraph chunks; embedded with text-embedding-3-small per request.
- 2
Hybrid retrieve
Vector similarity (60%) + BM25 keywords (40%), then optional reranking.
- 3
Guardrail & generate
Low-confidence matches refused. Matched chunks ground gpt-4o-mini with streaming SSE.
- 4
Local observability
Token budget enforced server-side; detailed usage entries in IndexedDB; no user accounts.