[{"data":1,"prerenderedAt":776},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fexplanation\u002Fcomparison":3},{"id":4,"title":5,"body":6,"description":758,"extension":759,"frontmatter":760,"heading":5,"meta":767,"navigation":769,"order":763,"path":770,"seo":771,"sitemap":772,"source":773,"stem":774,"__hash__":775},"docs\u002Fdocs\u002F5.x\u002Fexplanation\u002Fcomparison.md","Kubb vs orval, HeyAPI, and openapi-typescript",{"type":7,"value":8,"toc":747},"minimark",[9,29,32,72,77,80,83,103,107,110,374,398,402,405,529,552,556,564,661,680,683,689,724,732,736],[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. We checked each cell against the project's own docs in October 2026.",[10,30,31],{},"Kubb differs from the others in five ways:",[33,34,35,44,51,58,65],"ul",{},[36,37,38,39,43],"li",{},"It generates faster and uses less memory than HeyAPI and orval at every ",[14,40,42],{"href":41},"#speed-memory-and-install-size","spec size we measured",".",[36,45,46,47,43],{},"One config generates types, clients, query hooks, Zod, MSW, Faker, Cypress tests, an MCP server, and Redoc docs. See ",[14,48,50],{"href":49},"#plugin-and-feature-coverage","plugin coverage",[36,52,53,54,43],{},"Its clients return a result you narrow by status code, and you choose per call whether errors throw. See ",[14,55,57],{"href":56},"#type-safety-and-response-handling","type safety",[36,59,60,61,43],{},"Its runtime follows the spec's parameter styles, encodes bodies per media type, and reads server-sent events. See ",[14,62,64],{"href":63},"#client-runtime","client runtime",[36,66,67,71],{},[14,68,70],{"href":69},"#kubb-studio","Kubb Studio"," adds file review, pull request snapshots, and API skills for AI tools.",[73,74,76],"h2",{"id":75},"speed-memory-and-install-size","Speed, memory, and install size",[10,78,79],{},"Switch between a full build (types, Zod schemas, and a fetch client) and types only, where openapi-typescript joins. In types only, openapi-typescript is faster than Kubb on the largest spec, but uses more memory.",[81,82],"tool-benchmark",{},[10,84,85,86,90,91,94,95,98,99,102],{},"Median of five runs on Node 22, Linux x64, October 2026. Kubb ran from the ",[87,88,89],"code",{},"main"," branches of kubb-labs\u002Fkubb and kubb-labs\u002Fplugins on October 24 (the first build after kubb 5.12.8 without the TypeScript compiler). Compared with ",[87,92,93],{},"@hey-api\u002Fopenapi-ts"," 0.99.0, orval 8.44.0, and openapi-typescript 7.13.0. Install size is ",[87,96,97],{},"node_modules"," after a clean ",[87,100,101],{},"npm install"," with the same features.",[73,104,106],{"id":105},"plugin-and-feature-coverage","Plugin and feature coverage",[10,108,109],{},"✅ built in · 🟡 community or separate package · 🔶 needs extra user code · 🛑 not supported",[111,112,113,134],"table",{},[114,115,116],"thead",{},[117,118,119,123,127,129,131],"tr",{},[120,121,122],"th",{},"Feature",[120,124,126],{"style":125},"text-align:center","Kubb",[120,128,17],{"style":125},[120,130,22],{"style":125},[120,132,133],{"style":125},"openapi-ts",[135,136,137,163,179,199,219,236,256,272,291,310,326,342,358],"tbody",{},[117,138,139,146,149,151,153],{},[140,141,142],"td",{},[14,143,145],{"href":144},"\u002Fextensions\u002Fkubb-labs\u002Fadapter-oas","OpenAPI 2.0, 3.0, 3.1 input",[140,147,148],{"style":125},"✅",[140,150,148],{"style":125},[140,152,148],{"style":125},[140,154,155,156],{"style":125},"🔶",[157,158,162],"sup",{"$":159},{"html":160,"block":161},1,0,"1",[117,164,165,171,173,175,177],{},[140,166,167],{},[14,168,170],{"href":169},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-ts","TypeScript types",[140,172,148],{"style":125},[140,174,148],{"style":125},[140,176,148],{"style":125},[140,178,148],{"style":125},[117,180,181,187,189,191,193],{},[140,182,183],{},[14,184,186],{"href":185},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-axios","HTTP client (Axios, Fetch)",[140,188,148],{"style":125},[140,190,148],{"style":125},[140,192,148],{"style":125},[140,194,155,195],{"style":125},[157,196,198],{"$":197},{"html":160,"block":161},"2",[117,200,201,207,209,211,213],{},[140,202,203],{},[14,204,206],{"href":205},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-react-query","React Query hooks",[140,208,148],{"style":125},[140,210,148],{"style":125},[140,212,148],{"style":125},[140,214,215,216],{"style":125},"🟡",[157,217,198],{"$":218},{"html":160,"block":161},[117,220,221,227,229,231,233],{},[140,222,223],{},[14,224,226],{"href":225},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-vue-query","Vue Query composables",[140,228,148],{"style":125},[140,230,148],{"style":125},[140,232,148],{"style":125},[140,234,235],{"style":125},"🛑",[117,237,238,244,246,248,254],{},[140,239,240],{},[14,241,243],{"href":242},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-swr","SWR hooks",[140,245,148],{"style":125},[140,247,148],{"style":125},[140,249,235,250],{"style":125},[157,251,253],{"$":252},{"html":160,"block":161},"3",[140,255,215],{"style":125},[117,257,258,264,266,268,270],{},[140,259,260],{},[14,261,263],{"href":262},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-zod","Zod validation schemas",[140,265,148],{"style":125},[140,267,148],{"style":125},[140,269,148],{"style":125},[140,271,235],{"style":125},[117,273,274,280,282,284,289],{},[140,275,276],{},[14,277,279],{"href":278},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-msw","MSW request handlers",[140,281,148],{"style":125},[140,283,148],{"style":125},[140,285,235,286],{"style":125},[157,287,253],{"$":288},{"html":160,"block":161},[140,290,235],{"style":125},[117,292,293,299,301,303,308],{},[140,294,295],{},[14,296,298],{"href":297},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-faker","Faker.js mock data",[140,300,148],{"style":125},[140,302,148],{"style":125},[140,304,235,305],{"style":125},[157,306,253],{"$":307},{"html":160,"block":161},[140,309,235],{"style":125},[117,311,312,318,320,322,324],{},[140,313,314],{},[14,315,317],{"href":316},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-cypress","Cypress E2E tests",[140,319,148],{"style":125},[140,321,235],{"style":125},[140,323,235],{"style":125},[140,325,235],{"style":125},[117,327,328,334,336,338,340],{},[140,329,330],{},[14,331,333],{"href":332},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-mcp","MCP server",[140,335,148],{"style":125},[140,337,148],{"style":125},[140,339,235],{"style":125},[140,341,235],{"style":125},[117,343,344,350,352,354,356],{},[140,345,346],{},[14,347,349],{"href":348},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-redoc","Redoc API documentation",[140,351,148],{"style":125},[140,353,235],{"style":125},[140,355,235],{"style":125},[140,357,235],{"style":125},[117,359,360,366,368,370,372],{},[140,361,362],{},[14,363,365],{"href":364},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-barrel","Barrel index files",[140,367,148],{"style":125},[140,369,148],{"style":125},[140,371,148],{"style":125},[140,373,235],{"style":125},[375,376,377,380,395],"ol",{},[36,378,379],{},"openapi-typescript reads 3.0 and 3.1 only. Convert Swagger 2.0 first.",[36,381,382,383,386,387,390,391,43],{},"openapi-typescript generates types only. Clients and hooks come from the ",[87,384,385],{},"openapi-fetch"," and ",[87,388,389],{},"openapi-react-query"," runtimes, both in ",[14,392,394],{"href":393},"https:\u002F\u002Fgithub.com\u002Fopenapi-ts\u002Fopenapi-typescript\u002Fdiscussions\u002F2559","maintenance mode",[36,396,397],{},"HeyAPI lists SWR as planned and MSW and Faker as in progress.",[73,399,401],{"id":400},"type-safety-and-response-handling","Type safety and response handling",[10,403,404],{},"openapi-typescript ships no generated client, so it is left out of this table and the next one.",[111,406,407,419],{},[114,408,409],{},[117,410,411,413,415,417],{},[120,412,122],{},[120,414,126],{"style":125},[120,416,17],{"style":125},[120,418,22],{"style":125},[135,420,421,441,452,466,487,503,516],{},[117,422,423,429,431,436],{},[140,424,425],{},[14,426,428],{"href":427},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Ferror-handling","Status-discriminated response result",[140,430,148],{"style":125},[140,432,155,433],{"style":125},[157,434,162],{"$":435},{"html":160,"block":161},[140,437,155,438],{"style":125},[157,439,198],{"$":440},{"html":160,"block":161},[117,442,443,446,448,450],{},[140,444,445],{},"Multiple success (2xx) responses",[140,447,148],{"style":125},[140,449,148],{"style":125},[140,451,148],{"style":125},[117,453,454,457,459,461],{},[140,455,456],{},"Multiple content types per response",[140,458,148],{"style":125},[140,460,148],{"style":125},[140,462,235,463],{"style":125},[157,464,253],{"$":465},{"html":160,"block":161},[117,467,468,481,483,485],{},[140,469,470,473,474,18,477,480],{},[87,471,472],{},"default"," and wildcard (",[87,475,476],{},"4XX",[87,478,479],{},"5XX",") responses",[140,482,148],{"style":125},[140,484,148],{"style":125},[140,486,148],{"style":125},[117,488,489,494,496,501],{},[140,490,491],{},[14,492,493],{"href":427},"Typed error responses",[140,495,148],{"style":125},[140,497,155,498],{"style":125},[157,499,162],{"$":500},{"html":160,"block":161},[140,502,148],{"style":125},[117,504,505,510,512,514],{},[140,506,507],{},[14,508,509],{"href":427},"Throw or return the error per call",[140,511,148],{"style":125},[140,513,235],{"style":125},[140,515,148],{"style":125},[117,517,518,523,525,527],{},[140,519,520],{},[14,521,522],{"href":262},"Zod v4 schemas tied to the types",[140,524,148],{"style":125},[140,526,148],{"style":125},[140,528,148],{"style":125},[375,530,531,538,549],{},[36,532,533,534,537],{},"Only orval's ",[87,535,536],{},"fetch"," client returns a status union and a typed error body. Its axios and query clients return the success type.",[36,539,540,541,544,545,548],{},"HeyAPI returns ",[87,542,543],{},"{ data, error }"," with no ",[87,546,547],{},"status"," to switch on.",[36,550,551],{},"HeyAPI 0.99.0 keeps only the JSON shape when a response also offers XML.",[73,553,555],{"id":554},"client-runtime","Client runtime",[10,557,558,559,563],{},"See ",[14,560,562],{"href":561},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization","serialization"," for Kubb's runtime contract.",[111,565,566,578],{},[114,567,568],{},[117,569,570,572,574,576],{},[120,571,122],{},[120,573,126],{"style":125},[120,575,17],{"style":125},[120,577,22],{"style":125},[135,579,580,600,615,630,647],{},[117,581,582,588,590,595],{},[140,583,584],{},[14,585,587],{"href":586},"\u002Fdocs\u002F5.x\u002Freference\u002Fserialization#parameter-styles","Parameter styles from the spec",[140,589,148],{"style":125},[140,591,155,592],{"style":125},[157,593,162],{"$":594},{"html":160,"block":161},[140,596,155,597],{"style":125},[157,598,198],{"$":599},{"html":160,"block":161},[117,601,602,609,611,613],{},[140,603,604,605,608],{},"OpenAPI ",[87,606,607],{},"encoding"," object for form bodies",[140,610,148],{"style":125},[140,612,235],{"style":125},[140,614,235],{"style":125},[117,616,617,624,626,628],{},[140,618,619,623],{},[14,620,622],{"href":621},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserialization#encode-request-bodies","Pluggable codecs per media type"," (XML, YAML)",[140,625,148],{"style":125},[140,627,235],{"style":125},[140,629,235],{"style":125},[117,631,632,638,640,645],{},[140,633,634],{},[14,635,637],{"href":636},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Ferror-handling#validation-failures","Runtime request and response validation",[140,639,148],{"style":125},[140,641,155,642],{"style":125},[157,643,253],{"$":644},{"html":160,"block":161},[140,646,148],{"style":125},[117,648,649,655,657,659],{},[140,650,651],{},[14,652,654],{"href":653},"\u002Fextensions\u002Fkubb-labs\u002Fplugin-fetch\u002Fguides\u002Fserver-sent-events","Server-sent events",[140,656,148],{"style":125},[140,658,235],{"style":125},[140,660,148],{"style":125},[375,662,663,674,677],{},[36,664,533,665,667,668,386,671,43],{},[87,666,536],{}," client reads ",[87,669,670],{},"style",[87,672,673],{},"explode",[36,675,676],{},"HeyAPI uses one global query serializer and does not style header or cookie parameters.",[36,678,679],{},"orval validates responses only, with Zod. Kubb accepts any Standard Schema validator (Zod, Valibot, ArkType).",[73,681,70],{"id":682},"kubb-studio",[10,684,685,688],{},[14,686,70],{"href":687},"https:\u002F\u002Fkubb.studio"," is the web IDE for Kubb. It runs the generator through an agent on your machine, and the agent never uploads your spec file. orval, HeyAPI, and openapi-typescript have no equivalent for the features below.",[33,690,691,698,701,708,715,721],{},[36,692,693,697],{},[14,694,696],{"href":695},"\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 instead of guessing endpoints (Pro plan).",[36,699,700],{},"One AI plugin marketplace and shared agents for the whole team.",[36,702,703,707],{},[14,704,706],{"href":705},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio#review-and-save-generated-files","Review added, changed, and removed files"," before you save them.",[36,709,710,711,714],{},"Edit ",[87,712,713],{},"kubb.config.ts"," from the browser.",[36,716,717,43],{},[14,718,720],{"href":719},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgithub-actions","An installable snapshot for every pull request",[36,722,723],{},"Try it in the browser without installing anything.",[10,725,726,727,731],{},"To try the others without installing them, orval has a ",[14,728,730],{"href":729},"https:\u002F\u002Forval.dev\u002Fplayground","playground"," and HeyAPI has a StackBlitz demo.",[73,733,735],{"id":734},"when-not-to-use-kubb","When not to use Kubb",[33,737,738,741,744],{},[36,739,740],{},"You use only a few endpoints that rarely change.",[36,742,743],{},"You have no OpenAPI spec and won't write one.",[36,745,746],{},"You need a non-OpenAPI format now and won't write a custom adapter.",{"title":748,"searchDepth":749,"depth":749,"links":750},"",5,[751,753,754,755,756,757],{"id":75,"depth":752,"text":76},2,{"id":105,"depth":752,"text":106},{"id":400,"depth":752,"text":401},{"id":554,"depth":752,"text":555},{"id":682,"depth":752,"text":70},{"id":734,"depth":752,"text":735},"Compare Kubb with orval, HeyAPI, and openapi-typescript on speed, memory, install size, generated outputs, type safety, client runtime, and Kubb Studio.","md",{"layout":761,"title":5,"description":758,"outline":762,"order":763,"navigation":764},"doc",[752,763],3,{"title":765,"icon":766},"Comparison","i-iconoir-mirror",{"layout":761,"outline":768},[752,763],{"title":765,"icon":766},"\u002Fdocs\u002F5.x\u002Fexplanation\u002Fcomparison",{"title":5,"description":758},{"loc":770},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fexplanation\u002Fcomparison.md","docs\u002F5.x\u002Fexplanation\u002Fcomparison","rZUxx_AhbjA1HIpzPugw-aAANlJWAMNxW7lqs3wjOXs",1792931639774]