What is OpenAPI TypeScript?
OpenAPI TypeScript is a powerful code generator that transforms your OpenAPI specifications into production-ready TypeScript code. Used by Vercel, OpenCode, and PayPal, it’s the OpenAPI codegen that just works. Generate type-safe SDKs, Zod schemas, TanStack Query hooks, or choose from 20+ other plugins to eliminate third-party boilerplate and accelerate your development workflow.Quick Start
Get up and running in under 60 seconds with npx
Installation
Install with npm, pnpm, yarn, or bun
Configuration
Customize your code generation with powerful options
Plugins
Explore 20+ plugins for schemas, hooks, and more
Key Features
Production-Ready Code
Production-Ready Code
Generate clean, type-safe TypeScript code that compiles without errors. OpenAPI TypeScript produces code that’s ready for production use, with proper error handling and type inference.
Universal Compatibility
Universal Compatibility
Works in any Node.js 20+ environment and accepts any valid OpenAPI specification (OpenAPI 2.0, 3.0, 3.1). Support for both JSON and YAML formats.
Multiple HTTP Clients
Multiple HTTP Clients
Choose from multiple HTTP client implementations:
- @hey-api/client-fetch - Native Fetch API
- @hey-api/client-axios - Axios client
- @hey-api/client-angular - Angular HttpClient
- @hey-api/client-next - Next.js optimized
- @hey-api/client-nuxt - Nuxt optimized
- @hey-api/client-ky - Ky client
- @hey-api/client-ofetch - ofetch client
Powerful Plugin System
Powerful Plugin System
Over 20 plugins to reduce third-party boilerplate:
- Type Generation: TypeScript interfaces and types
- Schema Validation: Zod, Valibot, JSON Schema
- Data Fetching: TanStack Query, Pinia Colada, SWR
- Framework Integration: Angular, Fastify, and more
Hey API Registry Integration
Hey API Registry Integration
Sync with Hey API Registry for centralized OpenAPI specification management. Sign up at app.heyapi.dev to manage your API specifications in the cloud.
How It Works
OpenAPI TypeScript follows a simple three-step process:Provide OpenAPI Specification
Point to your OpenAPI specification file (local path, URL, or object). Supports OpenAPI 2.0, 3.0, and 3.1 in JSON or YAML format.
Configure Plugins
Select which plugins to use for code generation. By default, generates TypeScript types and SDK, but you can add schemas, hooks, and more.
Why OpenAPI TypeScript?
“OpenAPI codegen that just works.” — Guillermo Rauch, CEO of Vercel
- Type Safety: Full TypeScript support with accurate type inference
- Framework Agnostic: Works with React, Vue, Angular, Svelte, and more
- Battle Tested: Used by major companies like Vercel, OpenCode, and PayPal
- Active Development: Regular updates with new features and improvements
- Open Source: MIT licensed with a thriving community
- Extensible: Build custom plugins to fit your specific needs
Next Steps
Try the Quick Start
Generate your first client in under a minute
Explore Examples
See OpenAPI TypeScript in action with live examples
Read the Docs
Explore comprehensive documentation and guides
Join the Community
Contribute or ask questions on GitHub