hey-api
Hey API is an open-source code generation tool that transforms OpenAPI specifications into production-ready SDKs, validators, and client libraries for TypeScript and Python. It supports 20+ plugins and is widely used by enterprises including Vercel, PayPal, AWS, and Autodesk.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | hey-api/hey-api |
| Owner | hey-api |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 5.1k |
| Forks | 404 |
| Open issues | 493 |
| Latest release | 2026-06-22 (2026-06-22) |
| Last updated | 2026-07-07 |
| Source | https://github.com/hey-api/hey-api |
What hey-api is
Hey API is a monorepo-based OpenAPI code generator written in TypeScript that produces type-safe SDKs with support for multiple HTTP clients (Fetch, Axios, Angular, Next.js, Nuxt, HTTPX) and frameworks like Zod and TanStack Query. It requires Node.js 22+ and accepts any valid OpenAPI specification as input.
Get the hey-api source
Clone the repository and explore it locally.
git clone https://github.com/hey-api/hey-api.gitcd hey-api# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Ensure your OpenAPI specification is complete, current, and follows OpenAPI 3.x standards; incomplete specs will produce incomplete code.
- Plan plugin selection based on your tech stack (e.g., TanStack Query for React, Nuxt for Vue, Pydantic for Python) to maximize code generation utility.
- Integrate code generation into your CI/CD pipeline to regenerate clients on spec changes; treat generated code as disposable and version the spec, not the output.
- Review generated code before committing to understand patterns and ensure it meets your code quality standards; customization hooks via plugins may be necessary.
- Establish a clear workflow for spec-driven development to avoid misalignment between API and generated clients.
When to avoid it — and what to weigh
- Non-OpenAPI Specifications — If your API is documented in GraphQL, gRPC, or proprietary formats, Hey API will not be applicable; you would need adapters or alternative tools.
- Highly Custom or Legacy API Patterns — APIs with unusual request/response patterns, undocumented conventions, or OpenAPI specs that deviate significantly from standard practices may require extensive post-generation customization, reducing the tool's value.
- Projects with Minimal OpenAPI Coverage — If you lack a complete, well-maintained OpenAPI specification, Hey API code generation will produce incomplete or inaccurate clients; investing in specification quality is a prerequisite.
- Environments Below Node.js 22 — The tool requires Node.js 22+; legacy Node environments or edge runtimes with strict version constraints will block adoption.
License & commercial use
Hey API is released under the MIT License, a permissive OSI-approved license allowing commercial use, modification, and distribution with minimal restrictions (only requiring attribution and license inclusion).
MIT License permits commercial use without restrictions. However, this covers only the Hey API tool itself. Verify that generated code (SDKs, schemas) complies with any licensing requirements of your API specification or dependencies integrated via plugins. No warranty or indemnification is provided by the MIT License; conduct your own legal review for mission-critical commercial deployments.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
Hey API is a build-time code generator, not a runtime library, so it does not directly handle secrets or authentication at runtime. Security depends on: (1) the OpenAPI spec accurately representing API security schemes (OAuth, API keys, etc.), (2) generated clients correctly implementing these schemes, and (3) your own handling of credentials in generated code (avoid embedding secrets in spec or generated output). No security audit, vulnerability disclosure policy, or CVSS details are provided in available data; verify with maintainers for security-sensitive use.
Alternatives to consider
OpenAPI Generator (openapi-generator.tech)
Mature, multi-language codegen with broader template support and larger community. More heavyweight and less opinionated than Hey API; choose if you need Java, C#, Go, or other languages not in Hey API's roadmap.
Swagger Codegen (legacy)
Predecessor to OpenAPI Generator; widely used in legacy projects. Avoid for new projects unless stuck with older OpenAPI 2.0 specs; Hey API and OpenAPI Generator are preferred.
REST Client Code Generators (built into IDEs/frameworks)
Some frameworks (e.g., Next.js, tRPC with Prisma) offer lightweight code generation. Use if your use case is minimal and you want to avoid an extra tool; trade off customization and consistency for simplicity.
Build on hey-api with DEV.co software developers
Hey API reduces SDK maintenance overhead and ensures type safety across teams. Assess your OpenAPI spec quality and integrate into your CI/CD pipeline to start generating consistent, production-grade clients.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
hey-api FAQ
Does Hey API support GraphQL or gRPC?
Can I customize the generated code?
What Node.js versions are supported?
Does it work with my existing build tool (Webpack, Vite, Turbo, etc.)?
Software developers & web developers for hire
Need help beyond evaluating hey-api? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and ai coding agents integrations — and maintain them long-term.
Ready to streamline your API client generation?
Hey API reduces SDK maintenance overhead and ensures type safety across teams. Assess your OpenAPI spec quality and integrate into your CI/CD pipeline to start generating consistent, production-grade clients.