Discussions
C++ API Intergration
Even using the API guide I can't get the image generation to take the style and layout elements, by take I mean have an impact on the image generated right now they just use default values like PAINTING and SQUARE. My code looks like this:
(I will take all other elements like amount and model)
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.neural.love/v1/ai-art/generate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/json");
headers = curl_slist_append(headers, "content-type: application/json");
headers = curl_slist_append(headers, "authorization: Bearer v1.xxx");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{"style":"CYBERPUNK","layout":"HORIZONTAL","amount":4,"isPublic":true,"isPriority":false,"isHd":false,"model":"default","steps":30,"cfgScale":7.5,"autoClean":false,"prompt":"a cat"}");
CURLcode ret = curl_easy_perform(hnd);