# OpenAPI spec

**Source:** https://promtable.com/glossary/openapi-spec

> An OpenAPI spec is the YAML / JSON description of a REST API — endpoints, params, responses, auth — used to drive doc generation, SDK generation, mock servers, and increasingly AI-readable API surfaces in 2026.

---
An OpenAPI spec is the YAML / JSON description of a REST API — endpoints, params, responses, auth — used to drive doc generation, SDK generation, mock servers, and increasingly AI-readable API surfaces in 2026.

OpenAPI (formerly Swagger) is the de-facto standard for describing REST APIs. Spec content: paths + methods, params with types, request / response schemas, auth schemes, examples. Tools built on top: Swagger UI / Redoc / Mintlify / ReadMe for docs, Stainless / Fern / Speakeasy / OpenAPI Generator for SDK gen, Prism for mocks, postman / insomnia for collections. In 2026 OpenAPI specs also drive LLM tool definitions — many MCP servers wrap an OpenAPI spec, and Claude / GPT can be given OpenAPI YAML directly as tool specs. The richer + more accurate your OpenAPI, the more downstream tooling 'just works'.

## When to use

- Any REST API.
- AI tool / agent integrations.

## Common mistakes

- Hand-writing OpenAPI then drifting from the code — auto-generate from server code where possible.
- Missing examples — generated docs + SDKs look thin.

## Related terms

- [ai-docs](https://promtable.com/glossary/ai-docs)
- [model-context-protocol](https://promtable.com/glossary/model-context-protocol)

## Sources

- [OpenAPI spec](https://www.openapis.org/)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/openapi-spec
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/openapi-spec".
Contact: info@vibecodingturkey.com.