hey-api is a free, open source api development & testing project written in TypeScript and released under MIT. It has 5,416 GitHub stars, 434 forks and 630 open issues, and was last pushed 24 days ago. On this registry it ranks #44 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 5 stars over the last 3 tracked days.

What is hey-api?

What it is

Hey API is an open-source ecosystem for turning API specifications into production-ready code. It is distributed as a monorepo containing all of the project's open source packages, with the two primary generators being openapi-ts for TypeScript and openapi-python for Python. The TypeScript generator ships with more than twenty plugins covering SDKs, Zod schemas, and TanStack Query hooks, while the Python generator produces SDKs and Pydantic models. A supporting library, spec-types, provides TypeScript definitions for OpenAPI and JSON Schema specifications with complete inline documentation. The project lives in the JavaScript and TypeScript ecosystem, is written in TypeScript, and is released under the MIT License.

The concrete problem it solves is the manual, repetitive work of translating an OpenAPI specification into client code that a team can actually ship. Rather than hand-writing request functions, response types, validation schemas, and framework-specific data-fetching hooks, a developer points a generator at an existing specification and receives code that compiles and runs. Because the generators accept any OpenAPI specification and expose HTTP clients for the Fetch API, Axios, Angular, Next.js, Nuxt, and HTTPX, the output can be adapted to the stack a project already uses instead of forcing a rewrite around a single runtime.

Key capabilities

  • Generates TypeScript SDKs from any OpenAPI specification through the openapi-ts package.
  • Generates Python SDKs and Pydantic models through the openapi-python package.
  • Provides more than twenty plugins, including Zod schemas and TanStack Query hooks, to reduce third-party boilerplate.
  • Emits production-grade code that compiles, rather than partial or illustrative output.
  • Runs in any Node.js 22 or later environment.
  • Supports HTTP clients for the Fetch API, Axios, Angular, Next.js, Nuxt, and HTTPX.
  • Remains highly customizable through its plugin system.
  • Publishes spec-types, TypeScript definitions for OpenAPI and JSON Schema with inline documentation.

Who uses it and how

  • Teams adopt it to replace hand-written API clients with generated SDKs that stay in sync with the specification.
  • Frontend projects use the TanStack Query hooks plugin to generate data-fetching code alongside the client.
  • Projects needing runtime validation pair the SDK output with generated Zod schemas.
  • Python services use openapi-python to produce SDKs and Pydantic models from the same specification.
  • The project reports use by Vercel, OpenCode, PayPal, AWS, and Autodesk, and millions of weekly npm downloads.

Getting started

Install the relevant package from npm β€” openapi-ts for TypeScript or openapi-python for Python β€” and follow the package-specific quick start guides linked from the monorepo. Documentation and manuals are hosted at heyapi.dev.

When to use it β€” and when not to

Hey API is a reasonable fit when a project already maintains an OpenAPI specification and wants generated clients, validators, or framework hooks instead of hand-written equivalents. Self-hosters should note that the generators run locally or in CI and the README does not describe a hosted service, so no database, storage, or SMTP component is mentioned as required. The repository carries 630 open issues, which is worth weighing against the maturity implied by its adoption.

project readme (upstream, from github) β€” read inline
Hey API

Hey API

"OpenAPI codegen that just works."
β€” Guillermo Rauch, CEO of Vercel

DevTrends badge for @hey-api/openapi-ts DevTrends badge for @hey-api/openapi-ts CI status GitHub stars MIT License

Manual  β€’  Issues  β€’  Contribute

About

Hey API is an ecosystem for turning API specifications into production-ready code. It's trusted by thousands of companies – from YC startups to Fortune 500 enterprises – and powers products used by millions worldwide.

This is the monorepo containing all open source Hey API packages. For package-specific documentation and quick start guides, see the individual repositories below.

Packages

Package Description
openapi-ts TypeScript code generator with 20+ plugins for SDKs, Zod schemas, TanStack Query hooks, and more.
Manual  β€’  npm
openapi-python Python code generator for SDKs and Pydantic models.
Manual  β€’  npm

Highlights

  • production-grade code that compiles
  • runs in any Node.js 22+ environment
  • accepts any OpenAPI specification
  • core plugins for SDKs
  • HTTP clients for Fetch API, Axios, Angular, Next.js, Nuxt, HTTPX, and more
  • Zod schemas, TanStack Query hooks, Pydantic models, and 20+ plugins to reduce third-party boilerplate
  • highly customizable via plugins

Libraries

Package Description
spec-types TypeScript definitions for OpenAPI and JSON Schema specifications with complete inline documentation.
npm

Contributing

Want to see your code in products used by millions?

Start with our Contributing guide and release your first feature.

Sponsors

Partners behind the future of API tooling. Become a sponsor.

Gold

Opencode logo

      </a>

The open source coding agent.
opencode.ai

Silver

FastAPI logo
    </a>

fastapi.tiangolo.com
Unblocked logo
    </a>

getunblocked.com

Bronze

Kinde logo
    </a>
  </td>
Photon logo
    </a>
  </td>
</tr>

License

Released under the MIT License.

Frequently asked questions

Is hey-api free to use?

hey-api is open source under the MIT licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does hey-api do?

πŸ‘¨β€πŸš€ Turn API specifications into production-ready SDKs, validators, mocks, and more. 20+ plugins. Millions of weekly npm downloads. Used by Vercel, OpenCode,

What is hey-api written in?

hey-api is primarily written in TypeScript. Its source is publicly available at https://github.com/hey-api/hey-api, and it has 5,416 GitHub stars.