liveBook · Manning

Contract

As explained in Grokking AI Applications

A defined interface through which software programs invoke operations or exchange data.

An application programming interface (API) is a defined set of rules that lets software applications communicate. One application sends a request to an exposed endpoint, often a URL, with parameters describing the needed data or action; the API then returns data or performs the action. section 2.2

A typical API interaction moves through these stages:

  • Choose the endpoint representing the available operation. section 2.2
  • Send a request with parameters that specify the required data or action. section 2.2
  • Authenticate the request, typically with an API key. section 2.2
  • Receive returned data or the result of the requested action. section 2.2

APIs turn GenAI applications from conversational systems into participants in a broader software ecosystem. They can retrieve data, update records, send messages, book meetings, or control connected devices. LLMs may decide what should happen, but APIs and other tools perform the external action. section 5.1 section 8.6

Expose a GenAI flow as an HTTP API

A Langflow email-generation flow can become a FastAPI service. A POST /generate-email endpoint accepts a customer profile as JSON and returns a structured response containing the email subject and body. External systems can call the service without using a chat interface. section 7.3

Figure 2.4 An API key is typically required to authenticate the request.

Use the figure to visualize how an API key authenticates a request. section 2.2

How Grokking AI Applications covers it

How deep it goes
Explains endpoints, parameters, authentication, responses, and HTTP exposure, without descending into protocol internals.
Examples
Uses Langflow endpoints, Gmail and Outlook actions, CRM updates, messaging, smart devices, and a FastAPI email service.
What it assumes
Builds from the idea of software applications communicating and introduces endpoints, requests, parameters, and authentication directly.
What you can do after
Apply it via Langflow or FastAPI to expose GenAI logic as a callable service for external systems.
How it connects
Connects APIs with endpoints, API keys, HTTP, LLMs, agents, tools, and external applications.

Also explained in

Compare how 44 books explain contract →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Applications. The section links point to the parts of the book it draws on.