Deep diveProvider guide

Prompt caching

Put stable developer instructions, tools and shared reference material first and per-request details last, so the rendered prefix matches exactly. Track usage.input_tokens_details.cached_tokens against total input tokens to see the hit rate.

From
Provider guide: published by OpenAI on its own site, developers.openai.com.
Checked
, against the source

Dossiers

Next read

Tutorial · related guide

Batch API