[{"data":1,"prerenderedAt":993},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintroduction\u002Fcomparison":3},{"id":4,"title":5,"body":6,"description":975,"extension":976,"frontmatter":977,"heading":5,"meta":984,"navigation":986,"order":967,"path":987,"seo":988,"sitemap":989,"source":990,"stem":991,"__hash__":992},"docs\u002Fdocs\u002F5.x\u002Fintroduction\u002Fcomparison.md","Kubb vs orval, HeyAPI, and openapi-typescript",{"type":7,"value":8,"toc":962},"minimark",[9,29,34,37,65,87,91,166,169,172,175,178,181,184,220,223,226,545,616,619,622,746,769,772,779,876,895,898,904,939,947,951],[10,11,12,13,18,19,23,24,28],"p",{},"Kubb, ",[14,15,17],"a",{"href":16},"https:\u002F\u002Forval.dev","orval",", ",[14,20,22],{"href":21},"https:\u002F\u002Fheyapi.dev","HeyAPI",", and ",[14,25,27],{"href":26},"https:\u002F\u002Fopenapi-ts.dev","openapi-typescript"," all generate code from OpenAPI specs. This page shows where they differ.",[30,31,33],"h2",{"id":32},"switch-to-kubb","Switch to Kubb",[10,35,36],{},"Each guide replaces one output at a time.",[38,39,40,47,52],"card-group",{},[41,42,46],"card",{"title":43,"icon":44,"to":45},"Move from orval","i-iconoir-git-fork","\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-orval","Types, client, query hooks, Zod schemas, and MSW mocks.",[41,48,51],{"title":49,"icon":44,"to":50},"Move from HeyAPI","\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-hey-api","Types, SDK and client, TanStack Query, and Zod schemas.",[41,53,56,57,23,61,64],{"title":54,"icon":44,"to":55},"Move from openapi-typescript","\u002Fdocs\u002F5.x\u002Fmigrate\u002Ffrom-openapi-typescript","Types, ",[58,59,60],"code",{},"openapi-fetch",[58,62,63],{},"openapi-react-query",".",[66,67,69,70,18,72,23,74,77,78,82,83,64],"blockquote",{"as":68},"warning","openapi-typescript is no longer maintained. In December 2025, its maintainers put ",[58,71,60],{},[58,73,63],{},[58,75,76],{},"openapi-metadata"," into ",[14,79,81],{"href":80},"https:\u002F\u002Fgithub.com\u002Fopenapi-ts\u002Fopenapi-typescript\u002Fdiscussions\u002F2559","maintenance mode",". In September 2026, openapi-typescript itself followed, with ",[14,84,86],{"href":85},"https:\u002F\u002Fgithub.com\u002Fopenapi-ts\u002Fopenapi-typescript\u002Fissues\u002F2874","no more updates, security fixes included",[30,88,90],{"id":89},"where-kubb-differs","Where Kubb differs",[92,93,94,107],"table",{},[95,96,97],"thead",{},[98,99,100,104],"tr",{},[101,102,103],"th",{},"Difference",[101,105,106],{},"Details",[108,109,110,122,133,144,155],"tbody",{},[98,111,112,116],{},[113,114,115],"td",{},"Full builds are the fastest of the three and use the least memory on every spec we measured, from 0.1 MB to 29.7 MB.",[113,117,118],{},[14,119,121],{"href":120},"#speed-cpu-time-and-memory","Speed, CPU time, and memory",[98,123,124,127],{},[113,125,126],{},"One config generates types, clients, query hooks, Zod, MSW, Faker, Cypress tests, an MCP server, and Redoc docs.",[113,128,129],{},[14,130,132],{"href":131},"#plugin-and-feature-coverage","Plugin and feature coverage",[98,134,135,138],{},[113,136,137],{},"Clients return a result you narrow by status code, and each call picks whether errors throw.",[113,139,140],{},[14,141,143],{"href":142},"#type-safety-and-response-handling","Type safety and response handling",[98,145,146,149],{},[113,147,148],{},"The runtime follows the spec's parameter styles, encodes bodies per media type, and reads server-sent events.",[113,150,151],{},[14,152,154],{"href":153},"#client-runtime","Client runtime",[98,156,157,160],{},[113,158,159],{},"File review, pull request snapshots, and API skills for AI tools.",[113,161,162],{},[14,163,165],{"href":164},"#kubb-studio","Kubb Studio",[10,167,168],{},"We checked each cell in the tables below against each project's docs in October 2026, and the OpenAPI 3.2 row by generating from a 3.2 spec in November 2026.",[30,170,121],{"id":171},"speed-cpu-time-and-memory",[10,173,174],{},"Each tool generates types, Zod schemas, and a fetch client. Switch between one file per generator or many, and between speed, CPU time, and memory.",[10,176,177],{},"With one file per generator, Kubb is the fastest and uses the least memory on every spec: 1.9 to 2.3× faster than HeyAPI and 1.3 to 5.9× faster than orval. With multiple files, Kubb still leads on speed and memory. HeyAPI and orval use less CPU time on the 1.1 MB spec, and HeyAPI also on the 10.6 MB spec.",[179,180],"tool-benchmark",{},[10,182,183],{},"How we measured, in November 2026:",[185,186,187,191,210,213],"ul",{},[188,189,190],"li",{},"The median of five runs (three on the 10.6 MB and 29.7 MB specs) on Node 22, Linux x64 with 4 cores.",[188,192,193,194,197,198,201,202,205,206,209],{},"kubb 5.20.1 (",[58,195,196],{},"@kubb\u002Fplugin-ts"," 5.5.3, ",[58,199,200],{},"@kubb\u002Fplugin-zod"," 5.9.3, ",[58,203,204],{},"@kubb\u002Fplugin-fetch"," 6.0.3), ",[58,207,208],{},"@hey-api\u002Fopenapi-ts"," 0.99.0, and orval 8.47.0.",[188,211,212],{},"Synthetic OpenAPI 3.0 specs with 10 to 2,800 resources, with spec and runtime validation off in every tool.",[188,214,215,216,219],{},"With multiple files, Kubb uses directory mode grouped by tag and orval uses ",[58,217,218],{},"tags-split",". HeyAPI has no option to split its output.",[30,221,132],{"id":222},"plugin-and-feature-coverage",[10,224,225],{},"✅ built in · 🟠 partial · 🟡 community or separate package · 🔶 needs extra user code · 🛑 not supported",[92,227,228,246],{},[95,229,230],{},[98,231,232,235,239,241,243],{},[101,233,234],{},"Feature",[101,236,238],{"style":237},"text-align:center","Kubb",[101,240,17],{"style":237},[101,242,22],{"style":237},[101,244,245],{"style":237},"openapi-ts",[108,247,248,273,288,303,334,350,371,391,407,427,443,462,481,497,513,529],{},[98,249,250,256,259,261,263],{},[113,251,252],{},[14,253,255],{"href":254},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas","OpenAPI 2.0 input",[113,257,258],{"style":237},"✅",[113,260,258],{"style":237},[113,262,258],{"style":237},[113,264,265,266],{"style":237},"🛑",[267,268,272],"sup",{"$":269},{"html":270,"block":271},1,0,"1",[98,274,275,280,282,284,286],{},[113,276,277],{},[14,278,279],{"href":254},"OpenAPI 3.0 input",[113,281,258],{"style":237},[113,283,258],{"style":237},[113,285,258],{"style":237},[113,287,258],{"style":237},[98,289,290,295,297,299,301],{},[113,291,292],{},[14,293,294],{"href":254},"OpenAPI 3.1 input",[113,296,258],{"style":237},[113,298,258],{"style":237},[113,300,258],{"style":237},[113,302,258],{"style":237},[98,304,305,310,316,323,329],{},[113,306,307],{},[14,308,309],{"href":254},"OpenAPI 3.2 input",[113,311,258,312],{"style":237},[267,313,315],{"$":314},{"html":270,"block":271},"2",[113,317,318,319],{"style":237},"🟠",[267,320,322],{"$":321},{"html":270,"block":271},"3",[113,324,265,325],{"style":237},[267,326,328],{"$":327},{"html":270,"block":271},"4",[113,330,265,331],{"style":237},[267,332,328],{"$":333},{"html":270,"block":271},[98,335,336,342,344,346,348],{},[113,337,338],{},[14,339,341],{"href":340},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-ts","TypeScript types",[113,343,258],{"style":237},[113,345,258],{"style":237},[113,347,258],{"style":237},[113,349,258],{"style":237},[98,351,352,358,360,362,364],{},[113,353,354],{},[14,355,357],{"href":356},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios","HTTP client (Axios, Fetch)",[113,359,258],{"style":237},[113,361,258],{"style":237},[113,363,258],{"style":237},[113,365,366,367],{"style":237},"🔶",[267,368,370],{"$":369},{"html":270,"block":271},"5",[98,372,373,379,381,383,385],{},[113,374,375],{},[14,376,378],{"href":377},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-react-query","React Query hooks",[113,380,258],{"style":237},[113,382,258],{"style":237},[113,384,258],{"style":237},[113,386,387,388],{"style":237},"🟡",[267,389,370],{"$":390},{"html":270,"block":271},[98,392,393,399,401,403,405],{},[113,394,395],{},[14,396,398],{"href":397},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-vue-query","Vue Query composables",[113,400,258],{"style":237},[113,402,258],{"style":237},[113,404,258],{"style":237},[113,406,265],{"style":237},[98,408,409,415,417,419,425],{},[113,410,411],{},[14,412,414],{"href":413},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-swr","SWR hooks",[113,416,258],{"style":237},[113,418,258],{"style":237},[113,420,265,421],{"style":237},[267,422,424],{"$":423},{"html":270,"block":271},"6",[113,426,387],{"style":237},[98,428,429,435,437,439,441],{},[113,430,431],{},[14,432,434],{"href":433},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod","Zod validation schemas",[113,436,258],{"style":237},[113,438,258],{"style":237},[113,440,258],{"style":237},[113,442,265],{"style":237},[98,444,445,451,453,455,460],{},[113,446,447],{},[14,448,450],{"href":449},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-msw","MSW request handlers",[113,452,258],{"style":237},[113,454,258],{"style":237},[113,456,265,457],{"style":237},[267,458,424],{"$":459},{"html":270,"block":271},[113,461,265],{"style":237},[98,463,464,470,472,474,479],{},[113,465,466],{},[14,467,469],{"href":468},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-faker","Faker.js mock data",[113,471,258],{"style":237},[113,473,258],{"style":237},[113,475,265,476],{"style":237},[267,477,424],{"$":478},{"html":270,"block":271},[113,480,265],{"style":237},[98,482,483,489,491,493,495],{},[113,484,485],{},[14,486,488],{"href":487},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-cypress","Cypress E2E tests",[113,490,258],{"style":237},[113,492,265],{"style":237},[113,494,265],{"style":237},[113,496,265],{"style":237},[98,498,499,505,507,509,511],{},[113,500,501],{},[14,502,504],{"href":503},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp","MCP server",[113,506,258],{"style":237},[113,508,258],{"style":237},[113,510,265],{"style":237},[113,512,265],{"style":237},[98,514,515,521,523,525,527],{},[113,516,517],{},[14,518,520],{"href":519},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc","Redoc API documentation",[113,522,258],{"style":237},[113,524,265],{"style":237},[113,526,265],{"style":237},[113,528,265],{"style":237},[98,530,531,537,539,541,543],{},[113,532,533],{},[14,534,536],{"href":535},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-barrel","Barrel index files",[113,538,258],{"style":237},[113,540,258],{"style":237},[113,542,258],{"style":237},[113,544,265],{"style":237},[546,547,548,551,572,590,603,613],"ol",{},[188,549,550],{},"openapi-typescript 7 reads 3.0 and 3.1 only. Convert Swagger 2.0 first, or use version 5.",[188,552,553,554,557,558,18,561,564,565,568,569,64],{},"Kubb generates every OpenAPI 3.2 feature we tested: the ",[58,555,556],{},"QUERY"," method, ",[58,559,560],{},"additionalOperations",[58,562,563],{},"querystring"," parameters, ",[58,566,567],{},"itemSchema"," for server-sent events and JSON Lines, and ",[58,570,571],{},"components\u002FmediaTypes",[188,573,574,575,577,578,580,581,583,584,586,587,64],{},"orval 8.48.0 generates ",[58,576,556],{}," operations. It skips ",[58,579,560],{}," and ",[58,582,563],{}," parameters, and types ",[58,585,567],{}," responses and media type references as ",[58,588,589],{},"unknown",[188,591,592,593,580,595,597,598,600,601,64],{},"HeyAPI 0.99.0 and openapi-typescript 7.13.0 read a 3.2 document without an error, but skip ",[58,594,556],{},[58,596,560],{}," operations, drop ",[58,599,563],{}," parameters, and type the other 3.2 features as ",[58,602,589],{},[188,604,605,606,580,608,610,611,64],{},"openapi-typescript generates types only. Clients and hooks come from the ",[58,607,60],{},[58,609,63],{}," runtimes, all in ",[14,612,81],{"href":85},[188,614,615],{},"HeyAPI lists SWR as planned and MSW and Faker as in progress.",[30,617,143],{"id":618},"type-safety-and-response-handling",[10,620,621],{},"openapi-typescript ships no generated client, so this table and the next leave it out.",[92,623,624,636],{},[95,625,626],{},[98,627,628,630,632,634],{},[101,629,234],{},[101,631,238],{"style":237},[101,633,17],{"style":237},[101,635,22],{"style":237},[108,637,638,658,669,683,704,720,733],{},[98,639,640,646,648,653],{},[113,641,642],{},[14,643,645],{"href":644},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Ferror-handling","Status-discriminated response result",[113,647,258],{"style":237},[113,649,366,650],{"style":237},[267,651,272],{"$":652},{"html":270,"block":271},[113,654,366,655],{"style":237},[267,656,315],{"$":657},{"html":270,"block":271},[98,659,660,663,665,667],{},[113,661,662],{},"Multiple success (2xx) responses",[113,664,258],{"style":237},[113,666,258],{"style":237},[113,668,258],{"style":237},[98,670,671,674,676,678],{},[113,672,673],{},"Multiple content types per response",[113,675,258],{"style":237},[113,677,258],{"style":237},[113,679,265,680],{"style":237},[267,681,322],{"$":682},{"html":270,"block":271},[98,684,685,698,700,702],{},[113,686,687,690,691,18,694,697],{},[58,688,689],{},"default"," and wildcard (",[58,692,693],{},"4xx",[58,695,696],{},"5xx",") responses",[113,699,258],{"style":237},[113,701,258],{"style":237},[113,703,258],{"style":237},[98,705,706,711,713,718],{},[113,707,708],{},[14,709,710],{"href":644},"Typed error responses",[113,712,258],{"style":237},[113,714,366,715],{"style":237},[267,716,272],{"$":717},{"html":270,"block":271},[113,719,258],{"style":237},[98,721,722,727,729,731],{},[113,723,724],{},[14,725,726],{"href":644},"Throw or return the error per call",[113,728,258],{"style":237},[113,730,265],{"style":237},[113,732,258],{"style":237},[98,734,735,740,742,744],{},[113,736,737],{},[14,738,739],{"href":433},"Zod v4 schemas tied to the types",[113,741,258],{"style":237},[113,743,258],{"style":237},[113,745,258],{"style":237},[546,747,748,755,766],{},[188,749,750,751,754],{},"Only orval's ",[58,752,753],{},"fetch"," client returns a status union and a typed error body. Its axios and query clients return the success type.",[188,756,757,758,761,762,765],{},"HeyAPI returns ",[58,759,760],{},"{ data, error }"," with no ",[58,763,764],{},"status"," to switch on.",[188,767,768],{},"HeyAPI 0.99.0 keeps only the JSON shape when a response also offers XML.",[30,770,154],{"id":771},"client-runtime",[10,773,774,778],{},[14,775,777],{"href":776},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization","Configure serialization"," has Kubb's runtime contract.",[92,780,781,793],{},[95,782,783],{},[98,784,785,787,789,791],{},[101,786,234],{},[101,788,238],{"style":237},[101,790,17],{"style":237},[101,792,22],{"style":237},[108,794,795,815,830,845,862],{},[98,796,797,803,805,810],{},[113,798,799],{},[14,800,802],{"href":801},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization#parameter-styles","Parameter styles from the spec",[113,804,258],{"style":237},[113,806,366,807],{"style":237},[267,808,272],{"$":809},{"html":270,"block":271},[113,811,366,812],{"style":237},[267,813,315],{"$":814},{"html":270,"block":271},[98,816,817,824,826,828],{},[113,818,819,820,823],{},"OpenAPI ",[58,821,822],{},"encoding"," object for form bodies",[113,825,258],{"style":237},[113,827,265],{"style":237},[113,829,265],{"style":237},[98,831,832,839,841,843],{},[113,833,834,838],{},[14,835,837],{"href":836},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization#encode-request-bodies","Pluggable codecs per media type"," (XML, YAML)",[113,840,258],{"style":237},[113,842,265],{"style":237},[113,844,265],{"style":237},[98,846,847,853,855,860],{},[113,848,849],{},[14,850,852],{"href":851},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Ferror-handling#validation-failures","Runtime request and response validation",[113,854,258],{"style":237},[113,856,366,857],{"style":237},[267,858,322],{"$":859},{"html":270,"block":271},[113,861,258],{"style":237},[98,863,864,870,872,874],{},[113,865,866],{},[14,867,869],{"href":868},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserver-sent-events","Server-sent events",[113,871,258],{"style":237},[113,873,265],{"style":237},[113,875,258],{"style":237},[546,877,878,889,892],{},[188,879,750,880,882,883,580,886,64],{},[58,881,753],{}," client reads ",[58,884,885],{},"style",[58,887,888],{},"explode",[188,890,891],{},"HeyAPI uses one global query serializer and does not style header or cookie parameters.",[188,893,894],{},"orval validates responses only, with Zod. Kubb accepts any Standard Schema validator (Zod, Valibot, ArkType).",[30,896,165],{"id":897},"kubb-studio",[10,899,900,903],{},[14,901,165],{"href":902},"https:\u002F\u002Fkubb.studio"," is the web IDE for Kubb. An agent on your machine runs Kubb and never uploads your spec. The other three tools have no equivalent for:",[185,905,906,913,916,923,930,936],{},[188,907,908,912],{},[14,909,911],{"href":910},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio#give-your-ai-tools-your-api","API skills for Claude Code, Cursor, and Codex",", built from your spec, so AI tools call your generated clients (Pro plan).",[188,914,915],{},"One AI plugin marketplace and shared agents for the team.",[188,917,918,922],{},[14,919,921],{"href":920},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio#review-and-save-generated-files","Review added, changed, and removed files"," before you save them.",[188,924,925,926,929],{},"Edit ",[58,927,928],{},"kubb.config.ts"," from the browser.",[188,931,932,64],{},[14,933,935],{"href":934},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgithub-actions","An installable snapshot for every pull request",[188,937,938],{},"Try it in the browser without installing anything.",[10,940,941,942,946],{},"To try the others in the browser, orval has a ",[14,943,945],{"href":944},"https:\u002F\u002Forval.dev\u002Fplayground","playground"," and HeyAPI has a StackBlitz demo.",[30,948,950],{"id":949},"when-not-to-use-kubb","When not to use Kubb",[185,952,953,956,959],{},[188,954,955],{},"You use only a few endpoints that rarely change.",[188,957,958],{},"You have no OpenAPI spec and won't write one.",[188,960,961],{},"You need a non-OpenAPI format now and won't write a custom adapter.",{"title":963,"searchDepth":964,"depth":964,"links":965},"",5,[966,968,969,970,971,972,973,974],{"id":32,"depth":967,"text":33},2,{"id":89,"depth":967,"text":90},{"id":171,"depth":967,"text":121},{"id":222,"depth":967,"text":132},{"id":618,"depth":967,"text":143},{"id":771,"depth":967,"text":154},{"id":897,"depth":967,"text":165},{"id":949,"depth":967,"text":950},"Compare Kubb with orval, HeyAPI, and openapi-typescript on speed, memory, generated outputs, OpenAPI 3.2 support, type safety, and client runtime.","md",{"layout":978,"title":5,"description":975,"outline":979,"order":967,"navigation":981},"doc",[967,980],3,{"title":982,"icon":983},"Comparison","i-iconoir-mirror",{"layout":978,"outline":985},[967,980],{"title":982,"icon":983},"\u002Fdocs\u002F5.x\u002Fintroduction\u002Fcomparison",{"title":5,"description":975},{"loc":987},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintroduction\u002Fcomparison.md","docs\u002F5.x\u002Fintroduction\u002Fcomparison","VV6ZgdQVVusbzXaxbP_iDovqtQMRWYMDIYX4SFhBdxw",1795021319949]