{"id":884,"date":"2025-05-20T09:53:17","date_gmt":"2025-05-20T16:53:17","guid":{"rendered":"https:\/\/embedded.gusto.com\/blog\/?p=884"},"modified":"2025-05-20T09:55:00","modified_gmt":"2025-05-20T16:55:00","slug":"api-client-libraries","status":"publish","type":"post","link":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/","title":{"rendered":"Accelerating Your Payroll Launch: Gusto Embedded&#8217;s New Auto-Generated API Client Libraries"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Gusto Embedded is focused on building the most developer-friendly payroll APIs, and we&#8217;re always looking for ways to improve the experience. This blog post is about a major API infrastructure project we&#8217;ve been working on to reduce time to launch, ensure partners build a more bug-free embedded payroll experience, and get new API features into partner engineers\u2019 hands faster.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To accomplish this, we partnered with <\/span><a href=\"https:\/\/www.speakeasy.com\/\"><span style=\"font-weight: 400;\">Speakeasy<\/span><\/a><span style=\"font-weight: 400;\"> to automatically generate API client libraries from our OpenAPI spec in some of the top languages our partners use to build embedded payroll. By replacing a critical step that every partner takes in the development process, we aimed to remove weeks of upfront build time, and to reduce the ongoing maintenance cost of custom client libraries. We\u2019ve automated an extremely manual and error-prone process for both our partner developers and our internal consumers of the API, such as the <\/span><a href=\"https:\/\/docs.gusto.com\/embedded-payroll\/docs\/what-is-the-gep-react-sdk\"><span style=\"font-weight: 400;\">React SDK<\/span><\/a><span style=\"font-weight: 400;\">. And we\u2019ve matured as a team in how we maintain the accuracy of our OpenAPI specs and documentation, growing partner trust as they build with our technology.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Build vs Buy: How we decided<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Before we even started to generate any code, we explored all possible options, building proofs of concept in a variety of tools and doing in-depth research on the features offered by several different vendors. First, we examined a few popular open source tools, such as <\/span><a href=\"https:\/\/github.com\/OpenAPITools\/openapi-generator\"><span style=\"font-weight: 400;\">OpenAPI Generator<\/span><\/a><span style=\"font-weight: 400;\">, that would enable the most flexibility in generating code. Then we compared those with vendors that provide code generation out of the box along with the broad language expertise required to make the project successful.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To bring this powerful automation to partners swiftly and effectively, we made the strategic decision to integrate with a leading vendor in this space rather than undertaking a full in-house build. This allows our team to laser-focus on ensuring the automation works seamlessly within our system and delivers maximum value to our partners quickly. Building and maintaining a robust code-generation pipeline across multiple languages would have diverted significant resources, and our priority was to make this new automation a core strength of our platform, not a side project. A partnership allows us to leverage expertise to deliver a polished and reliable solution immediately.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Enter <\/span><a href=\"https:\/\/www.speakeasy.com\/\"><span style=\"font-weight: 400;\">Speakeasy<\/span><\/a><span style=\"font-weight: 400;\">, which we chose for several reasons: the great UX of their command line and CI tools, their willingness to partner with us to drive the development of their Ruby code generator, and their strong commitment to OpenAPI standards over proprietary configurations.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Scaling the Impact of our OpenAPI specs with Speakeasy<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Working with a company like Speakeasy has allowed us to quickly (in a matter of weeks!) generate and distribute libraries in languages that our partners rely on, like C# and Java, but that we have little experience with internally. With Speakeasy, we not only get client and type generation, but also documentation, code snippets, and runtime validation of inputs and outputs to the API\u2014features that could\u2019ve taken us years to build internally, even in just one or two languages.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To ensure partners always have access to the latest features of our API through these client libraries, we implemented a new set of build pipelines to check for changes to our OpenAPI spec, and generate changes to each client library on a nightly basis. After an engineer checks those code changes using the typical Github pull request review process, the changes are automatically released and distributed via the common package management tool for each language.<\/span><\/p>\n<p><b><img decoding=\"async\" class=\"alignnone size-full wp-image-885 lazyload\" data-src=\"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1.png\" alt=\"api clients\" width=\"4430\" height=\"2010\" data-srcset=\"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1.png 4430w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-425x193.png 425w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-1200x544.png 1200w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-150x68.png 150w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-768x348.png 768w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-1536x697.png 1536w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-2048x929.png 2048w, https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/emb-DevBlog-Diagram-APIClients-1-1400x635.png 1400w\" data-sizes=\"(max-width: 4430px) 100vw, 4430px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 4430px; --smush-placeholder-aspect-ratio: 4430\/2010;\" \/><\/b><\/p>\n<h2><span style=\"font-weight: 400;\">The Results: New API Clients, a Better Overall API, and a Better React SDK<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">One of the most exciting and unforeseen effects we\u2019ve found in using these generated API clients is that our OpenAPI specification is in <\/span><b>much<\/b><span style=\"font-weight: 400;\"> better shape now. Working with Gusto Embedded\u2019s React SDK team, we were able to dogfood the generated API clients, and uncovered some of the more nuanced errors in our OpenAPI spec. This is critical feedback that we\u2019ve previously only been able to get when external partners report bugs to us. Since the OpenAPI spec is now the source of truth for both our documentation site and our generated client libraries, these improvements to the OpenAPI spec driven by API client usage directly lead to improvements in our documentation, making both much more accurate.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We&#8217;re still in beta, so the partners using our API clients aren&#8217;t live yet, but we&#8217;re already seeing improvements in their development speed. We&#8217;re confident partners using our API clients will be able to launch their payroll products faster, and we\u2019ll continue to work closely with<\/span> <span style=\"font-weight: 400;\">our partner developers to drive adoption of these libraries and gather feedback to improve the usability of our generated code.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So far we\u2019ve gathered largely positive feedback from Gusto Embedded\u2019s React SDK team. After migrating their system to use our new auto-generated Typescript library, they now barely have to think about the API layer when building new features. They used to have to spend time iterating on our OpenAPI spec before managing their own partially generated and partially hand-written client code, but that entire stream of work has been abstracted away, speeding up the time to deliver each new component, allowing them to dedicate more energy to building reliable React components that meet their users\u2019 needs.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">What\u2019s next<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">If your team is maintaining your own bespoke API client, or beginning to evaluate <a href=\"https:\/\/embedded.gusto.com\/developers\">partners for implementing embedded payroll<\/a>, consider using one of the <\/span><a href=\"https:\/\/docs.gusto.com\/embedded-payroll\/docs\/api-clients\"><span style=\"font-weight: 400;\">API clients<\/span><\/a><span style=\"font-weight: 400;\"> we offer! We are currently looking for partners who are willing to work closely with us and provide feedback on our auto-generated client libraries while also speeding up their build times. As this project is in beta, we are actively making improvements and any feedback from your team will be instrumental in this project\u2019s development.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gusto Embedded is focused on building the most developer-friendly payroll APIs, and we&#8217;re always looking for ways to improve the&#8230;<\/p>\n","protected":false},"author":28,"featured_media":886,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-884","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-perspective"],"acf":{"exclude_from_embedded_resources":false,"popularity":0,"essentiality":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Accelerating Your Payroll Launch: Gusto Embedded&#039;s New Auto-Generated API Client Libraries - Embedded Blog<\/title>\n<meta name=\"description\" content=\"New API client libraries make launching embedded payroll faster than ever, with auto-updated libraries in Typescript, Java, Python, Ruby, and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Accelerating Your Payroll Launch: Gusto Embedded&#039;s New Auto-Generated API Client Libraries - Embedded Blog\" \/>\n<meta property=\"og:description\" content=\"New API client libraries make launching embedded payroll faster than ever, with auto-updated libraries in Typescript, Java, Python, Ruby, and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/\" \/>\n<meta property=\"og:site_name\" content=\"Embedded Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-20T16:53:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-20T16:55:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header-1120x630.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1120\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron Rosen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron Rosen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Accelerating Your Payroll Launch: Gusto Embedded's New Auto-Generated API Client Libraries - Embedded Blog","description":"New API client libraries make launching embedded payroll faster than ever, with auto-updated libraries in Typescript, Java, Python, Ruby, and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/","og_locale":"en_US","og_type":"article","og_title":"Accelerating Your Payroll Launch: Gusto Embedded's New Auto-Generated API Client Libraries - Embedded Blog","og_description":"New API client libraries make launching embedded payroll faster than ever, with auto-updated libraries in Typescript, Java, Python, Ruby, and more.","og_url":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/","og_site_name":"Embedded Blog","article_published_time":"2025-05-20T16:53:17+00:00","article_modified_time":"2025-05-20T16:55:00+00:00","og_image":[{"width":1120,"height":630,"url":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header-1120x630.png","type":"image\/png"}],"author":"Aaron Rosen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Aaron Rosen","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#article","isPartOf":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/"},"author":{"name":"Aaron Rosen","@id":"https:\/\/embedded.gusto.com\/blog\/#\/schema\/person\/a3d39f7988ce3a1de5ea555cf53eed4b"},"headline":"Accelerating Your Payroll Launch: Gusto Embedded&#8217;s New Auto-Generated API Client Libraries","datePublished":"2025-05-20T16:53:17+00:00","dateModified":"2025-05-20T16:55:00+00:00","mainEntityOfPage":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/"},"wordCount":977,"image":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#primaryimage"},"thumbnailUrl":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header.png","articleSection":["Developer Perspective"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/","url":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/","name":"Accelerating Your Payroll Launch: Gusto Embedded's New Auto-Generated API Client Libraries - Embedded Blog","isPartOf":{"@id":"https:\/\/embedded.gusto.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#primaryimage"},"image":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#primaryimage"},"thumbnailUrl":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header.png","datePublished":"2025-05-20T16:53:17+00:00","dateModified":"2025-05-20T16:55:00+00:00","author":{"@id":"https:\/\/embedded.gusto.com\/blog\/#\/schema\/person\/a3d39f7988ce3a1de5ea555cf53eed4b"},"description":"New API client libraries make launching embedded payroll faster than ever, with auto-updated libraries in Typescript, Java, Python, Ruby, and more.","breadcrumb":{"@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#primaryimage","url":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header.png","contentUrl":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header.png","width":3840,"height":2160,"caption":"faster payroll launches with API clients"},{"@type":"BreadcrumbList","@id":"https:\/\/embedded.gusto.com\/blog\/api-client-libraries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/embedded.gusto.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Accelerating Your Payroll Launch: Gusto Embedded&#8217;s New Auto-Generated API Client Libraries"}]},{"@type":"WebSite","@id":"https:\/\/embedded.gusto.com\/blog\/#website","url":"https:\/\/embedded.gusto.com\/blog\/","name":"Embedded Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/embedded.gusto.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/embedded.gusto.com\/blog\/#\/schema\/person\/a3d39f7988ce3a1de5ea555cf53eed4b","name":"Aaron Rosen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/aaron-rosen-1-150x150.jpeg","url":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/aaron-rosen-1-150x150.jpeg","contentUrl":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/aaron-rosen-1-150x150.jpeg","caption":"Aaron Rosen"},"description":"Aaron is a Senior software engineer on Gusto Embedded\u2019s API Infrastructure team. He is passionate about building systems to enable our engineering team to better maintain our documentation. Outside of Gusto, Aaron loves to spend time outdoors, hiking, skiing and cycling.","url":"https:\/\/embedded.gusto.com\/blog\/author\/aaron-rosen\/"}]}},"images":{"large":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/EMB-blog-acceleratingpayroll-header-1120x630.png"},"authorDetails":{"id":28,"name":"Aaron Rosen","avatar":"https:\/\/embeddedblog.wpengine.com\/wp-content\/uploads\/2025\/05\/aaron-rosen-1-150x150.jpeg"},"_links":{"self":[{"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":0,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/media\/886"}],"wp:attachment":[{"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded.gusto.com\/blog\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}