CodeWithJay
Home/Courses/LLM APIs for Backend Developers: TypeScript and NestJS Crash Course
course

LLM APIs for Backend Developers: TypeScript and NestJS Crash Course

A seven-video crash course on using an LLM API properly from a backend: a NestJS service in TypeScript that calls Claude through the official Anthropic SDK, streams over server sent events, returns

7 lessons
LLM APIs for Backend Developers: TypeScript and NestJS Crash Course course thumbnail

About this course

Most LLM tutorials stop at a chat box. This crash course teaches the LLM API the way a backend developer uses it: from a NestJS service in TypeScript, through the official Anthropic SDK, with the habits production code needs.

It is the starter of the AI Backend Engineer Path. You build one service for BrightDesk, a small help-desk company with customers, support tickets and orders.

What each video covers:

  • Trailer: The finished service first, then the machine behind it: a NestJS service for BrightDesk that calls Claude through the official SDK, streams replies, returns zod-validated JSON, calls tools, survives rate limits, tracks cost and ships with Docker.
  • Episode 2, the theory: One request, end to end: the messages endpoint and what goes into it, content blocks, stop reasons and usage, the cost of a call in tokens, the server sent events of a stream, structured outputs checked with zod, the tool calling loop, and what to do with 429, 529 and timeouts.
  • Practical 1: Install and verify every prerequisite on camera: Node.js, npm, the Nest CLI, Docker Desktop with hello world, VS Code and the REST Client extension. Scaffold a NestJS project, keep the API key out of git, and make the first Claude call through the official Anthropic SDK, with a free offline mode.
  • Practical 2: Stream a drafted support reply from Claude to the client word by word: the SDK stream, an RxJS Observable, the Nest Sse decorator, the final usage event, and aborting the stream when the client leaves.
  • Practical 3: Classify support tickets into category, priority and sentiment with Claude structured outputs: one zod schema sent as the output format and checked again before the code trusts it, with a clean 502 when the answer does not fit.
  • Practical 4: A strict tool definition, the tool use loop with tool results sent back in a user turn, a five turn limit, and a customer check in your own code so the model can only ever see that customer's orders.
  • Practical 5: SDK retries and timeouts, an exception filter that maps 429, 529 and timeouts to honest statuses, token and cost tracking per request with a ledger per route, then a two stage Dockerfile and Docker Compose with a health check, run for real.

You need Node.js, the Nest CLI, Docker Desktop and VS Code with the REST Client extension; episode three installs and checks each one on camera. An Anthropic API key is optional. The default offline mode runs the real SDK against a local fixture server for free, and every response says which mode produced it.

By the end you have a working AI backend service, and you understand every request it sends and what it costs.

What you'll learn

Understand what one LLM API call sends, returns and costs, in tokens and dollars
Call Claude from a NestJS service through the official Anthropic SDK, with a free offline mode
Stream replies to clients with server sent events and abort when the client leaves
Get structured JSON with a zod schema and validate it before your code trusts it
Build a tool calling loop where your code, not the model, decides what data is shown
Handle retries, rate limits and timeouts, track cost per request, and ship with Docker Compose

Course curriculum

7 lessonsUnlocks with the course
  • Course Trailer
  • How an LLM API Call Really Works
  • Practical 1: Setup and Your First Claude Call
  • Practical 2: Streaming with Server-Sent Events
  • Practical 3: Structured Outputs with Zod
  • Practical 4: Tool Calling

Your instructor

Jay Gogoi

Software Architect

@codewithjay
Subscribe on YouTube

Jay is a well-known Best Tutor on YouTube

Prerequisites

  • Basic JavaScript or TypeScript and a little HTTP. You need Node.js, the Nest CLI, Docker Desktop and VS Code with REST Client, all installed on camera in episode three. No NestJS experience is required, and an Anthropic API key is optional because the default offline mode is free.
$19.99$49.99
Save 60%

7

Lessons

Full course accessOne payment

One payment unlocks all 7 lessons, and they stay in your library for good.

  • Certificate when you complete it
Or get it with MembershipThis course and every other premium course

One payment, no subscription · lifetime access · Refund policy

Related courses

View all

Most LLM tutorials stop at a chat box. This crash course teaches the LLM API the way a backend developer uses it: from a NestJS service in TypeScript, through the official Anthropic SDK, with the habits production code needs.

It is the starter of the AI Backend Engineer Path. You build one service for BrightDesk, a small help-desk company with customers, support tickets and orders.

What each video covers:

* Trailer: The finished service first, then the machine behind it: a NestJS service for BrightDesk that calls Claude through the official SDK, streams replies, returns zod-validated JSON, calls tools, survives rate limits, tracks cost and ships with Docker.

What you'll learn

  • Understand what one LLM API call sends, returns and costs, in tokens and dollars
  • Call Claude from a NestJS service through the official Anthropic SDK, with a free offline mode
  • Stream replies to clients with server sent events and abort when the client leaves
  • Get structured JSON with a zod schema and validate it before your code trusts it
  • Build a tool calling loop where your code, not the model, decides what data is shown
  • Handle retries, rate limits and timeouts, track cost per request, and ship with Docker Compose

Frequently asked questions

What is LLM APIs for Backend Developers: TypeScript and NestJS Crash Course about?

A seven-video crash course on using an LLM API properly from a backend: a NestJS service in TypeScript that calls Claude through the official Anthropic SDK, streams over server sent events, returns

What does this course cover?

7 lessons, including: Course Trailer; How an LLM API Call Really Works; Practical 1: Setup and Your First Claude Call; Practical 2: Streaming with Server-Sent Events; Practical 3: Structured Outputs with Zod; Practical 4: Tool Calling; and more.

Which topics does this course relate to?

Generative AI & LLMs, Docker, Backend Development, TypeScript, NestJS.