Minideas

Idea 14 of 15 · The Claude API

Thinking, files, citations and caching

Four API features worth knowing, and the request field that turns each one on.

Which planis cheapest?thinkingBthinking: {type: "adaptive"}, output_config: {effort: "high"}Claude decides whether to think; effort sets how much
1 / 4

Adaptive thinking

Add thinking: {type: "adaptive"} and Claude works through a problem before answering, like the step-by-step trick from “Writing a good prompt”, deciding itself whether and how much to think. Thinking is slower and costs more, so set effort lower for quick tasks.

Error E-1042PDFscreenshot of an error40-page reportcontent: [{type: "image", …}, {type: "document", …}]read directly, no converting to text
2 / 4

Images and PDFs

Put images and PDFs straight into a message as image or document content blocks: a screenshot of an error, a scanned invoice, a 40-page report with tables and charts. Claude reads them directly, with no converting to text first.

Refunds take 3 to 5working days [1].Gift cards can’t berefunded [2].{type: "document", …, citations: {enabled: true}}each claim points to the passage it came from
3 / 4

Citations

Send your sources as document blocks with citations: {enabled: true}, and each claim in the answer comes back linked to the exact passage it came from, so people can check it. That matters when the answer is about money or rules.

150-page manualquestionfirst request: stored250-page manualquestionreused: faster, much cheaper350-page manualquestionreused: faster, much cheaper{type: "text", text: manual, cache_control: {type: "ephemeral"}}what never changes goes first
4 / 4

Prompt caching

If every request starts with the same long text, such as a 50-page manual, add cache_control to it. The first request stores it and later ones reuse it, so they’re faster and much cheaper. Put what never changes first and what changes last.

Swipe the card, or use the arrow keys.

Go deeper

Each card stack gives you the idea. These open resources go into the detail.

Notes on the Claude Partner Network learning path on Anthropic Academy.