title: Google Vision API text detection strange behaviour - Javascript
body: <p>Recently something about the Google Vision API changed. I am using it to recognize text on receipts. All good until now. Suddenly, the API started to respond differently to my requests.</p>
  
  <p>I sent the same picture to the API today, and I got a different response (from the past). I ensured nothing was changed in my code, so this is not the culprit.</p>
  
  <p>Another strange thing is that, when I upload the image to <a href="https://cloud.google.com/vision/" rel="nofollow noreferrer">https://cloud.google.com/vision/</a> in the response, under textAnnotations, I get an array of 183 entries. However when I post from my app I get an array of 113 entries. Below you can see my code.</p>
  
  <pre><code>function googleScan(imageData) {
      var deferred = $q.defer();
      var url = "https://vision.googleapis.com/v1/images:annotate?key=&lt;myAPIKey&gt;";
      var payload = {
          requests: {
              image: {
                  content: imageData.split(',')[1]
              },
              features: [{
                  type: 'TEXT_DETECTION',
                  maxResults:50
              }]
          }
      };
      $http.post(url, payload, { headers: { "NoAuthToken": true } }).then(function (response) {
          deferred.resolve(parseAnalyzedResult(response.data.responses[0].textAnnotations));
          console.log(response);
      }, function (error) {
          console.log(error);
      });
      return deferred.promise;
  </code></pre>
  
  <p>I am wondering if somehow my free subscription got altered and that's why I receive a different response. Is that even possible? Has anyone stumbled upon this kind of issue before?</p>