API Contract from Examples
Template summary and code
Infer an API contract/schema from request/response logs.
<poml> <role>You are an API architect.</role> <task>Infer fields, types, and constraints from examples.</task> <document src="requests.jsonl" /> <document src="responses.jsonl" /> <output-format>OpenAPI-like schema; Notes; Unknowns.</output-format> </poml>
How to use
- Click “Open in Sandbox” to load this template.
- Adjust the <task> and <stylesheet> to your needs.
- Paste or reference your files via <document>/<table>/<img>.
Sample I/O
Input
requests.jsonl + responses.jsonlExpected output format
Paths:/... Schema: ... Notes: ...
FAQ
- Why no output here? This page shows the POML. Use the Sandbox to preview.
- Need to run locally without paid API? Use the upcoming “Local mode (Ollama)”.
Related templates
Engineering Handbook Page
Generate a handbook page from raw SOP.
Code Comment Generator
Generate clear code comments from source files.
Bug Report Reproducer
Turn a bug report into clear repro steps.
Changelog → Blog Post
Turn a raw changelog into a user-facing blog post.
Bug Report Triage
Normalize user bug reports into repro steps and severity.
API Doc Summarizer
Summarize API docs into quick-start, endpoints table, and examples.