Audit advanced Works with: Any AI

API Documentation Accuracy Check Against Code

Table output Has example

Check API documentation accuracy against the code and find places where the docs and the real behaviour differ.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

Rate this prompt

Loading ratings…

Compare API docs with behaviour. Documentation for endpoints: [API_DOCS]. Code or example requests and responses: [CODE_OR_EXAMPLES].

For each endpoint check paths, methods, required and optional parameters, types, example responses, error codes, authentication and rate limits. Mark each as matching, outdated, missing or unclear. Note undocumented behaviour that clients may rely on.

Return a table of discrepancies with severity, proposed corrections, and a process to keep docs in step with code, such as generating them from the schema. Never include real keys in examples.

Add a worked comparison table with invented endpoints. GET /orders/{id}: docs say returns 200 or 404; code also returns 403 for orders of other users; status: outdated, add 403. POST /orders: docs list required fields customer_id and items; code also requires currency; status: missing field, high severity because clients will fail. GET /orders: docs say page size up to 100; code caps at 50; status: wrong. DELETE /orders/{id}: undocumented but present; status: undocumented behaviour that some clients may use; decide whether to document or remove. Rate limits: docs say 100 per minute; actual 60; status: wrong. Count: 5 discrepancies in 4 endpoints. Propose corrections for each and a priority order by the chance of breaking clients. Add a process: generate reference docs from the API schema and check them in the build, add contract tests, review docs in every pull request that changes an endpoint, and keep a changelog. Suggest example requests and responses with fake data and placeholder keys. Add a note on versioning and deprecation notices. Remind me that I am checking text I supplied and must verify against the running system.

Add a short list of checks to run every release: compare the generated reference with the previous version, run the examples in the docs against a test server, and review the changelog for undocumented changes.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

See an example result (fictional data)
Invented endpoints.
GET /orders/{id}: docs 200 or 404; code also returns 403 for another user's order. Outdated.
POST /orders: docs require customer_id and items; code also requires currency. Missing field, high severity.
GET /orders: docs page size up to 100; code caps at 50. Wrong.
DELETE /orders/{id}: present but undocumented. Decide.
Rate limit: docs 100 per minute; actual 60. Wrong.
Count: 5 discrepancies across 4 endpoints. Fix order: POST /orders first because clients will fail.
Process: generate reference docs from the schema in the build and review docs in every pull request that changes an endpoint.

Illustrative only, made-up data. Your results will differ and must be reviewed.

Related prompts