30-second summary
An API is a way for two programs to talk: you send a request to a specific address, the service sends back a response.
The API key is a billing password. Keep it out of any code you share, out of chats, and out of any repository.
Data travels as JSON: name-value pairs between curly braces. If you can read a list of settings, you can read JSON.
The status number tells you how it went: 200 all good, 400 your request is wrong, 401 the key is bad, 429 you’re going too fast, 500 the problem is on the other side.
With AI models you pay as you go, based on the tokens you send and receive, and every service caps how many requests you can make per minute.
So far you’ve used AI through a chat: type, press enter, read. This lesson
is for people who want to do the same from a program but have never worked
with APIs. You don’t need to write code to follow it. It gives you the
vocabulary for the rest of the module.
An API Application Programming Interface: the set of requests a service accepts from other programs, with the responses it returns.
is the door a service opens so other programs can use it. It works like a
restaurant menu: you don’t walk into the kitchen, you pick a dish from the
list, order in the expected format, and what you ordered arrives. If you ask
for a dish that isn’t on the menu, the waiter tells you.
The mechanism is always the same: a request (what you want and with
what data) and a response (what comes back). When you type into an AI
chat, the site does exactly this with the model behind the scenes. With the
API, you write the request yourself.
The endpoint The exact web address you send a request to, one for each operation the service offers.
is the address you send the request to. Each operation has its own, like
each dish has its own line on the menu. For example, to get a Claude model
to answer, the address is:
https://api.anthropic.com/v1/messages
In practice you’ll almost always use an official library that builds the
address for you, as you’ll see in
From chats to APIs . Knowing it
exists helps you read the documentation and the error messages.
The service needs to know who you are and who to bill. It does that with an
API key : a long string you send along with every request.
The key is a secret
Whoever has your key can use the service as you, and the bill comes to you.
Don’t paste it into code you share, a screenshot, a chat with an AI, or a
public repository. Keep it in an environment variable, and if you think it
reached someone else, revoke it from the service’s dashboard and create a
new one.
Requests and responses almost always travel as
JSON JavaScript Object Notation: a text format for data, made of name-value pairs between curly braces and lists between square brackets. .
It’s text with a simple structure. A request to a model, stripped to the
bone, can look like this:
"model" : " claude-sonnet-5-5 " ,
{ "role" : " user " , "content" : " What time is it in Tokyo if it's 9 in Rome? " }
Curly braces wrap an object, a set of name-value pairs. Square brackets wrap
a list, here a list of messages. Quotation marks mean a value is text,
numbers go without. The response has the same shape, with the text the
model generated inside.
Every response comes with a number that sums up the outcome. You don’t need
to learn them all, these are enough:
200 : it worked, the response holds what you wanted.
400 : the request is wrong, for example a field is missing or the JSON is broken. Fix the request, resending it unchanged won’t help.
401 : the key is missing or invalid. Check that you passed it and that it’s the right one.
429 : you made too many requests in a short time. Wait a few seconds and retry.
500 (and similar): the problem is on the service’s side. Try again in a bit.
When something fails, the number is the first clue: it tells you whether the
error is yours (codes starting with 4) or the service’s (starting with 5).
Two concepts you’ll meet right away with AI models.
A rate limit The maximum number of requests, or tokens, the service accepts from you in a time window, usually a minute.
is the cap on requests you can make in a time window. If you go over it you
get a 429. It protects the service, and it usually goes up as you use and
pay more.
Billing is per token , not per request. A token is a small piece of
text, roughly a syllable or a short word, and you pay for both the ones you
send and the ones you receive. A long request costs more than a short one,
even if it’s a single call. You’ll see how tokens work in
Context in tokens .
Check-in with your AIFour questions to lock in the basics 5-7 min of check-in
Paste the text into your AI. It will ask you four progressive questions about the lesson, one at a time, and give you feedback.
Press "Copy the text" and paste it into your favourite AI (Claude , ChatGPT , Gemini , or another). Or download the file and give it to your AI as an attachment.
Now you have the vocabulary. The next step is the first real call to a
model, in Python and TypeScript: that’s the topic of
From chats to APIs .
AI-Guide
A free, bilingual (English and Italian) manual that teaches non-technical readers how to use conversational AI well, from the very first question through everyday productivity, work scenarios, and advanced topics. Audience: parents, teachers, professionals, students. Not engineers.
The canonical site is https://ai-guide.larosa.work. English is the default locale (`/en/`); every page is mirrored in Italian at the same path under `/it/`. URL slugs are identical across languages so any English URL below can be translated by replacing `/en/` with `/it/`.
Start here
Start here : Pick the path that fits your level. Get to where you need to go in the fastest way.Fundamentals
But what is AI? : Let's demystify the words "artificial intelligence". What it really is, what it isn't, why everyone is talking about it now.What is a prompt? : The word "prompt" explained without fluff. It's what you write to the AI to get an answer, and how you write it matters more than you'd think.Your first conversation : Open an AI and put what you've read into practice. No theory: a guided exercise for your first conversation.How does the AI "understand"? : A look behind the scenes. The AI doesn't really understand: it guesses the next word, one at a time. But it guesses so well that sometimes it feels like magic.When to trust it (and when not) : The AI is wrong with the same confidence as when it's right. Learning to recognize the cases and to verify is the difference between using it well and getting fooled.What you share when you use AI : What actually happens to your messages after you send them to ChatGPT or Claude? Who sees them, what stays, what you can control. And what you should never put in.Everyday use
Ask well : Four levers that make the difference between a vague answer and a useful one when you ask the AI.Photos, images, and files : Uploading a utility bill, a screenshot, a PDF. Modern AIs can see, and you can use that to read the world around you.Iterate the conversation : The first answer is rarely the right one. The move isn't rewriting from scratch, it's keeping the chat going.Learn something new : The AI as a personal tutor. Techniques to actually understand, not just get a reply.Summarize a long document : PDFs, articles, reports, books. How to ask for a summary that's actually useful, and how to know if you can trust it.Understanding something complicated : Bills, contracts, medical reports, regulations. The AI is an excellent translator of bureaucratese, if you use it well.Things NOT to do : AI helps with almost everything. But there are cases where delegating the decision is a bad idea, even when the answer looks right.Write better : The AI as editor on your draft, not as ghostwriter. Three patterns to use it without losing your voice.At work
AI as a thinking partner : Stress-test an idea before you propose it, anticipate objections, brainstorm with method. Without an explicit constraint AI confirms everything: the value comes from forcing it into discomfort.Company data and privacy : Whatever you paste into a public AI can leave your company. Three risk levels (red, yellow, green), what changes with Enterprise or Team plans, the NDA gut check, and what to do if your company has no policy yet.Working with data and tables : Cleaning messy data, Excel or Sheets formulas you can't remember, small analyses on extracts. AI is the right copilot for one-offs, but company data is still company data.Drafting professional documents : Proposals, briefs, reports. AI as a structured first draft, not as a ghostwriter who writes the whole thing.Hard emails : Saying no, responding to someone who messed up, giving delicate feedback. Where the wrong word costs.Preparing a meeting : Structured agenda, preparation brief, actionable extract, follow-up. AI works before and after; the meeting stays the human moment.Research for work : Mapping a new territory, synthesizing multiple sources, doing live research with citations. AI speeds you up a lot and hallucinates a lot, and method is what separates a solid deliverable from an embarrassing one.Reuse context with projects : Claude Projects, ChatGPT Projects, Gemini Gems (becoming skills): same mechanism, different names. You load once the context that recurs (who you are, what you do, how you write, reference files) and reuse it across every chat in that thread, instead of starting from scratch every time.Slides and presentations : Outline from a document, tight bullets, speaker notes. AI helps with content, not design; the default produces text-heavy slides, and that's the risk to neutralize.By profession
The bookings and cleaning calendar : A Google Sheets (or Excel) sheet with one row per booking, the nights calculation, a check for overlaps in the same room and the day's cleaning list. ChatGPT writes and explains the formulas, you paste them.Guest messages, in any language : From the pre-arrival message to a reply to a review that complains about noise, with ChatGPT translating and you checking facts, codes and promises.The house guide from a template : You turn your scattered notes (Wi-Fi, heating, rubbish sorting, parking, pharmacy) into a tidy welcome guide, with a fixed template and a simple way to keep it up to date.Set up ChatGPT for your B&B : You put your house facts, times and tone into ChatGPT once, and you decide what must never end up in the chat, starting with guests' documents.By profession : Chapters for specific jobs, built on the tasks you repeat every week, with the steps on the tool that job really uses.Claude Code on your notes folder : Thirty years of notes scattered in one folder per client become a handover document, with Claude Code reading the files in a copy, proposing a plan and writing only new files.Job reports and explaining it to the client : From notes scribbled after a job to a job report in a fixed format and an email in plain words for the client. The AI drafts, you check every line.Set up Claude, on your terms : You create a Claude Project with the rules of a technician who doesn't trust confident answers, decide what to upload and what never, and learn to clean a log before pasting it.When the AI doesn't know your machine : With a rare phone system the AI doesn't know how it works and tends to invent. How to ask for hypotheses instead of answers, and how to recognize a menu or a password that doesn't exist.The manual from the cabinet : You upload the scan of an old manual and ask questions of that document, with page number and exact quotation, then check on paper. And you build a quick sheet from it.Replying to citizens : From a citizen's request to a clear, courteous and correct reply, in plain language, with no personal data in the prompt.Fixing a letter and checking the facts : How to have Copilot revise a letter you already wrote (clarity, tone, errors) and how to check everything the AI may have invented, especially laws and articles.Minutes and circulars : From notes or a meeting transcript to minutes in the office format, and from a decision to an internal circular, checking that nothing was added that was never said.What you can do with Copilot, and what you can't : How to tell which Copilot your office has, what protects your data and what doesn't, what the law says about AI in public administration, and how to keep recurring instructions.Replying to customers and suppliers : A reply to a customer with a broken jar in the parcel and a quote request to a supplier, in four parts and in your own tone, without promises you cannot keep.Product descriptions and posts from your notes : From four lines of notes to a product card with a fixed template and an Instagram post, without Gemini inventing properties, certifications or health effects.Set up Gemini for your shop : You save your shop's instructions (products, tone, what never to promise) in Gemini once, as a skill or as a text to paste, and set the rule on customer data.The stock sheet : A Google Sheets file with quantity, reorder threshold and a formula that flags "Reorder", then a filter to see what to order and a supplier email written by Gemini from the filtered rows.The checked itinerary : Build an itinerary with Claude and have it checked against holidays, museum closures, connections and season. With the list of what Claude does not know, and where to verify it.The payment register in Excel : Claude designs the Excel sheet for deposits, balances and due dates, with the formulas and late-payment highlighting explained step by step. Then it helps when a formula breaks and with the monthly summary.The personalised quote : From your notes on a client to a quote in your agency's template, ready for Word. How to ask for variants and how to make Claude say what is missing instead of inventing it.Set up Claude for your agency : You create a Claude Project with the right instructions for a travel agency, upload three files and set the rule on client data. You do it once, then use it for quotes, itineraries and payments.Your work assistant : How to create a Project with the instructions for your job, step by step in Claude, in general terms in ChatGPT, and with an instructions document in Copilot. What to write, which files to upload, how to update it.For students
Ethics of studying : Eight lessons in, the question that closes the module: where does AI's help end and copying begin? The answer is a method of judgement.Notes from lectures and long texts : Audio transcription, slides, chapters, your own notes. How to compose course material into a study-ready form.Revise before an exam : Simulated oral exams, written tests with corrections, mind maps and flashcards. AI as a simulated professor that generates the pressure of the test.Sources and citations : The bibliography is where AI does the most damage in academic work. Telling a made-up citation from a real one is a skill you can learn.Study a new topic : Formal study against a fixed syllabus. AI as a tutor that stays within your textbook's frame, not one that drifts off.Translating and comparing texts : Translation is where AI looks perfect and can instead be sneaky. Use it as a study aid for the language, not as a translator you paste from.When AI tricks you : You're studying a topic for the first time, and the AI answers with confidence. How to notice it's wrong precisely when you can't know.Writing a thesis : A thesis isn't something you delegate. AI as a second reader that helps you build a months-long project without writing it for you.For teachers
Design a lesson : AI as a prep colleague, not a classroom replacement. Outline, critique of the outline, materials anchored to it. Three steps that give you time back.Differentiated materials by level : Same topic, three difficulty levels. The one-base-text, three-derivatives pattern keeps the fast and the slow students on board without the content drifting apart.Emails to families : Delicate emails to parents, from low grades to meeting requests. AI compresses the time, not the sensitivity. Three registers, a three-step pattern, reinforced privacy for minors.Ethics of teaching : Three axes of responsibility that stay yours when you use AI to teach: honesty about how you use it, the privacy of minors' data, and the grade you sign. The AI prepares, you answer for it.Explain in five different ways : The same idea presented in five different representations. Used in prep, but it earns its keep in class when the standard explanation doesn't land.Generate assessment questions : Building assessment questions with AI, from open-ended to multiple choice to problem-solving. The value is in the choice and the calibration of the distractors, not the volume.Grading with criteria : AI as a grading assistant, not a judge. Your rubric, a first pass on a sample, the teacher's check, the decision and the signature always yours.Inclusive materials (SEN) : Adapting materials for students with special educational needs isn't about making an easier version, it's about making it accessible. Where AI speeds things up and where the work stays with whoever knows the student.When students use AI : AI detectors are not proof. Three moves that work better: read the signals as hypotheses, redesign assignments so they hold up, talk to the student without accusing on a hunch.Going deeper
Agents : A model calling tools in a loop until the goal is met: how an agent works, when it's actually worth it, what can go wrong, and which limits to put on it.Choose the model : There's no best model, only the right one for your constraint. The main families and the criteria that matter, beyond this month's leaderboard.Context and tokens : What a token is and what the context window is: how much text fits in one call, what fills it, and what to do when it isn't enough.Costs and prompt caching : Where the cost of a model call comes from and how to reduce it: a smaller model, shorter context, batch processing and prompt caching.Evals: knowing whether it works : How to test an LLM-based feature: a small set of real cases, automatic checks and a judge, and a before/after comparison on every change.From chats to APIs : What changes when you call the model from your own code instead of the chat, a real first call in Python and TypeScript, and when the API is actually worth it.MCP and integrations : The Model Context Protocol: an open standard for connecting models and applications to tools and data, why it beats hand-built integrations, and how far to trust a server.A mini end-to-end project : Build, step by step, a small assistant that answers from your documents, with sources, defenses, evaluation and caching, putting together what you saw in the module.Privacy and data in APIs : What changes for your data when you move from chat to the API: commercial terms, minimizing personal data, GDPR basics, logs and secret keys.Prompt injection and safety : Instructions hidden in the data the model reads: direct and indirect injection, the risks once tools are involved, the defenses that work, and why there's no complete fix today.RAG: your own documents : Retrieving the right pieces from your documents and passing them into the prompt: what RAG is, how retrieval works, and when you actually need it instead of cramming everything into the context.System prompts and roles : The system prompt is the standing instruction you pass separately from the messages: the three roles, why to separate instructions from data, and why it isn't a security wall.Tool use and structured output : How to let the model act on the world and how to get data back in a fixed format your code can use, instead of free prose.What an API is, in five minutes : Request and response, endpoint, API key, JSON, status codes, rate limits and token billing: the minimum to know about APIs before you use a model from your own code.Reference
Glossary : The technical words you meet in the lessons, explained in two sentences. With a button to ask your AI to go deeper.About : AI-Guide is written by Fabrizio La Rosa. Here's what I do, where I come from, and why I decided to write this manual.Translations
The same manual is available in Italian at https://ai-guide.larosa.work/it/. Every English page has an Italian counterpart at the same path; replace `/en/` with `/it/` in any URL above to get the Italian version.
Optional
Sitemap : every public URL on the site.Privacy : what is and is not collected about readers.