Request structure

We are going to make a request as follows:

Field Value
HTTP method POST
URL https://vision.googleapis.com/v1/images:annotate?key=API_KEY
Request body
// SNIPP SNIPP
{
"requests": [
{
"image":
{
"content": "/9j/7QBEUGhvdG9zaG9...base64-encoded-image-content...fXNWzvDEeYxxxzj/Coa6Bax//Z"
},
"features": [
{
"type": " SAFE_SEARCH_DETECTION"
}]
}]
}
// SNIPP SNIPP


Note that the content property under the image property is the base64 encoded version of the image, and under the features, we are requesting the SAFE_SEARCH_DETECTION feature.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.30.236