#pragma once
#include "AiDemoTypes.h"

class AiHttpClient
{
public:
    bool PostAnalyzeFrame(const std::wstring& endpoint,
                          int slot,
                          long long timestamp100ns,
                          long long frameIndex,
                          const std::vector<unsigned char>& jpeg,
                          const std::string& modeUtf8,
                          const std::string& promptUtf8,
                          std::string* responseUtf8,
                          std::wstring* errorText);
};

std::string AiExtractJsonString(const std::string& json, const char* key);
std::vector<AiDetection> AiExtractDetections(const std::string& json);
std::vector<AiEvent> AiExtractEvents(const std::string& json);
