Home / Companies / Redocly / Blog / Post Details
Content Deep Dive

Generate OpenAPI from real traffic (with AI)

Blog post from Redocly

Post Details
Company
Date Published
Author
Adam Sobaniec
Word Count
2,191
Company Posts That Month
7
Language
English
Hacker News Points
-
Post removed?
No
Summary

Redocly’s experimental `generate-spec` CLI command creates an initial OpenAPI 3.2 description from recorded HTTP traffic, addressing APIs that lack specifications needed for documentation, SDKs, and AI-agent integrations. It accepts HAR files and common proxy or server logs, deterministically inferring templated paths, request and response schemas, optional fields, repeated object components, selected formats, and cautiously identified enums from observed exchanges. An optional AI refinement mode processes one operation at a time using limited real traffic samples, validates proposed changes against the baseline, and can add descriptions, examples, constraints, semantic types, and more expressive structures such as discriminated `oneOf` payloads. In a Cafe API evaluation against a handwritten specification, AI modestly improved response-schema recovery and substantially enhanced documentation and request-body typing, including correcting multipart form values that traffic alone represented as strings. The tool runs through locally installed Claude, Codex, or Cursor CLIs, supports parallel processing, and omits headers, isolates execution environments, and instructs models to scrub secrets, though users are advised to capture only clean synthetic test traffic because request data is sent to external AI providers. Generated specifications remain hypotheses limited by observed coverage, may overfit sampled values, cannot reliably recognize ordinary-word path parameters, and require human review and ongoing drift checks.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Agents 1 931 231 103 -84%
Secrets Management 1 451 99 43 -80%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.