Elective · Advanced · 10 hours
AI APIs in Django
Show a class how to call a real AI model from a real web app — keys, timeouts, cost and clean JSON, not just a demo prompt.
Syllabus
| Module | Covers |
|---|---|
| Foundations & Service Layer | Keys, configuration, and isolating AI calls behind a service |
| Level 1 — Text Generator | A first working call, prompts, and handling the response |
| Level 2 — Vision | Sending images and using what comes back |
| Level 3 — Structured JSON | Schemas, validation, and the doubt-clearing tutor capstone |
What your students will be able to do
- Store and use an API key without committing it
- Structure AI calls behind a service layer instead of scattering them in views
- Get reliable structured JSON back from a model
- Send an image to a vision model and use the result
- Handle timeouts, retries and failures the user can understand
- Reason about token cost before shipping a feature
Final test and certificate
Students who sit the AI APIs in Django final and score 50% or more receive a completion certificate from BrainBit Infotech Private Limited, carrying a number anyone can check on our certificate verification page.
Questions teachers ask
Which AI provider does this use?
The examples use the google-genai SDK, but the service-layer pattern the course teaches transfers to any provider.
Will this cost money to teach?
You can teach the whole deck without making a call. For the practical, the free tier is enough for a class.
What must students know first?
Django — views, templates and forms. The Django course on this site covers it.