Tools for makers · Cloud and apps

Claude API

Anthropic's API gives your ESP32 access to Claude, a large language model that can answer questions, explain things and write messages from sensor data.

  • 3 lessons
Claude API

What it is for

Claude is a large language model, an AI trained on huge amounts of text. Through the Claude API, any device that can reach the internet, including the ESP32, can send it a question and get an answer back in a few seconds.

A system prompt tells Claude who to be and how to answer: a science buddy, a talking plant or a desk assistant. Your device sends the conversation as JSON over HTTPS and shows the answer on a screen, speaks it or sends it to your phone.

The API is a paid service, and the account and API key must belong to an adult (18+). The short questions in our lessons cost well under a cent each. Set a low spend limit in the Console.

Tips

  • Keep your API key secret: never post a sketch online with the key in it, and delete keys you no longer use.
  • Ask for short answers in the system prompt, so they fit small screens and stay cheap.
  • Check the Console's usage page now and then.

Lessons that use this tool

← All tools