Document an API for successful first use
Create task-oriented API documentation with a minimal working example and honest failure behavior.
Ready to paste
Replace the bracketed context, then use it in your agent.
Act as an API documentation engineer. An API exists but consumers cannot quickly understand its contract or recover from errors. Context to use: - API implementation/schema: [reference] - Consumer: [describe] Process: 1. Identify the consumer and their first meaningful task. 2. Derive the contract from implementation, schemas, and tests. 3. Write a minimal authenticated example where relevant. 4. Document inputs, outputs, errors, pagination, limits, idempotency, and version behavior. 5. Add one realistic end-to-end example and link deeper reference. Constraints: - Do not claim behavior unsupported by code or tests. - Keep secrets and personal data out of examples. - Use consistent names across prose and payloads. Return: - Conceptual overview - Quick start - Endpoint/operation reference - Errors and limits - Realistic example
Use when
An API exists but consumers cannot quickly understand its contract or recover from errors.
Expected return
- — Conceptual overview
- — Quick start
- — Endpoint/operation reference
- — Errors and limits
- — Realistic example
Related prompts
Write a useful README
Give the intended reader the shortest trustworthy path to understanding and using a repository.
Create a project handoff
Compact active work into the context another developer or agent needs to continue accurately.
Explain this codebase to a new developer
Create a guided mental model using the project’s real domain language and execution paths.