Start here. This is the direct spoken answer to practice first.
Overview
FastAPI derives much of an endpoint contract from its signature, so the signature must remain readable and unambiguous.
FastAPI inspects the route template, function signature, annotations, defaults, and explicit parameter markers. A matching route-template name is a path parameter; simple annotated values are normally query parameters; and a Pydantic model is normally read from the request body. Header, Cookie, Body, Query, Path, and related markers make the source and constraints explicit. Depends marks a value that FastAPI obtains by resolving another callable rather than reading one field directly from the request.