The AI World · Article 2

ChatGPT 101: from your first chat to the API

Its history, how it works, step-by-step setup, prompting that works, every major feature, and building with it in code.

By Mrinal Singh Raja22 min read

How to read this

Never used ChatGPT? Read the green sections and try each step as you go. Already a daily user? Skip to prompting, the feature tour and what happens under the hood. Developers: the last red sections are for you.

BeginnerIntermediateAdvanced

Imagine a helper who has read a huge slice of the internet, never gets tired of your questions, writes in any style you like, and is awake at 3 a.m. That is roughly what ChatGPT feels like. It is also a tool with sharp edges: it can be confidently wrong, and it only works as well as you ask.

This guide takes you from zero to confident. We start with what ChatGPT is and where it came from, walk through your very first conversation step by step, learn the handful of prompting habits that make the biggest difference, tour every major feature, and finish under the hood — tokens, context windows, tool calls — and in code with the OpenAI API.

01Beginner

What is ChatGPT?

ChatGPT is an AI assistant you talk to in plain language. You type (or say) what you want; it replies in writing, and it can also read files and images, search the web, create pictures, run code and hold a spoken conversation. It is made by the company OpenAI.

The name tells you what is inside. Chat is the conversation. GPT stands for Generative Pre-trained Transformer: generative because it creates new text, pre-trained because it first learned from an enormous amount of text before being tuned to be helpful, and Transformer because that is the type of neural network it runs on.

✓ Great at

  • Draftingemails, posts, cover letters, speeches
  • Explainingany topic, at any level, as many times as you like
  • Brainstormingnames, ideas, plans, angles you missed
  • Summarisinglong PDFs, meeting notes, articles
  • Codingwriting, explaining and fixing code
  • Translatingand adjusting tone between languages

⚠ Be careful with

  • Exact facts & figuresit can state wrong numbers confidently
  • Citationscheck every source it names really exists
  • Medical, legal, moneya starting point, never the final word
  • Private datadon’t paste passwords, IDs or secrets
  • Breaking newsunless it searches the web, its knowledge has a cut-off
  • Your own judgmentit proposes; you decide
Fig. 1Where ChatGPT shines, and where you need to stay in charge.
02Beginner

Where it came from

ChatGPT was not an overnight invention. It sits on top of years of work on ever-larger language models, and the big surprise of late 2022 was less a new model than a new interface: a simple chat box that anyone could use for free.

  1. Dec 2015

    OpenAI is founded

    A research lab set up to build advanced AI that benefits everyone.

  2. 2018–2020

    GPT-1 → GPT-2 → GPT-3

    Each “Generative Pre-trained Transformer” is far larger than the last. GPT-3 (2020) has 175 billion parameters and surprises everyone with fluent text.

  3. 30 Nov 2022

    ChatGPT launches

    A free chat window on top of a GPT-3.5 model, tuned with human feedback to follow instructions. It becomes one of the fastest-growing consumer apps ever.

  4. Feb–Mar 2023

    ChatGPT Plus and GPT-4

    A paid tier arrives, then GPT-4: much stronger reasoning, and able to read images.

  5. Nov 2023

    Custom GPTs

    Anyone can build a tailored version of ChatGPT with its own instructions and files — no code needed.

  6. May 2024

    GPT-4o

    “Omni”: one model for text, images and natural real-time voice conversation.

  7. Sep 2024

    Reasoning models (o1)

    Models trained to think step by step before answering, far better at maths, science and code.

  8. 2025

    Deep research, agents, GPT-5

    ChatGPT learns to research the web for many minutes, to act in a browser on your behalf, and in August gets GPT-5, which decides by itself when to think longer.

  9. 2026

    Newer model generations

    Models keep improving and plans keep changing. The skills in this article — clear asks, good context, checking answers — do not.

Fig. 2The road to ChatGPT and what followed. Only milestones are shown; there were many more releases in between.

The key ingredient that turned a raw text-predictor into a helpful assistant was reinforcement learning from human feedback (RLHF): people rated the model’s answers, and it was tuned towards the kind of replies they preferred. That is why ChatGPT follows instructions and stays on topic, where earlier models would simply ramble on.

03Intermediate

How it works, in five minutes

At its heart, the model does one thing: given some text, it predicts a likely next word (strictly, the next token — a word or word-piece). It picks one, adds it to the text, and repeats, which is why answers appear word by word. Everything clever it does emerges from doing that one thing extraordinarily well.

The part most people miss is what the model reads each time. It does not “remember” your conversation the way a person does. On every turn, the app sends the model one long document containing everything it needs, and the model reads it all again from the top.

Everything ChatGPT reads on each turn is one long document: system instructions, your custom instructions, saved memories, attached files and tool output, the conversation so far, and your new message, stacked into the context window and fed to the model, which writes the reply.the context window — re-read in full on every turnSystem instructionswritten by OpenAI: tone, safety rules, today’s dateYour custom instructions“I’m a teacher in Pune; keep answers short”Saved memoriesfacts it chose (or you asked it) to rememberFiles, search results, tool outputPDFs you attached, web pages it fetchedThe whole conversation so farevery earlier message, yours and itsYour new messagethe thing you just typed🧠the model💬replyno hidden memory of youbeyond what is in this stack
Fig. 3What the model sees on each turn. This is why a long, rambling chat can make answers worse, and why a fresh chat is sometimes the best fix.

Two consequences follow. First, context is everything: the model only knows about you what is in that stack, so the more relevant detail you give, the better it does. Second, there is a limit: the stack has a maximum size, called the context window. We will come back to both under the hood.

04Beginner

Getting started, step by step

  1. Open it

    chatgpt.com, or the official app for iPhone, Android, Mac or Windows

  2. Sign in

    optional to try; an account saves your chats

  3. Personalise

    tell it about you, once

  4. Ask

    a real task, in plain words

  5. Follow up

    refine until it’s right

Fig. 4From zero to your first useful answer in about five minutes.
  1. Open ChatGPT. Go to chatgpt.com in any browser, or install the official ChatGPT app by OpenAI from your app store. Beware of look-alike apps with similar names.
  2. Sign in (optional at first). You can try it without an account. Signing up — with email, Google, Microsoft or Apple — keeps your chat history and unlocks features such as file uploads, memory and Projects.
  3. Find your way around. The screen is simpler than it looks:
chatgpt.com — illustration
✎ New chat
Projects

📁 Thesis

📁 Trip to Goa

Recent

Explain inflation

Cover letter draft

Fix my SQL query

Weekly meal plan

ChatGPT · Auto ▾

What can I help with?

Ask anything…
Tools 🎙️
  1. New chat — start fresh when you change topic, so old context doesn’t confuse it.
  2. Chat history and Projects — past conversations, and folders that share files and instructions.
  3. Model picker — faster models for everyday asks, “thinking” models for hard problems.
  4. The message box — type here. Enter sends; Shift + Enter adds a new line.
  5. Attach — upload files, photos and screenshots for it to read.
  6. Tools — web search, image creation, deep research and more, depending on your plan.
  7. Voice — talk out loud and hear it answer.
Fig. 5An illustrated map of the ChatGPT window. The real layout shifts between updates and devices, but these seven parts are always somewhere.
  1. Tell it about yourself once. In Settings → Personalization, custom instructions let you say who you are and how you like answers. They are added to every new chat automatically, which saves repeating yourself.
Settings → Personalization — illustration

What should ChatGPT know about you?

I’m a second-year B.Com student in Guwahati. I’m preparing for CA Foundation. English is my second language — I think in Assamese and Hindi.

How should ChatGPT respond?

Simple English, short paragraphs. Use Indian examples and ₹. When I’m studying, quiz me before telling me the answer. Say “I’m not sure” rather than guessing.
Reference saved memories
Save
Fig. 6Illustration of custom instructions. Two short paragraphs here improve every future answer.
  1. Ask for something real. Not “hello” — an actual task you have today. Then reply to it. The magic of ChatGPT is in the follow-ups.
A conversation — illustration
write a leave application

Dear Sir/Madam, I am writing to request leave from [start date] to [end date] due to [reason]… (generic, full of blanks)

Make it for my manager Priya. I need 3 days, 12–14 March, for my sister’s wedding in Jaipur. I’ve finished the Q1 report and Arjun will cover client calls. Warm but professional, under 100 words.

Hi Priya,

I’d like to request leave from 12 to 14 March to attend my sister’s wedding in Jaipur. The Q1 report is complete, and Arjun has kindly agreed to cover client calls while I’m away…

Perfect. Now a two-line WhatsApp version for Arjun.

↑ each follow-up builds on everything above it

Fig. 7Illustration: a vague first ask, a better second ask, and a follow-up that reuses everything already said.
05Beginner

Your first ten prompts

Not sure what to ask? Copy one of these, change the details to your own life, and go.

Understand anything

Explain how UPI payments work as if I’m 12, then as if I’m a bank engineer.

Summarise

Summarise this article in 5 bullet points and tell me the one thing I should remember. [paste text]

Write for you

Draft a polite message to my landlord about a leaking tap. It’s the second time I’m asking.

Brainstorm

Give me 15 names for a home bakery in Shillong. Mix English and Khasi-inspired ideas.

Plan

I have 6 weeks until my exam and 2 hours a day. Make a study plan for these 5 chapters: …

Quiz me

Ask me 10 questions on the French Revolution, one at a time, and grade my answers.

Everyday life

I have eggs, onions, rice and spinach. Suggest 3 dinners under 30 minutes.

Code

Write a Python script that renames all photos in a folder by the date they were taken.

Translate & adapt

Translate this notice into Hindi and Bengali, keeping the tone friendly. [paste]

Get feedback

Here is my cover letter. Be a strict hiring manager: what are its three biggest weaknesses?

06Intermediate

Prompting that actually works

A prompt is simply what you type. There is no secret code to it, and you do not need special phrases. What separates great results from bland ones is how much of the picture you give. Brief it the way you would brief a smart new colleague who knows nothing about your situation.

A good brief has up to six ingredients:

Role
You are an experienced primary-school maths teacher.
Task
Create a 10-question quiz on fractions.
Context
My class is 9-year-olds; half find fractions scary.
Format
A table: question, answer, hint. Then an answer key.
Examples
Like this: “Pizza cut into 8, you eat 3 — what fraction is left?”
Limits
No decimals. Keep each question under 25 words.
Fig. 8The six ingredients of a strong prompt, with one worked example running through all six.

Playground

Build a prompt, ingredient by ingredient

Pick a starting example or start blank. Nothing you type leaves this page.

6/6 ingredients · 85 words

Your prompt
You are a patient chemistry tutor for Class 11 students.

Explain how ionic and covalent bonds differ, then quiz me with 5 questions one at a time.

I have an exam next week and I mix these two up. I learn best from everyday examples.

A short explanation (under 150 words), a comparison table, then the questions.

Everyday example style I like: “table salt is ionic, like two magnets snapping together.”

Don’t give the answer until I reply. Tell me if I’m wrong and why.

Not every prompt needs all six. A quick question needs only a task. But when an answer disappoints, the fix is almost always a missing ingredient — usually context.

Seven habits of power users

  1. Iterate, don’t restart. “Shorter”, “warmer”, “more like the second option”, “now as a table” — each follow-up builds on everything before.
  2. Let it interview you. End with: “Before you start, ask me any questions you need.” It will find the gaps in your brief for you.
  3. Show, don’t describe. Paste an example of the style you want. One real example beats a paragraph of adjectives.
  4. Ask for options. “Give me five subject lines” and pick, instead of arguing with one.
  5. Separate instructions from material. Put pasted text inside quotes or between lines like ---, and say “the text between the lines is my draft”.
  6. Ask it to critique itself. “What’s weak about your answer? Fix it.” often lifts quality noticeably.
  7. Say what to do, not only what to avoid. “Write in short, plain sentences” works better than “don’t be wordy”.
07Intermediate

The feature tour

Beyond typing, ChatGPT has grown a toolbox. Exactly which tools you get, and how often, depends on your plan and country — but here is what each one is for.

Files & data

Upload PDFs, spreadsheets, slides. It summarises, answers questions, and can run code to analyse data and draw charts.

Images in

Send a photo or screenshot: a maths problem, a menu, an error message, a plant.

Images out

Describe a picture, diagram or poster and it creates one; ask for changes in words.

Voice

A natural spoken conversation — practise a language, rehearse an interview, think out loud.

Web search

Fresh answers with links to sources, for news, prices, and anything recent.

Deep research

Reads many sources over several minutes and writes a cited report.

Canvas

A side-by-side editor for long documents and code, where you both edit.

Projects

Folders of chats that share files and instructions — one per course, client or trip.

Memory

Remembers useful facts across chats. You can view, edit or turn it off.

Custom GPTs

Your own tailored assistant with fixed instructions and files, shareable by link.

Agent

Uses its own browser to carry out multi-step tasks, and asks before anything important.

Tasks

Scheduled prompts: “every Monday at 8, give me three news items on solar energy”.

Fig. 9ChatGPT’s main capabilities. Availability and limits vary by plan and change over time.

Three features worth learning first

Files and data analysis. Drop in a PDF, a spreadsheet or a photo of a whiteboard and ask questions of it. With spreadsheets, ChatGPT writes and runs small programs behind the scenes to calculate and chart — ask it to “show the code you used” if you want to check its working.

Web search. The model’s built-in knowledge stops at its training cut-off. With search on, it looks things up and gives you links. Always open the one or two sources that matter; a link is only reassuring if it says what the answer claims.

Voice. Tap the voice button and simply talk. It is surprisingly good for language practice, rehearsing a tough conversation, or thinking aloud on a walk.

08Intermediate

Choosing a model and a plan

ChatGPT offers a few models at once. Broadly there are two kinds: fast models that answer in seconds and handle most everyday tasks, and thinking (reasoning) models that work through a problem privately before answering — slower, but much stronger on maths, logic, code and planning. Often an “Auto” setting chooses for you.

Decision chart: if the task needs several steps of logic, maths, code or planning, use a thinking model and expect a slower, better answer. If it needs fresh facts, turn on web search. Otherwise a fast model is fine.What are you asking?Everyday askdraft, rewrite, explain,brainstorm, translateHard problemmaths, code, strategy,many steps of logicNeeds fresh factsnews, prices, schedules,anything recent⚡ Fast modelanswers in seconds🧠 Thinking modelslower, far more careful🔎 Turn on searchand open the sources
Fig. 10A simple rule of thumb for choosing. When in doubt, start fast and switch up if the answer is shaky.

Plans at the time of writing run from Free through low-cost and standard paid tiers (Go, Plus) to Pro for heavy users, plus Business and Enterprise plans for organisations. Paid plans mainly buy you more powerful models, higher limits and access to the heavier tools. Start free; upgrade only when you keep hitting a limit that matters to you.

09Beginner

Staying safe and accurate

ChatGPT’s biggest weakness is that it can hallucinate: produce fluent, confident, wrong answers — invented statistics, quotes, book titles, even court cases. It is not lying; it is producing what sounds right. The fix is a habit, not a setting.

A checking routine. If an answer matters, ask whether it contains facts, numbers or sources. If yes, verify them against the original source; if they check out, use the answer, otherwise correct it or ask again with better context. If the answer is low-stakes, use it.ChatGPTanswersDoes itmatter?noUse it ✓yesCheck facts,numbers, linksagainst the sourceHolds up ✓Wrong? Correctit, add context
Fig. 11The checking habit. The more an answer matters, the more of it you verify.

Privacy basics

  • Don’t paste secrets: passwords, bank or card details, Aadhaar or passport numbers, confidential client data.
  • Check Data Controls in settings. You can choose whether your chats help improve OpenAI’s models, and delete chats.
  • Use temporary chat for one-off sensitive questions: it doesn’t appear in history or use memory.
  • Review memory now and then (Settings → Personalization) and delete anything you’d rather it forgot.
  • At work, follow your organisation’s rules. Business and Enterprise plans have different data terms from personal accounts.
10Advanced

Under the hood

Tokens and the context window

Models read and write tokens, not words. English averages about three-quarters of a word per token; many other languages, including Hindi and Bengali, use more tokens for the same meaning. The context window is the maximum number of tokens the model can take in at once, and everything in Fig. 3 has to share it — including room for the reply.

  • system + instructions
  • memories
  • attached files
  • conversation history
  • new message
  • room for the reply

1 token

≈ ¾ of an English word

100 tokens

≈ 75 words

1,000 words

≈ 1,300 tokens

Fig. 12An illustrative context budget. When a conversation outgrows the window, the oldest material has to be summarised or dropped.

This explains a lot of odd behaviour. A very long chat may “forget” what you said at the start; a huge PDF may be searched in pieces rather than read whole. The practical fix: start fresh chats for new topics, and restate key facts when a conversation has run long.

Why the same question gets different answers

At every step the model produces a probability for each possible next token, then samples one. Some randomness (controlled by a setting called temperature) keeps writing varied and natural, but it means two identical prompts can take different paths. That is a feature for brainstorming and a reason to double-check facts.

How tools really work

The model cannot browse or run code by itself. Instead it has been trained to write a special tool call — a structured request like search("Shillong weather"). The app sees it, runs the tool, pastes the results into the context, and the model continues. Web search, file reading, image creation, data analysis and agent mode all work on this same loop.

How tools work. The model reads your question and, instead of answering, writes a tool call such as a web search with a query. The app runs the tool and pastes the results back into the context. The model reads them and writes the final answer with sources.You ask“Is it rainingin Shillong now?”Model writesa tool call:search: Shillong rainApp runs itfetches pages,adds them to contextModel answersfrom the results,with linksmay loop: search again, run code, open a file…the model never touches the internet itself — it asks the app to, in text
Fig. 13The tool loop behind search, data analysis and agents. The model decides when to call a tool; the app does the calling.

Memory is just more context

“Memory” sounds mysterious but is simple: short notes about you are stored and quietly added to the context of future chats. Nothing about the model itself changes. That is why you can view and edit memories as plain sentences, and why turning memory off makes ChatGPT forget you instantly.

11Advanced

Custom GPTs and Projects

Once you catch yourself pasting the same instructions again and again, it is time to package them. Projects group related chats with shared files and instructions — one for your thesis, one for a client. Custom GPTs go further: a named assistant with its own instructions, knowledge files and tools that you can reuse and share with a link, all built by describing what you want. No code required.

  • Instructions

    Who it is, what it does, how it answers, what it refuses.

  • Knowledge

    Files it can search: syllabus, price list, style guide, FAQ.

  • Capabilities

    Switch on web search, image creation, code and data analysis.

  • Actions

    Optional: call your own API, e.g. check order status.

  • Conversation starters

    Buttons that show people what to ask first.

“Exam Buddy”

A Class 10 science tutor that quizzes you from your own textbook chapters and never just gives the answer away.

shareable by link

Fig. 14What goes into a custom GPT. The instructions matter most; knowledge files keep it grounded in your material.
12Advanced

Building with the API

The ChatGPT app is one product built on OpenAI’s models. Developers can use the same models directly through the OpenAI API to build their own apps, chatbots and automations. It is a different product with different billing.

💬 ChatGPT app⚙️ OpenAI API
Who it’s forAnyone, in a browser or appDevelopers building their own products
How you payFree or a monthly planPer token used, billed to your API account
InterfaceReady-made chat windowHTTP requests from your code
Memory & historyKept for youYou store and resend it yourself
InstructionsCustom instructions, Projects, GPTsYour own system prompt, every call
OutputChat text, files, imagesText, or strict JSON matching your schema
Fig. 15The app and the API side by side. Many people use both.

Your first API call

Create an API key in the OpenAI developer platform, store it as an environment variable called OPENAI_API_KEY, install the SDK with pip install openai, and run:

first_call.py — Python
from openai import OpenAI

client = OpenAI()  # reads your OPENAI_API_KEY environment variable

response = client.responses.create(
    model="gpt-6-astra",  # a current model; see the docs for the live list
    instructions="You are a friendly personal-finance tutor for beginners in India.",
    input="Explain compound interest with a ₹10,000 example over 5 years at 7%.",
)

print(response.output_text)
$ python first_call.py
Compound interest means you earn interest on your interest. Put ₹10,000 away at 7% a year: after year 1 you have ₹10,700; after 5 years, about ₹14,026…
(sample output — yours will differ)
Fig. 16A first call using the Responses API in Python. The model name is the one OpenAI’s quickstart uses at the time of writing; check the docs for the current list.

instructions plays the role of the system prompt; input is the user’s message. The API does not keep your conversation for you by default in the way the app does, so a chatbot either sends the earlier turns back each time or uses the API’s own conversation-state options.

Getting data back, not prose

For software, free text is awkward to use. Structured Outputs make the model reply with JSON that is guaranteed to match a schema you define — perfect for sorting feedback, extracting fields from invoices, or routing support tickets.

classify.py — Python
response = client.responses.create(
    model="gpt-6-astra",
    input="Sort this feedback: 'Delivery was late but the cake was amazing.'",
    text={
        "format": {
            "type": "json_schema",
            "name": "feedback",
            "strict": True,
            "schema": {
                "type": "object",
                "properties": {
                    "sentiment": {"type": "string", "enum": ["positive", "negative", "mixed"]},
                    "topics": {"type": "array", "items": {"type": "string"}},
                },
                "required": ["sentiment", "topics"],
                "additionalProperties": False,
            },
        }
    },
)

print(response.output_text)
# {"sentiment": "mixed", "topics": ["delivery", "product quality"]}
Fig. 17Structured Outputs: the reply must match the JSON Schema, so your code can rely on its shape. Sample output shown in the final comment.

From here the path leads to function calling (the model asks your code to run a function, exactly like the tool loop in Fig. 13), retrieval over your own documents, and agents that chain many calls together. Three rules keep you out of trouble:

  • Keep your API key secret. Only ever call the API from a server, never from code that runs in a visitor’s browser or a mobile app bundle.
  • Watch costs. You pay per token in and out; set a monthly budget limit in your account settings before you experiment.
  • Test with real examples. Collect twenty or so realistic inputs, check the outputs, and re-run them whenever you change the prompt or model.
13Beginner

Common mistakes, and the fix

MistakeDo this instead
Treating it like Google (“best phone”)Give it your situation: budget, what you use a phone for, what you hated about the last one.
Accepting the first answerReply. “Shorter.” “More formal.” “Give me three options.” The second answer is usually much better.
One endless chat for everythingStart a new chat per topic, or use Projects. Old, unrelated context muddles new answers.
Trusting numbers and citations blindlyAsk for sources, turn on search, and check anything that matters.
Pasting passwords, ID numbers, client secretsRemove or mask them. Use temporary chat for sensitive-but-necessary work.
Asking it to “be creative” with no directionGive examples of what you like, and what you don’t.
Using a fast model for a hard maths or logic problemSwitch to a thinking model and give it time.
Letting it write your graded workUse it as a tutor: explanations, practice questions, feedback on your own draft.
14Beginner

Your 30-day plan

Skill with ChatGPT comes from use, not reading. Here is a month of small, practical steps. Tick them off as you go.

  1. Week 1 · Habit

    • One real task a day: an email, a recipe, an explanation
    • Always ask one follow-up
    • Set your custom instructions
  2. Week 2 · Craft

    • Use all six prompt ingredients
    • Upload a PDF and interrogate it
    • Try voice for 10 minutes
  3. Week 3 · Tools

    • Make a Project for one area of life
    • Use search and open three sources
    • Analyse a spreadsheet and make a chart
  4. Week 4 · Build

    • Build one custom GPT you’ll actually reuse
    • Try a thinking model on a hard problem
    • Developers: make your first API call
Fig. 18Four weeks from first chat to your own custom GPT — and, for developers, your first API call.

Quick quiz

Tap a question to check your answer.

Q1ChatGPT gives you a statistic with a source. What should you do before putting it in a report?

Open the source and confirm it says what ChatGPT claims. Models can invent or misattribute figures and citations.

Q2Your long chat seems to have forgotten a detail from the start. Why, and what helps?

The conversation may have outgrown the context window, so early parts were summarised or dropped. Restate the key facts, or start a fresh chat with a short summary.

Q3Which one ingredient most often fixes a disappointing answer?

Context: who it’s for, your situation, and what you have already tried. The model only knows what is in the conversation.

Q4Why must an API key never be placed in a website’s front-end code?

Anyone can read code that runs in the browser, copy the key, and run up charges on your account. Call the API only from a server.

That is ChatGPT from the first click to the first line of code. The best next step is the simplest: open it now and ask it for help with something you actually need to do today. 🚀

ChatGPT and GPT are products of OpenAI; this article is independent and not affiliated with or endorsed by OpenAI. Interface screens are illustrations, and sample outputs are examples. API code follows OpenAI’s developer documentation as of September 2026. Spotted something out of date? Tell us.