You tap “Translate” in a messaging app, and a moment later the reply appears in another language. It looks as if the app did the thinking, but in the setup this guide maps, the text comes from an AI model on a provider’s computers, delivered through a short chain of parts that each have one job. Knowing those parts makes provider documentation easier to read and shows you where your key, your users’ data and your costs actually sit.
In short: the front end is the screen people use. It hands the request to the app’s own back end, a server the app’s builder controls, which holds the API key (a secret code that identifies the builder’s requests to the provider [1]) and the logic, decides what to send and checks what comes back. The back end calls the provider’s API at a specific endpoint, the web address for one function, and the provider runs the model named in that request. Around this chain you may also meet optional parts: an SDK that packages the calls, a database or document store, logs, a gateway between your server and one or more providers, or a cloud platform that offers several companies’ models under one account.
This guide describes each part and what it is responsible for; the next guide traces one request from prompt to response. If the term “AI API” is new, start with what an AI API is and how apps use one, and if you’re still weighing whether this involves programming, see whether you need to code to use an AI API.
TL;DR
- Four main parts do the work: the front end people see, the app’s own back end, the provider’s API endpoint, and the model.
- The key stays on the server. OpenAI and Google both tell developers not to place API keys in browser or mobile app code and to send calls through a server instead [2, 1, 3].
- The model is a setting, not a fixture. The app names a model in each request, and providers retire older models over time [4, 5].
- Optional parts add convenience or control, not intelligence. An SDK wraps the same API, a document store supplies your own content, and a gateway can add logging, caching and limits [6, 7, 8].
- Cloud platforms are another route. Amazon Bedrock, Microsoft Foundry and Google’s Gemini Enterprise Agent Platform host several companies’ models, with features and terms that can differ from the model maker’s own [9, 10, 11, 12].
The Parts at a Glance
This table is BuildAIQ’s editorial map for beginners, not an industry standard; teams draw these boundaries in slightly different places.
| Part | Where it runs | Main job |
|---|---|---|
| Front end | The user’s browser or phone | Collects input and shows the result [13] |
| Back end | A server the app’s builder controls | Holds the key and logic, stores data, sends requests, checks replies [13, 1] |
| Provider’s API and endpoint | The provider’s servers | Accepts requests at a documented address and checks the key [2, 4] |
| Model | The provider’s (or a cloud platform’s) servers | Generates output for the model named in the request [4] |
| Optional parts | Back-end code, your systems, a gateway or a cloud platform | Package calls, store documents, keep records, add controls or offer many models [6, 7, 8, 9] |
The Front End: What People See and Touch
MDN, Mozilla’s web documentation, describes code running in the browser as client-side code mainly concerned with how a page looks and behaves [13]. In an AI feature, that’s the text box, the button and the area where the answer appears. A phone app’s screens play the same role.
When someone clicks a button or submits a form, the browser sends an HTTP request, the web’s standard message, to a server [13]. In the setup OpenAI’s and Google’s key-safety pages recommend, that server is the developer’s own back end, not the AI provider [1, 3]. The front end shouldn’t hold the key; the exceptions, such as a provider-run proxy, are covered under optional parts below.
The Back End: The App’s Own Server
Server-side code, in MDN’s description, validates submitted data and requests, stores and retrieves data in databases, and sends the right data back to the client [13]. For an AI feature, the back end is the coordinator:
- It keeps the API key. OpenAI warns that a key placed in a browser or mobile app can be taken by malicious users to make requests on the owner’s behalf, and Google says keys compiled into client-side code can be extracted, so both point developers to a server that makes the calls [1, 3]; what an API key is and why you should protect it explains the rest.
- It holds the rules. Which model to use, the standing instructions sent with each request (see what a system prompt controls) and what user input is accepted all live here, out of the user’s reach.
- It remembers, if anything does. OpenAI documents each text request as independent and stateless; to continue a conversation, the earlier messages are sent again with the new one [14]. Any memory a user notices is kept by the app, for example in its own database, or by a provider feature the app chose to use, such as OpenAI’s Conversations API [14].
- It checks the reply before anything reaches the screen, and decides what to show if something went wrong.
Because the back end decides how often and how much it sends, it also shapes the bill; how AI API pricing works covers that side. You don’t have to write this server yourself: a no-code tool’s AI step can take on much of its role, as connecting an AI API to a no-code tool shows.
The Provider’s API and Its Endpoint
MDN describes an API as the features and rules a program exposes so that other software, rather than a person, can work with it [15]. An AI provider’s API is that kind of rulebook: it says how your back end may send input to a model and get output back. An endpoint is the specific address for one function of that API, a bit like one service window in a large office.
Providers name their main endpoints differently. When their reference pages were read on Nov 22, 2026 [2, 4, 12]:
- OpenAI pointed developers to its Responses API for direct model requests [2].
- Anthropic listed its Messages API, reached by sending a POST request to the path /v1/messages, for conversational requests to its Claude models [12].
- Google told developers to start new projects with its Interactions API, which it calls the default endpoint for text, multimodal prompts, tools and agents [4].
These are examples, not a ranking, and the names change. Requests travel over HTTPS, the encrypted version of the web’s protocol, and carry the key in a header, a labeled line of information sent with the message; Google’s reference, for example, names an x-goog-api-key header [4]. Copy exact addresses from the provider’s current documentation. What goes inside a request and what comes back is the subject of what happens during an AI API request.
The Model
The model is the part that generates the answer. In the setup this guide maps, it runs on the provider’s computers, not inside your app, and your back end chooses it by name in every request; Google’s sample request body puts a model field right next to the user’s input [4].
Illustrative only, with placeholders; each provider uses its own field names:
{"model": "MODEL_NAME", "input": "USER_REQUEST_TEXT"}
The reply comes back as structured data holding the generated text plus other details, a shape the next guide describes. Because the model’s name lives in your back end, switching models can be a configuration change rather than a rebuild, though the new model still needs testing: OpenAI warns that prompting and model behavior change between snapshots (fixed model versions) and recommends pinned versions plus evaluations run for your own application [2]. Google’s Firebase documentation, for its own client-SDK design, describes using Remote Config or server prompt templates to change settings such as the model name without releasing a new version of the app [16].
Models don’t last forever. OpenAI’s deprecations page states that older models are retired on a regular basis and that software depending on them may need updating [5], and Microsoft says older models might be retired from its Foundry catalog as newer versions arrive [17]. Picking one is covered in how to choose an AI model for a simple application, and coping when one disappears in what to do when an AI API stops working. Whatever the model, a fluent answer can still be wrong; checking whether an AI answer is correct applies here too.
Optional Parts You May Meet
None of these is required for a basic AI feature, but you’ll meet them in documentation.
An SDK
An SDK (software development kit), also called a client library, is ready-made code that wraps the API for one programming language and calls the same API underneath. Mistral describes its SDK clients as interfaces to its API endpoints in a developer’s preferred language [6]. Anthropic says its SDKs handle authentication, request formatting and error handling, and lists built-in retries and streaming support among their benefits [12].
An SDK is a convenience, not a requirement: OpenAI’s reference says developers can install an official library or call the HTTP API directly from any environment that supports HTTP requests [2]. Its SDKs read the API key from the system environment automatically, so the key needn’t appear in the code [18]. SDKs change too; Google recommends its Google GenAI SDK for the Gemini API and says its older libraries were deprecated as of November 30, 2025 [19]. How to make your first AI API request puts one to use.
A Database or Document Store
A database can play two roles. The first is memory: a basic text request to OpenAI’s API, for example, stands alone, so stored conversations, kept in the app’s database or in a provider feature, are what let a chat continue where it left off [14]. The second is knowledge the model lacks, such as product manuals or a user’s own notes.
That second role is called retrieval-augmented generation, or RAG, which Microsoft describes as a pattern that grounds a model’s responses in your own content [7]. Microsoft also names two constraints: models accept limited input, so retrieval must return a few relevant, concise passages rather than whole collections, and users must only retrieve content they’re authorized to see [7].
The store can be yours or the provider’s. OpenAI, for example, offers a file search tool that lets models retrieve information from a knowledge base of files a developer has uploaded [20]. BuildAIQ’s existing guide What Makes an App AI-Powered?, in the Building AI Applications series, looks at how context and retrieval shape what the model says.
Logs
Logs record what happened: when a request went out, which model handled it, whether it succeeded. OpenAI recommends logging request IDs in production so problems can be traced with its support team [2].
Logs can also collect things that shouldn’t be there. OWASP’s Logging Cheat Sheet, a community security guide rather than a formal standard, says access tokens, passwords and sensitive personal data should usually be removed, masked, sanitized, hashed or encrypted instead of written to logs directly [21]. AI features handle whatever users type, so BuildAIQ’s editorial advice is to treat their logs as user data. The Building AI Applications guide on protecting user information goes deeper on privacy, and ongoing monitoring belongs to BuildAIQ’s AI Automation guides.
A Gateway or Proxy
A gateway is a layer between your back end and one or more model providers: your server talks to the gateway, and the gateway talks to the providers. Cloudflare says its AI Gateway adds analytics, logging, caching, rate limiting, request retries and model fallback for connected apps [8]. Microsoft describes the AI gateway in Azure API Management as capabilities for managing AI backends, including spreading traffic across several AI endpoints (load balancing) and logging AI interactions; its unified model API, in preview as of Nov 22, 2026, exposes several providers’ backends through one endpoint [22]. Both are examples, not recommendations; how request limits work is covered in what rate limits are in AI APIs.
Some providers run a proxy for you. Google’s Firebase AI Logic gives mobile and web apps client SDKs plus a proxy service that sits between the app and the Gemini API [16]. For apps using its Gemini Developer API option, Google says that proxy, with its App Check integration, keeps the Gemini API key on the server instead of embedding it in the app’s code [16]. The key-on-a-server rule still holds; the server just belongs to someone else.
Cloud Companies That Host Other Makers’ Models
Some teams reach models through a cloud company instead of signing up with each model maker. Three examples, each described by its owner on Nov 22, 2026 [9, 10, 23]:
- Amazon Bedrock is AWS’s managed service offering foundation models from providers including Amazon, Anthropic, DeepSeek, Moonshot AI, MiniMax, OpenAI and xAI [9].
- Microsoft Foundry, the current name for what Microsoft previously called Azure AI Studio and Azure AI Foundry, offers models from Microsoft, OpenAI, Anthropic, Meta and others [10].
- Gemini Enterprise Agent Platform is what Google launched on April 22, 2026 as the evolution of Vertex AI; its Model Garden library holds models from Google and its partners [24, 11, 23].
The same model reached this way may come with different features and terms. Anthropic says feature availability varies by platform and that cloud routes tie into the cloud provider’s billing and access controls [12], and Microsoft says models from providers other than Microsoft are subject to the terms supplied with them [17].
Who Does What in a “Plan My Trip” Button (Hypothetical)
Imagine a travel-notes app, invented for this example, that adds a “Plan my trip” button to turn a user’s saved notes about a destination into a day-by-day outline. Here is one reasonable way the parts could divide the work; it describes responsibilities, not test results.
| Part | Its job in this feature |
|---|---|
| Front end | Shows the button, the notes and the finished outline; sends the request to the app’s own server; holds no key |
| Back end | Confirms the user is signed in, gathers that user’s notes, adds the standing instructions, names the model, attaches the key and sends the request; checks the reply before passing it on |
| Database | Stores each user’s notes and earlier outlines, and returns only that user’s records |
| SDK (optional) | Lets the back-end code call the provider through a library instead of building each request by hand |
| Provider’s API endpoint | Receives the request at its documented address and checks the key |
| Model | Drafts the outline from the notes and instructions it was sent |
| Logs | Record the request ID, the time and whether the call worked, without the key or the full notes |
| Gateway (optional) | Could cache repeated requests or switch to a backup model if the first is unavailable |
The map also shows where to look when something breaks: a missing button is a front-end problem, a rejected key points to the key the back end sends (wrong, expired or revoked [2, 1]), and a vanished model is a change on the provider’s side.
What We Know, What We Don’t, and Where Experts Disagree
What We Know
- OpenAI and Google document the same rule: keep API keys out of browser and mobile app code and send calls through a server [2, 1, 3].
- OpenAI documents its text requests as stateless, which is why conversation memory has to live in the app or in a provider feature the app turns on [14].
What We Don’t Know
- There is no standard list of the “parts” of an AI feature; this guide’s map is an editorial synthesis, and others group the pieces differently.
- What each cloud platform’s catalog holds on a given day. Catalogs change often, so this guide names examples rather than counts.
- How long today’s names will last. Google folded Vertex AI into a new platform in April 2026, Microsoft has renamed its AI platform, and SDK names have changed too [11, 10, 19].
What Experts Disagree About
The provider documents behind this guide describe compatible designs rather than rival ones. They differ in vocabulary and in how much of the chain the provider offers to run for you: Google’s Firebase proxy can stand in for your own server, and OpenAI’s file search for your own document store [16, 20]. Those are choices for a builder, not a dispute among experts.
Practical Takeaways
- Sketch the map before you build or buy. Name the four main parts, then list any optional ones and why each is there.
- Ask where the key lives. If it’s the web page or the app people download, that conflicts with OpenAI’s and Google’s guidance [1, 3].
- Date what you read. Endpoint and SDK names in this guide were current on Nov 22, 2026 and may not stay that way [4, 19].
- Treat the model name as a setting you’ll change. Keep it in the back end and check the provider’s deprecation notices from time to time [5].
- Add optional parts for a reason. Each one brings new data to look after.
- On a cloud platform, check that platform’s own pages. Features, billing and terms can differ from going to the model maker directly [12, 17].
Sources
- Best practices for API key safety. OpenAI Help Center, accessed 2026-11-22.
- API Reference: Overview (OpenAI API). OpenAI, accessed 2026-11-22.
- Gemini API keys (Using Gemini API keys). Google (Google AI Studio / Gemini API documentation), accessed 2026-11-22.
- Gemini API reference. Google (Google AI Studio / Gemini API documentation), accessed 2026-11-22.
- Deprecations | OpenAI API. OpenAI, accessed 2026-11-22.
- SDKs | Mistral Docs. Mistral AI, accessed 2026-11-22.
- Retrieval-augmented Generation (RAG) in Azure AI Search. Microsoft Learn, 2026-11-09, accessed 2026-11-22.
- Overview · Cloudflare AI Gateway docs. Cloudflare, 2026-11-04, accessed 2026-11-22.
- Overview – Amazon Bedrock (Amazon Bedrock User Guide). Amazon Web Services, accessed 2026-11-22.
- What is Microsoft Foundry?. Microsoft Learn, 2026-08-13, accessed 2026-11-22.
- Gemini Enterprise Agent Platform release notes. Google Cloud Documentation, 2026-11-20, accessed 2026-11-22.
- API overview – Claude Platform Docs. Anthropic, accessed 2026-11-22.
- Introduction to the server side. MDN Web Docs (Mozilla), 2026-09-12, accessed 2026-11-22.
- Conversation state | OpenAI API. OpenAI, accessed 2026-11-22.
- API – Glossary. MDN Web Docs (Mozilla), 2025-07-11, accessed 2026-11-22.
- Gemini API using Firebase AI Logic. Google (Firebase documentation), 2026-11-18, accessed 2026-11-22.
- Microsoft Foundry Models overview. Microsoft Learn, 2026-07-28, accessed 2026-11-22.
- SDKs and CLI | OpenAI API. OpenAI, accessed 2026-11-22.
- Gemini API libraries. Google (Google AI Studio / Gemini API documentation), accessed 2026-11-22.
- File search | OpenAI API. OpenAI, accessed 2026-11-22.
- Logging Cheat Sheet. OWASP Cheat Sheet Series, accessed 2026-11-22.
- AI gateway capabilities in Azure API Management. Microsoft Learn, 2026-05-29, accessed 2026-11-22.
- Overview of Model Garden | Gemini Enterprise Agent Platform. Google Cloud Documentation, 2026-11-20, accessed 2026-11-22.
- Introducing Gemini Enterprise Agent Platform, powering the next wave of agents. Google Cloud Blog, 2026-04-22, accessed 2026-11-22.
