Teachable Machine + Web API

Hello! I have been using Thunkable for a while now and one of the biggest mysteries to me is still Web APIs, mostly due to lack of experience. Now that there is more time with the current situations, I am trying to learn how to use it.

For one of my projects I am planning on using Teachable Machine by Google, specifically the images model. I found it recently and it has been super fun to play around with. The problem is I have no idea how to implement it into my Thunkable app via Web API.

I understand how to connect the URL and I watched the Thunkable X Tutorial’s video about Web API’s so I sort of understand calling…? I was also able to find the model.json page. I just don’t know how to “send” a photo (rather than a live webcam) from the user and get the result. It says on the github page // Refer to tmImage.loadFromFiles() in the API to support files from a file picker or files from your local hard drive but I can’t find the file.

Other resources
That may help: FAQ & GitHub Page

I am aware this may be a lot to ask for and may take some time, so thank you very much for any help you can provide :slight_smile:.

Bonus: Can anyone figure this out? Wizard thing



I had been exploring Teachable Machine by Google for a while. Do you mind to share any sample project using Web Api to access Teachable Machine?


That would be great, thanks!


Hey @Amsler_eye and @mythi

I haven’t had a chance to look at this particular API, but we have a great playlist with lots of detailed explanations on how to use the Web API component and how to connect to several different APIs:


Hey Mythi!
Have you got the solution of how to use models trained on Teachable Machine inside the thunkable application framework? I’m actually needing for one of my project. If possible please guide me!!


Wow!! I didn’t know this existed. OMG! I’ll try to look into it and post a tutorial if it’s possible :smiley:


Hi @aryan.gupta18ph8pc5! I still have no idea how to connect it to Thunkable. Hopefully @Sofia can help :slight_smile:


Hello, well you wanted to train the model with Web Api or use the model to get results?
Because the Git you linked is saying -

Library for using image models created with Teachable Machine.

So if you were willing to train models, then I think currently it’s not possible to train via Rest Api as they haven’t released any Official Api.


That would be great! @Sofia , if possible please help me with it soon na! I’ve a urgent need for that and I’m clueless as of now!


Actually What I’m planning is Google has released Teachable Machine And I’m planning to use that trained model in my app using the link of teachable machine. But how to integrate in the backend of application. Can you please help?


That’s true, using the platform to train a model using Thunkable data using specifically Teachable Machine is not possible yet.

I think this is possible but is not through Teachable Machine but through TensorFlow which is the ‘brains’ of the whole deal. I will try to come up with a tutorial this weekend since I’m using this for a hackathon hehehe


That’s quite interesting and once if you’re done with it do share me with the updates and links here of your tutorial. Truely Grateful !!


@aryan.gupta18ph8pc5 @adbonds007z5obui @mythi

Hey all!

I did some further research, would you guys would be comfortable with a tutorial regarding the following:

Teachable Machine + Google Functions

The thing is that the model needs to be deployed somewhere because there is no easy connection yet. Would be this ok or way too complicated? Just as a heads up, for a no-code tool like Thunkable we would be handling code with the google function and the model itself.


Why not? It would be great to perform Machine Learning on Thunkable.
Currently thinking of true no code platform is bit hard. So we need codes in the journey!


Ok sure! I’m comfortable with code but some people are not, that’s why I’m asking.


HI Sofia,

Any luck in trying out the Teachable Machine?


Sorry guys for taking a lot of time… I found way by integrating the keras model in a cloud run flask API.

I’m writing a tutorial on medium about this with all the steps. :slight_smile:

On this note, if anyone would like to become a beta tester of the medium tutorial I would really appreciate it. I can give you credit at the end. This would be my first ever ‘real’ coding tutorial so any help is welcomed.

Contact me through email or social media :slight_smile: @sogalanbat sogalanbat@gmail.com
@adbonds007z5obui @aryan.gupta18ph8pc5 @mythi


So it’s like a restful api, to which we will send request, then requests will be processed on server(machine learning) and result will be received.
Then we polish the raw results to serve users on Thunkabke.
Am I right? Btw I would love to beta test.

Yea, only the tutorial is how to build that API with GCS. It’s the only way, I got it running for now. If the demand is higher maybe I could set up a service where you can upload the keras model and run it without needing to set up your own API…

Buuuut baby steps! haha first this one and then I can try to scale it.

1 Like

Does GCS stand for Google Cloud Services?