API Design and Integration
Why Smarter. Smarter’s REST API is versioned, documented with Swagger, authenticated with API keys, rate limited, and returns errors in one consistent format. Several clients are built on it: the web console, the Go command-line interface, a Python SDK and an npm package. Students can study one API from both sides.
Look at. smarter/smarter/apps/api/, and the
smarter-cli repository.
Read. Smarter API, Authentication, CLI Error Handling, ADR-023: API Versioning.
Exercises.
Call the API with
curland an API key to apply, describe and delete a resource, then do the same with the CLI, and compare.Write a small client in a language of their choice that lists a user’s LLMClients and chats with one.
Review the API against a published style guide, and propose one improvement with a migration plan that does not break existing clients.
Course plans. Three complete, ready-to-teach plans, each with a schedule, graded assignments and rubrics, two capstone projects, recommended texts, further study and technical prerequisites. See Course Formats and Grading for what the formats have in common.
See the Smarter Instructor Guide to install Smarter and set up a class.