There are some libcurl-using C++ implementations out there floating around on GitHub you could probably wrap to work with a straight C API. Most didn't support streaming partial results last time I looked for ChatCompletion, but it's not a huge effort to add that if you really need it.