DEV.co
AI Coding Agents · hey-api

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.

Source: GitHub — github.com/hey-api/hey-api
5.1k
GitHub stars
404
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryhey-api/hey-api
Ownerhey-api
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars5.1k
Forks404
Open issues493
Latest release2026-06-22 (2026-06-22)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the hey-api source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/hey-api/hey-api.gitcd hey-api# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Enterprise SDK Generation at Scale

Teams maintaining multiple API clients across TypeScript and Python codebases can use Hey API to generate consistent, production-grade SDKs from a single OpenAPI spec, reducing manual maintenance and ensuring type safety across the organization.

Full-Stack API Integration Workflow

Frontend and backend teams can leverage Hey API to auto-generate typed clients (with TanStack Query hooks), validators (Zod schemas), and mock servers from a shared OpenAPI spec, enabling parallel development and reducing integration friction.

Third-Party API Client Libraries

API providers can use Hey API's plugin ecosystem to generate well-documented, validated client libraries in multiple languages, reducing the cost of maintaining hand-written SDKs while improving consistency and adoption.

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.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
No. Hey API is OpenAPI-only. For GraphQL, use graphql-codegen; for gRPC, use protoc or grpc-tools.
Can I customize the generated code?
Yes, via the 20+ plugin system and configuration options. Generated code is also readable and can be manually edited if needed, though regeneration would overwrite edits. Use plugins for repeatable customization.
What Node.js versions are supported?
Node.js 22+. Older versions are not supported; you must upgrade your build environment.
Does it work with my existing build tool (Webpack, Vite, Turbo, etc.)?
Yes. Hey API is an npm CLI tool that integrates via npm scripts or build hooks. It generates files to disk, so any build tool can consume the output. Framework-specific plugins (Next.js, Nuxt, etc.) may offer tighter integration.

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.