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. 1

    Open /chat

    No account required. Meet AI Support Copilot.

  2. 2

    Upload any file

    PDF, text, Markdown, JSON, CSV, or HTML in the sidebar (max 5 files, 5 MB each).

  3. 3

    Ask a question

    Chat naturally — pick a suggested prompt or type your own. Answers stream with source chips.

  4. 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. 1

    Open /chat

    No account required.

  2. 2

    Upload any file

    Text/JSON/MD parse in-browser; PDF uses POST /api/demo/parse (stateless, not stored).

  3. 3

    Ask anything

    Suggested prompts come from your file title and headings.

  4. 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
Open /chat →

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.
Open /usage →

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.

ModelTypeInput · 1M tokensOutput · 1M tokensTotal · 1M tokens
USDINRUSDINRUSDINR
gpt-4o-mini· defaultChat$0.15₹13.50$0.60₹54.00$0.75₹67.50
gpt-4.1-miniChat$0.40₹36.00$1.60₹144.00$2.00₹180.00
gpt-4.1-nanoChat$0.10₹9.00$0.40₹36.00$0.50₹45.00
gpt-5-miniChat$0.25₹22.50$2.00₹180.00$2.25₹202.50
gpt-4.1Chat$2.00₹180.00$8.00₹720.00$10.00₹900.00
gpt-4oChat$2.50₹225.00$10.00₹900.00$12.50₹1,125.00
gpt-5Chat$1.25₹112.50$10.00₹900.00$11.25₹1,012.50
o4-miniReasoning$1.10₹99.00$4.40₹396.00$5.50₹495.00
o3-miniReasoning$1.10₹99.00$4.40₹396.00$5.50₹495.00
text-embedding-3-small· defaultEmbedding$0.02₹1.80$0.02₹1.80
text-embedding-3-largeEmbedding$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.

Usage dashboard →
Example costs & configuration
ActionUSDINR
One chat question$0.0012₹0.11
Embed one upload (~10 pages)$0.0004₹0.04
100 questions / day$0.12₹11.01
Env variableDefaultPurpose
OPENAI_API_KEYRequired — OpenAI API authentication
OPENAI_CHAT_MODELgpt-4o-miniChat and planning
OPENAI_EMBEDDING_MODELtext-embedding-3-smallDocument & query embeddings
USD_TO_INR90INR conversion in Usage dashboard
How RAG worksOptional

Optional technical overview of the retrieval pipeline.

+
  1. 1

    Chunk & embed

    Your file is split into paragraph chunks; embedded with text-embedding-3-small per request.

  2. 2

    Hybrid retrieve

    Vector similarity (60%) + BM25 keywords (40%), then optional reranking.

  3. 3

    Guardrail & generate

    Low-confidence matches refused. Matched chunks ground gpt-4o-mini with streaming SSE.

  4. 4

    Local observability

    Token budget enforced server-side; detailed usage entries in IndexedDB; no user accounts.