Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use Watson Visual Recognition Sample
<?php
$api_url = env('WATSON_RECOGNITION_API_URL');
$api_key = env('WATSON_RECOGNITION_API_KEY');
$api_mode = "v3/classify";
$curl = new Curl();
$curl_url = $api_url . $api_mode;
$image_path = 'image_path';
$curl->get($curl_url, array(
'url' => $image_path,
'classifier_ids' => 'default',
'api_key' => $api_key,
'owners' => 'me',
'threshold' => 0.25,
'version' => '2016-05-20'
));
var_dump(json_decode($curl->response));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.