title: How to send POST request with base64 image
body: <h3>The problem</h3>
  
  <p>I have been unable to find a source that describes a way to send an (base64) image over a POST request. I have tried to edit the signature so it accepts base64 images as input but with no success. Is it possible to change the model so that it accepts a (base64) image as input? If not, can I convert my created image to the correct format on my client?
  Source code / logs</p>
  
  <p>I am currently saving my keras model with standard signature using:</p>
  
  <pre class="lang-js prettyprint-override"><code>tf.saved_model.save(model, "path")
  </code></pre>
  
  <p>The get requests result says the model is deployed:</p>
  
  <pre><code>{ "version": "4", "state": "AVAILABLE", "status": { "error_code": "OK", "error_message": "" } }
  </code></pre>
  
  <p>I am converting my image to base64 using the 'react-native-image-base64' library and sending it using a post request with the correct format.
  However, as the error code says it expects a float</p>
  
  <pre><code>"error": "Failed to process element: 0 of \'instances\' list. Error: Invalid argument: JSON Value: {"Base64 image string here"} Type: Object is not of expected type: float"
  </code></pre>
  
  <p>with the following request :</p>
  
  <pre><code>curl --request POST \
    --url http://192.168.1.75:8501/v1/models/saved_model:predict \
    --header 'content-type: application/json' \
    --data '
  {
     "instances":
     [
      {
         "b64": "HBwcIiIiIiIiHh4eGhoaGBgYExMTEBAQERERERERDw8PCQkJBQ.."
      }
     ]
  }'
  </code></pre>
  
  <p>current signature def</p>
  
  <pre><code>signature_def['serving_default']:
    The given SavedModel SignatureDef contains the following input(s):
      inputs['conv2d_input'] tensor_info:
          dtype: DT_FLOAT
          shape: (-1, 102, 136, 3)
          name: serving_default_conv2d_input:0
    The given SavedModel SignatureDef contains the following output(s):
      outputs['dense'] tensor_info:
          dtype: DT_FLOAT
          shape: (-1, 2)
          name: StatefulPartitionedCall:0
    Method name is: tensorflow/serving/predict
  </code></pre>