openai/openai-fm: the Next.js demo behind openai.fm
Code for openai.fm, a demo for the OpenAI Speech API
At a glance
- What is it?
- The openai.fm repository is the MIT-licensed Next.js app that OpenAI uses to demonstrate its Speech API. It is a reference front end, not a product, and the README says so by calling it an interactive demo.
- Who is it for?
- Adopt it if you want a working Next.js reference for the Speech API, or a base you can strip down for an internal voice tool. Do not adopt it if you expect a hosted product with accounts, quotas or a stable public API surface: it is a demo, it is private in package.json, and the README states you are responsible for any usage your OpenAI API key incurs on a public server.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 7 months ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What openai.fm actually is, and who the repository is for
openai.fm is the public site; openai/openai-fm is its source. The README describes the project as "an interactive demo to showcase the new OpenAI text-to-speech models", built with Next.js and the Speech API. That framing matters more than it looks. The repository is not a library, not a CLI, and not a self-hostable replacement for the hosted demo. It is the front end plus the route handlers that turn typed text into audio and stream it back to the browser.
The audience is narrow and fairly specific. You are a developer who wants to see how a production-quality Next.js app wires up the Speech API: which controls are exposed, how audio playback is handled, how the request payload is shaped. Or you are someone building an internal tool for reading drafts aloud and you would rather start from a known-good front end than write the audio plumbing yourself. The README also welcomes issues and pull requests, with the caveat that the maintainers "may not review all suggestions", which is an honest description of how much external contribution to expect.
If you arrived looking for a downloadable voice generator, this is the wrong repository. There is no packaged binary, no APK, and no released artifact. The only distribution channel the README gives is cloning the source.
How the demo is put together: Next.js, a Speech API call, and optional Postgres
The architecture visible in the repository is a single Next.js application. package.json lists Next.js 15, React 19, TypeScript 5, Tailwind 4, and a set of UI dependencies that hint at the shape of the interface: Radix primitives for switches and toasts, react-hook-form for input handling, zustand and immer for client state, wavesurfer.js for waveform rendering, and CodeMirror packages for an in-browser editor.
The data flow is the part worth understanding before you fork anything. The browser collects text and voice settings, posts them to a Next.js route handler running on the server, and that handler calls the OpenAI Speech API using the key from the server environment. The audio comes back to the client, where wavesurfer.js draws it. Keeping the key server-side is the reason the app is structured this way rather than calling the API directly from the browser.
The sharing feature is deliberately decoupled. The README states that connecting a hosted Postgres database is optional, "and only affects the sharing feature". .env.example lists the connection variables, including POSTGRES_URL, POSTGRES_PRISMA_URL, POSTGRES_URL_NON_POOLING, POSTGRES_USER, POSTGRES_HOST, POSTGRES_PASSWORD and POSTGRES_DATABASE, most of them pre-shaped for a pooled serverless Postgres provider with sslmode=require. The @vercel/postgres dependency in package.json is consistent with that. The lz-string dependency suggests share payloads are compressed before they are stored or put in a URL, though the README does not document the sharing format.
Installing openai-fm and generating your first clip
The README gives a linear setup. Start by cloning the repository and moving into it. Note that the project is not published to npm under this name for consumption as a dependency; you run it from source.
git clone https://github.com/openai/openai-fm.git
cd openai-fmYou need an OpenAI API key. The README points to the platform signup and quickstart pages for obtaining one, and offers two ways to supply it: export OPENAI_API_KEY globally in your system, or create a .env file at the project root. The second option is what most people will do, and .env.example is the reference for the file's shape.
OPENAI_API_KEY=<your_api_key>Install dependencies from the project root, then start the dev server. The dev script uses Turbopack, which is why startup is fast on a cold cache.
npm install
npm run devThe README states the app will be available at http://localhost:3000. Open that address, type a sentence into the editor, pick a voice, and submit. Audio should play back in the page with a waveform drawn by wavesurfer.js. If you get an authentication error instead, the key is missing from the environment the Next.js server process sees, not from your shell history.
For a production build, the package scripts are the standard Next.js trio: npm run build followed by npm run start. The README does not document any deployment-specific configuration beyond the environment variables, and it does not describe a Docker image or a one-click deploy button.
The sharing feature and the database you may not need
Sharing is the only part of the app that touches a database, and the README is explicit that it is optional. If you skip it, the app still runs; you simply lose the ability to persist or hand off generated clips.
If you do want it, you connect a hosted Postgres instance and set the variables in .env.example. The example file is written for a managed provider: POSTGRES_URL carries sslmode=require, POSTGRES_PRISMA_URL adds pgbouncer=true and connect_timeout=15, and there is a separate POSTGRES_URL_NON_POOLING for connections that cannot go through a pooler. That split is a real operational detail. Pooled connections are fine for the request-per-page pattern of a Next.js app, but anything that needs a session-level connection has to use the non-pooling URL.
The README does not document the schema, migrations, or how share records are keyed. There is no migrations directory in the top-level listing, and no Prisma schema file is listed either, despite the POSTGRES_PRISMA_URL variable name. If you plan to run sharing in production, treat schema discovery as work you have to do by reading the source under src/, not something the documentation will hand you.
Where openai-fm is the wrong tool
The clearest limitation is stated by the project itself: if you deploy this to a public server, "you are responsible for any usage it may incur using your OpenAI API key". There is no built-in rate limiting, no per-user quota, and no authentication layer described in the README. A public deployment with an unrestricted key is an open proxy to your OpenAI billing. That is not a bug in the demo; it is the boundary of what a demo is for.
The second limitation is maintenance. The last push to the repository was on 2026-03-03, which is more than six months before today. The README notes that the maintainers may not review all suggestions, and no releases have been published. Dependencies are pinned with carets, so a fresh npm install will pull newer minor versions of Next.js, React and the Radix packages than the authors last ran. That is a normal risk for a demo repository and an unusual one for something you intend to operate.
The third is scope. There is no API surface to integrate against, no SDK, and no CLI. If your requirement is a voice generator you can call from a script or embed in another product, this repository gives you a user interface, not a service. You would be extracting the route handler and rebuilding the rest.
How it compares to running your own TTS stack
The obvious alternative is a self-hosted text-to-speech engine, and the difference is where the work sits. A local engine such as Piper or Coqui TTS runs the model on your own hardware. You pay in GPU or CPU time, you own the weights, and you can run it with no network access and no per-character cost. You also own voice quality tuning, model updates, and the latency of synthesizing on your own machine.
openai-fm takes the opposite position on every one of those axes. Inference happens at OpenAI, so there is nothing to host beyond the Next.js app, and quality tracks whatever the hosted models do. In exchange you need an API key, a network path to the API, and a budget that scales with usage. The app itself is thin: a form, a route handler, and a waveform.
A second comparison is against writing the front end yourself. The Speech API is a single HTTP call, and a minimal client is not much code. What you get from this repository is the accumulated detail around that call: the voice and format controls, the editor, the playback UI, and the optional share flow. Whether that is worth forking depends on how much you care about the interface. If you only need audio files, you do not need this repository at all.
Licence, upgrade cost, and what the MIT grant does not cover
The repository is MIT licensed, and the README points to the LICENSE file. MIT is permissive: you can use, modify and redistribute the code, including commercially, provided the copyright notice and permission notice are retained. That covers the source in this repository.
It does not cover the API. Calls to the OpenAI Speech API are governed by OpenAI's own terms and pricing, not by the MIT licence on this demo, and the README's warning about usage incurred by your key is the practical expression of that split. Nothing here is legal advice; if you are deploying commercially, read both the LICENSE file and the API terms.
Upgrade cost is the quieter issue. With no published releases, there is no changelog to read and no version to pin against. Upgrading means pulling main and reconciling whatever changed, and the last push was on 2026-03-03, so there is no evidence of a maintenance cadence to plan around. For a demo you run locally this is fine. For something you operate, budget for owning the dependency updates yourself.
Editorial conclusion
Adopt it if you want a working Next.js reference for the Speech API, or a base you can strip down for an internal voice tool. Do not adopt it if you expect a hosted product with accounts, quotas or a stable public API surface: it is a demo, it is private in package.json, and the README states you are responsible for any usage your OpenAI API key incurs on a public server. Before you deploy, verify three things in your own checkout: that OPENAI_API_KEY is set in the environment rather than committed, that POSTGRES_URL is connected only if you actually want the sharing feature, and that the Next.js version in package.json is one you are willing to patch yourself, since no releases are published for this repository.
Frequently asked questions
Is openai.fm free to use?
The hosted site at openai.fm is a demo, and the source repository is MIT licensed, so the code costs nothing. Running your own copy is not free in practice, because every generation calls the OpenAI Speech API with your key and the README states you are responsible for the usage that key incurs.
Is openai.fm released?
The site is live at openai.fm and the code is public on GitHub, but no releases are published for the repository. Distribution is by cloning the source, and package.json marks the package as private.
How do I install openai-fm?
Clone the repository, set OPENAI_API_KEY either globally or in a .env file at the project root, run npm install, then npm run dev. The README states the app will be available at http://localhost:3000.
How do I set up openai-fm with a database?
Connecting a hosted Postgres database is optional and only affects the sharing feature. If you want sharing, set the variables shown in .env.example, including POSTGRES_URL, in a .env file at the project root. The README does not document the schema.
Why is openai-fm not working?
The most common cause is a missing or unreadable OPENAI_API_KEY in the server environment, since the route handler needs it to reach the Speech API. The README does not document a troubleshooting section, so check the environment variables first.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/openai-openai-fm)
Community notes