openai-cpp and liboai
These are direct competitors offering similar C++ bindings for the OpenAI API, with liboai being more actively maintained (higher star count) and explicitly targeting C++17 while openai-cpp lacks version specification.
About openai-cpp
olrea/openai-cpp
OpenAI C++ is a community-maintained library for the Open AI API
This is a C++ library that allows C++ developers to easily integrate OpenAI's artificial intelligence capabilities directly into their applications. You provide C++ code with instructions for what AI model to use and what task to perform (like generating text or images), and the library returns the AI's output, such as generated text or an image URL. C++ software engineers building applications that need to leverage OpenAI's powerful models would use this.
About liboai
D7EAD/liboai
A C++17 library to access the entire OpenAI API.
Covers ChatGPT, audio transcription, image generation, embeddings, fine-tuning, and moderation endpoints with asynchronous support. Built as a spiritual port of OpenAI's Python library using cURL and nlohmann-json for HTTP requests and JSON serialization. Mirrors Python API conventions for familiar developer experience across languages.
Scores updated daily from GitHub, PyPI, and npm data. How scores work