title: Google Cloud Vision returns empty response
body: <p>I am trying to build a C# library that will act as a wrapper for a set of Google APIs. When working with Google Vision API, I have found the API returns an empty response set for certain queries. For example, when I try to run FACE_ANNOTATION on <a href="https://cloud.google.com/vision/docs/images/car.png" rel="nofollow noreferrer">car.png</a>, the response I get back is:</p>
  
  <pre><code>{
    "responses": [
      {}
    ]
  }
  </code></pre>
  
  <p>I have eliminated all the basic issues like storing the image in a Google Cloud bucket, public access for the image, valid API key, enabling the API from the Google API Dashboard. </p>
  
  <p>Below is a segment of the code where I make the request:</p>
  
  <pre><code>httpClient.DefaultRequestHeaders.Accept.Clear();
  httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
  // The API address to which we will make the HTTP POST query
  String request_query = "v1/images:annotate?" + $"key={APIKey}";
  HttpResponseMessage response = await httpClient.PostAsJsonAsync(request_query, imageRequests);
  
  Stream stream = await response.Content.ReadAsStreamAsync();
  StreamReader streamReader = new StreamReader(stream);
  String response_str = streamReader.ReadToEnd();        
  Console.WriteLine(response_str);
  
  if (response.IsSuccessStatusCode) {
      try {
          imageResponseList = JsonConvert.DeserializeObject&lt;AnnotateImageResponseList&gt;(response_str);
  
       } catch (JsonSerializationException e) {
           Debug.WriteLine(e.StackTrace);
       }
  }
  </code></pre>
  
  <p>Here is the request body (imageRequests as it's called in my code above) that is sent to the API:</p>
  
  <pre><code>{
    "requests": [
      {
        "image":
         {
           "content":"",
           "source":
           {
             "imageUri":"gs://&lt;google_cloud_bucket&gt;/car.png"
           }
         },
         "features":[
           {
             "type":0,
             "maxResults":100,
             "model":"builtin/stable"
           } 
         ],
         "imageContext":null
      }
    ]
  }
  </code></pre>
  
  <p>Now, I am aware that there is already a C# client that can be used directly, but the project I am working on needs me to access the REST API through HTTP requests.</p>
  
  <p>Any help would be appreciated.</p>