{"by":"DavidHaerer","descendants":4,"id":37946266,"kids":[37948207,37948579,37950182,37948971],"score":32,"text":"I&#x27;ve built this PWA to use ChatGPT by API.<p>My main motivation was to use the API since it is much cheaper than the premium plan and I only pay for usage. The main inspiration was ChatGPT-web by Niek [1], but I was lacking time to dig into the code base to make changes.\nHence I went for a lightweight approach with Alpine.js and Open Props. There is no build step, the dependencies are fetched via CDN.<p>In general it was much fun to work with Alpine.js - being a parent means having very little time. So it was great to not have to invest 20h into learning a new framework. My main ask was something that gives me data binding and does not require a build step. Alpine.js was the perfect fit!<p>A hacky bit I&#x27;m proud of is the dynamic loading of languages for syntax highlighting with highlight.js :)<p>Feel free to fork, adapt and host for yourself!","time":1697738580,"title":"Show HN: ChatAPI – PWA to Use ChatGPT by API","type":"story","url":"https://github.com/david-haerer/chatapi"}