API lesson 01 · Start with one API call
Shared system · deterministic provider fixtures
Harbor Support Drafting API. One bounded request moves through typed items, tools, state, budgets, and evidence without live provider calls.
Start here
An LLM API is a network boundary through which an application sends typed inputs and receives model-generated items, events, usage, errors, and tool proposals under a provider contract.
The provider API does not own your product policy, semantic validation, tool authorization, durable state, retry safety, or evidence that the resulting feature is fit to release.
01 · Smallest useful mechanism
An LLM API lets application code send instructions and typed inputs to a hosted model and receive generated items, usage, errors, and terminal status. Teams use it for drafting, transformation, extraction, classification, multimodal interpretation, and tool-assisted workflows. The API does not decide whether an answer is true, an action is authorized, or the resulting feature is ready to ship.
The provider generates model output; your application still owns the product contract around it.
02 · Experiment
Deterministic protocol fixture
This workbench uses inspectable provider-event fixtures and injected failures. It does not make live calls or execute external effects.
Protocol workbench · harbor-request-v1
Question to consider
Complication
The response contains a draft and a tool call, then ends as incomplete.
What would you do?
Choose the approach you would be prepared to defend in a design review.
Consider the trade-offs first.
Choose an answer, then run the scenario. You’ll see what the system checks, what happens under the complication, and where the control boundary holds or breaks.
03 · Implementation brief
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Primary sources · verified 2026-08-02
Starting from the complete exchange makes streaming, schemas, tools, state, retries, cost, and traces extensions of one understandable boundary. Flattening that exchange into text discards the evidence those responsibilities require.
Common mistake: If response text is non-empty, the request succeeded. Useful text can accompany truncation, refusal, tool use, or an incomplete operation. Success depends on the terminal state and product contract.
Transfer exercise: Name one product use case, write the smallest complete request and response, then mark which decisions belong to the provider and which must remain in your application.
Next: Once the item contract is explicit, streaming becomes a sequence of typed state transitions rather than animated text.