Comparison of fancy SDK generators
Posted by RogerFedererFTW@reddit | ExperiencedDevs | View on Reddit | 8 comments
For context, i work in a scaleup as a senior swe. We're building an API and we were annoyed with the openapi generator, and recently I had the opportunity to try out 3 of the fancy SDK generators. fern, speakeasy and stainless. I didn't see a a lot of third party comparisons/reviews. So i'm writing up a quick one, mostly for my own memory and thought some of you guys would find it interesting.
We are on openapi, and needed typescript and ideally docs.
Stainless setup was not very easy. Their frontend dashboard actually gave a nextjs pplication error a client-side exception has occurred which was funny to see, but the studio was useful. Weirdly they are not openapi from the start, we had to patch their dsl protocol, it took a bit. Their TypeScript implementation provides good type hints. CI/CD pipelines were ok, though we had to do some stuff with oath (retries, lifecycle mgment etc) ourselves. The main negative though were their docs, Just a bit of mess imo. It feels like they only care about their 2/3 big customers like Openai, it doesnt look like a service that wants you to use it as easily as possible.
Fern is all around very decent. The setup is very smooth, their type validation good. Their CLI also decent. But maybe im getting old, but i didnt like that there was no UI, it took a bit of context switching time time over the week i tested it to remember where i was i etc. They generate unit tests automatically Also, there are no docs or tools for CI/CD, which was weird. All around it was a good experience. Minor thing, we kind of need react hooks and their was no support for that.
Speakeasy was very interesting. Their CLI setup was very smooth. It did take a couple of more seconds to customize, but i liked it. Their CI/CD tools and publishing were very easy. Their UI is also great, can see easily the errors and iterate. Their typescript is also great, react hooks, good oauth and i found their type validation the strictest. Their documentation was also by far the best, it was very easy to get a feel of what i need to do next and how to do it. Only negative is that they don't unit test generation, but contracts. We use contract tests anyway because our api logic isnt complex so that was good as well. Our Their generated file structure is also flat, but if anything i prefer it, much easy to know where everything is, but maybe some of you prefer nested. Their doc generation was decent.
In the end we went with Speakeasy. Tbh all three felt good enough to deploy in production in a 3-4 weeks or so. All three had good support, especially fern and speakeasy. And definitely worth using over openapi-gen, it honestly saved us a lot of time. They are not cheap tbh, but considering the mental burden of tinkering with openapi it's definetely worth it.
lukeocodes@reddit
We use Fern at Deepgram. The CLI is very pure, sticking to flows that can be used in CI. I'd love to see it take some tips from Fly.io where advanced config can be opened in the web to complete.
If you're self-serve, Fern would be brilliant. We've had a little dip in productivity moving to generated SDKs, as both sides struggled with other projects. But mostly, we're slowly making progress.
HUGE plus for Fern is the WebSocket support. It's not even on the mind of other generators, and as the web is becoming more real-time, this will be important for product teams to consider.
videosdk_live@reddit
Totally agree—Fern’s WebSocket support is a big win. Most generators treat real-time like an afterthought, which feels a bit 2015. The CLI-first approach is awesome for CI/CD, but yeah, a web config UI like Fly.io’s would be super handy for edge cases or onboarding new folks. We hit similar productivity dips when shifting to generated SDKs, but the long-term payoff usually makes up for the initial pain. If you’re deep into real-time, definitely keep an eye on how SDKs handle streaming and reconnections, not just base WebSocket support.
mouse_reader@reddit
Hey, thanks for the writeup! I work at Stainless.
I definitely agree our self-service experience has not been what we want it to be. We really do want you to use it as easily as possible, though that hasn't been the case!
I'm not sure when you gave it a spin, but we've shipped a ton of improvements to the UX here over the last few weeks and overhauled part of the docs yesterday. There's still a lot more to do, and we're working hard on it.
Anyway, thanks for sharing your experience and glad you found a solution that's working well for your needs!
CoverGuy0101@reddit
Hey u/mouse_reader, Im going through the same evaluation process right now. I remember reading about stainless when you just got started and it looked really cool. I do have to say I find the UX really hard. Im looking into Fern and Speakeasy as well and it's a lot more intuitive with them. I'm sure the studio can do a lot, but there's just too much there and not a lot of context. Im not even sure what Im supposed to do there.
dak52@reddit
Fern is definitely very easy to setup. I used to work at Sayari and built the first pass of our docs site/SDKs in a couple weeks. The fern platform also lends itself to automations, so it was pretty easy for me to create bunch of CI tooling to automatically keep our docs site and SDKs up to date without requiring developers to actually stay on top of maintaining it. That last part may or may not be feasible depending on the nature of your codebase, but at the end of the day, it was a great tool for us and has even been able to keep things maintained after I left the company and ownership of the docs site passed to a non-technical team.
Asleep_Beyond1371@reddit
I'm a founder of [Tesseral](https://tesseral.com), and we also maintain a separate OSS project [SSOReady](https://ssoready.com). For both, we use Fern. We've had a very good experience. We're a very demanding customer and have very high standards; we've broadly been pleased with the code quality and support that we've gotten. The docs product is reasonably solid, and it comes with good API documentation.
We evaluated all of the above vendors, and I think all were basically pretty good. If I recall correctly, Fern is the most expensive option -- and has the most enterprise-y, hands-on onboarding -- but this is something where we don't mind investing money and time. It's part of our core product experience.
Our evaluation reduced to our opinion of code quality for our Go SDKs. (It's the framework / language our team knows best, and so it was a reasonably good proxy for overall quality.) Fern won largely because we got a Go SDK that looked very sound.
Over_Picture4705@reddit
Speakeasy’s CLI setup is awesome!
logscoree@reddit
This is a great insight. I've had a lot of pains with the OpenAPI generator. I thought maybe I was the problem and so went on hacking at it, but it really didn't work out. It turns out so many other people felt the same way.
We had a use case that really wasn't that complex, but required a lot of state management, some websockets and custom business logic beyond just http requests. We found that none of the fancier ones could help us. Even hacking it to our uses was pointless because those changes are completely overwritten on the next pull request.
We did use it on a simpler internal API and they work really well at wrapping those endpoints, but we just felt that they lacked for complex implementations. There was a lot to love that OP definitely hit on. We liked the CLI implementation with Stainless and Fern, and configuring was generally smooth with all of them (though i really hate the vendor lock-in of their own versions of an OpenAPI spec)
Eventually, my co-founder and I decided to fix this issue and we started borea.dev, an open source company to hit on that sweet spot of generating type safe handlers, models and docs, while being able to implement custom logic and middleware. Check out out github repo. We just launched our python generator and are building in public!