Message Boards Message Boards

0
|
5596 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Sending an Image to the API

Posted 9 years ago

Good afternoon,

I have been using the WolfRam API to send basic queries such as the provided PI example and I am a big fan.

However, I have been unsuccessful when trying to send an Image as seen in the provided example. https://reference.wolfram.com/language/ref/ImageIdentify.html

Has anyone successfully sent an Image over the API? If you have, what encoding type did you use to make this successful?

Here is the explorer for easy GET requests. http://products.wolframalpha.com/api/explorer.html

Thank you for taking the time to read this and for any help you may be able to provide! Richard

Posted 9 years ago

CloudDeploy[ APIFunction[{"image" -> "Image"}, ImageIdentify[#image] &]]

Then, set the permissions public.

SetOptions[ CloudObject[ "YOUR URL HERE"], Permissions -> "Public"]

Then, you can post an image to it

$ curl --form "image=@someimage.jpg" YOUR URL HERE

and get back the response.

POSTED BY: Stephen Coast
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract