LLM application development

Integrate LLM APIs into an application

Call OpenAI/Anthropic/Gemini/Bedrock APIs with streaming, retries, token accounting and cost awareness.

~12 focused hours·beginner

Tools: Anthropic Python SDK, OpenAI Python SDK, AWS Bedrock, tenacity (retry/backoff), tiktoken / token counting

What employers mean

You should be able to…

  1. Call OpenAI/Claude/Gemini APIs from a backend service with proper error handling
  2. Implement streaming responses so the UI shows tokens as they arrive
  3. Add retry/backoff logic for rate limits (429) and transient 5xx errors
  4. Track token usage and cost per request/user for billing or budgeting
  5. Swap between model providers (OpenAI, Anthropic, Bedrock, Vertex) behind a common interface
  6. Handle API keys/secrets securely (env vars, secret managers) not hardcoded
  7. Set sane timeouts and max_tokens to avoid hung requests in production

Needs first: Write production-quality Python for AI work

Learn — free, link-checked

The few resources that matter

Read · beginner · 15 min · docs.anthropic.com

Token Counting

Shows how to count tokens before sending a request so you can budget cost and avoid context overflows. — Anthropic
Read · beginner · 25 min · docs.anthropic.com

Anthropic API — Getting Started

Fastest correct path to your first authenticated Claude API call, streaming, and error handling patterns. — Anthropic
Read · beginner · 25 min · platform.openai.com

OpenAI API Quickstart

Same task as the Anthropic quickstart on the other major provider — you need both to build a provider-agnostic wrapper. — OpenAI
Watch · beginner · 60 min · youtube.com

[1hr Talk] Intro to Large Language Models

Best single hour to actually understand what tokens, context windows and cost are before you start optimizing them. — Andrej Karpathy
Read · intermediate · 35 min · docs.anthropic.com

Tool Use (Function Calling) with Claude

Canonical reference for defining tool schemas and getting reliable structured calls back from Claude. — Anthropic
Practice

Multi-provider LLM chat CLI with cost tracking

Build a command-line chat tool that lets a user talk to either Claude or GPT-4o-mini via a shared interface, streams the response token-by-token, and logs the cost of every call in INR (using a fixed USD→INR rate) to a local SQLite file. Add retry-with-backoff for rate limits and a --budget flag that stops the session once cumulative spend crosses a limit.

Done when
  • Switching --provider anthropic|openai changes the backend with no other code changes
  • Responses stream to stdout token-by-token, not all at once
  • A 429/5xx from the API triggers exponential backoff and retries, visible in logs
  • Every call's token usage and estimated INR cost is persisted and summable via a --report command
Prove it

Evidence a recruiter can check

  • Public GitHub repo with README showing architecture (provider abstraction, retry logic) and a demo GIF/asciinema
  • A --report command output pasted in the README showing real cost tracking across 20+ calls
  • Unit tests that mock the API client and assert retry behavior on 429/500
  • A short write-up comparing latency/cost of 2+ providers on the same prompts
Interview

Questions you'll get asked

  1. How do you handle a 429 rate-limit error from the OpenAI/Claude API in production?
  2. Walk me through how you'd stream a response from an LLM API to a React frontend.
  3. How do you estimate and control the cost of an LLM feature before shipping it?
  4. What's the difference between synchronous and streaming API calls, and when do you use each?
  5. How would you design a wrapper that lets you switch from GPT-4o to Claude without rewriting business logic?
  6. How do you test code that calls an external LLM API without burning tokens on every CI run?
See where you stand for AI Engineer