The API around your model: clear endpoints, streamed answers, logins, and limits so one client cannot flood it.
- EndpointA REST route takes the question and validates the input (Pydantic).
- AuthCheck who is calling with a token (JWT or OAuth).
- StreamSend tokens as they arrive with server-sent events.
- LimitRate limits, retries with backoff and idempotency keys.
Explain 1/5
Source: FastAPI documentation