Generate a typed TypeScript HTTP client from an OpenAPI spec so you stop writing fetch calls by hand.
Produce Zod validation schemas for all API request and response types from an existing OpenAPI definition.
Generate TanStack Query hooks from an OpenAPI spec for a React app that fetches data from a REST API.
Create a Python SDK with Pydantic models from an OpenAPI spec using the openapi-python package.
Requires Node.js 22 or later.
Hey API (openapi-ts) is a code generator that reads an OpenAPI specification file and produces TypeScript code for calling that API. Instead of writing HTTP client code by hand, you point the tool at an API spec and it generates typed functions, request and response types, and validation schemas automatically. Vercel, PayPal, and OpenCode are among the organizations using it. The core package, openapi-ts, works in any Node.js 22 or later environment and accepts OpenAPI specifications in any version. It ships with more than 20 plugins that cover a wide range of common needs. HTTP client plugins cover the Fetch API, Axios, Angular, Next.js, Nuxt, and HTTPX. Other plugins generate Zod validation schemas for runtime type checking, TanStack Query hooks for React data-fetching patterns, and Pydantic models for Python consumers. A separate openapi-python package handles Python SDK generation. The generated code is described as production-grade: it compiles without errors and is designed to be used directly in real applications, not just as a starting point for manual editing. The plugin system lets you customize what gets generated and how, so teams can adapt the output to their own conventions. A companion package called spec-types provides TypeScript definitions for OpenAPI and JSON Schema specifications with inline documentation, which can be useful when writing tools that read or validate API specs. This tool is for frontend and backend TypeScript developers who work with REST APIs that have an OpenAPI spec. Rather than maintaining handwritten API client code that drifts from the actual API, you regenerate the client whenever the spec changes. It is particularly useful in monorepos or teams where the API and its consumer are both under active development. The project is MIT licensed.
← hey-api on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.