LLM APIs and SDKs
Calling model APIs: messages, streaming, structured output, tools, files, errors, cost, gateways, keys.
14 skills · 4 stages each
Skills
- Your first API callFor engineersStart hereGetting a key, installing an official SDK, sending messages with roles and reading the response, including its stop reason and token usage110 questions
- Streaming responsesFor engineersHow server-sent event streams deliver tokens, how to assemble deltas, cancel cleanly and survive proxies and mid-stream errorsneeds: Your first API call110 questions
- Structured outputsFor engineersGetting machine-readable output with JSON Schema, choosing the right mechanism, validating results and repairing failuresneeds: Your first API call110 questions
- Tool (function) callingFor engineersDefining tools, running the call loop, returning errors, handling parallel calls and controlling when the model may actneeds: Your first API call110 questions
- Files, PDFs and imagesFor engineersSending documents and images to a model, staying inside size and token limits, and checking what it extractedneeds: Your first API call110 questions
- Errors, rate limits and retriesFor engineersClassifying API errors, staying under rate limits, retrying with backoff, setting timeouts and falling back to other modelsneeds: Your first API call110 questions
- Cost controlFor engineersMeasuring token spend per request and feature, then cutting it with caching, batching, output caps and smaller modelsneeds: Your first API call110 questions
- Gateways and multi-providerFor engineersGateways, provider-neutral SDKs and routing rules that let one app use many models, and what they cost youneeds: Your first API call110 questions
- Batch and async jobsFor engineersRunning large offline workloads through provider batch APIs: building requests, picking workloads, estimating savings and collecting resultsneeds: Your first API call110 questions
- Keys and per-user limitsFor engineersKeeping provider keys on the server, rotating and scoping them, enforcing per-user quotas and spotting abuse of your AI endpointneeds: Your first API call110 questions
- LLM features in the frontendFor engineersStreaming UI, partial results, retries and honest affordances for AI features in a web appneeds: Streaming responses110 questions
- Reasoning models and thinking controlsFor engineersEffort levels, thinking budgets, hidden reasoning tokens and deciding when extra model reasoning is worth its latency and costneeds: Your first API call110 questions
- Provider-hosted toolsFor engineersWeb search, code execution and file search tools that the provider runs for you: when to use them, what they cost and what they exposeneeds: Tool (function) calling110 questions
- Testing LLM API integrationsFor engineersMocking providers, replaying recorded responses, forcing failure paths and running small live checks so model calls do not break silentlyneeds: Errors, rate limits and retries110 questions
Scenarios using this domain
Where to study
- PDF support (Claude docs) (opens in a new tab)DocsFree
Request limits, the three ways to send a PDF, and how pages are read as text plus images.
- Vision (Claude docs) (opens in a new tab)DocsFree
Image formats, resolution and token cost, multi-image labelling and the stated accuracy limits.
- Files API (Claude) (opens in a new tab)DocsFree
Upload a file once and reference it by id; covers the per-file size cap.
- File inputs (OpenAI) (opens in a new tab)DocsFree
The same three input routes on another provider, with its own 50 MB per-request limits.
- Document understanding (Gemini API) (opens in a new tab)DocsFree
How Gemini reads PDFs and other documents, for comparing provider behaviour.
- Structured outputs (Claude docs) (opens in a new tab)DocsFree
How Claude constrains output to a JSON schema, which schema features are supported and what the limits are.
- Structured model outputs (OpenAI API docs) (opens in a new tab)DocsFree
Strict schema mode versus JSON mode, supported keywords and how refusals appear in a structured response.
- Structured output (Gemini API docs) (opens in a new tab)DocsFree
How Gemini takes a response schema and which schema subset it accepts.
- JSON Schema: getting started step by step (opens in a new tab)ArticleFree
The official walkthrough of properties, required fields, types and constraints used in every provider's schema mode.
- Pydantic documentation (opens in a new tab)DocsFree
Defining Python models that validate data and generate a JSON Schema from the same class.
- Claude API pricing (opens in a new tab)DocsFree
Per-million-token prices, the cache write and read multipliers and the batch discount in one table.
- Prompt caching (Claude docs) (opens in a new tab)DocsFree
Cache breakpoints, the 5-minute and 1-hour lifetimes and the usage fields that report writes and reads.