Courses / AI & tools

Build your own bot with the Grok API

Learn to build a small chat bot on the Grok API, step by step: get an API key and keep it safe, send a first request, choose a model, stream answers, add memory and a tool, understand limits and cost, and connect it all to a Telegram bot.

36 min · 11 pages · practice task · quiz · part of Technical founder

Sponsor this course

What you will be able to do

Skills you add to your Herizon profile when you finish: Chatbot Development, API Integration, LLM APIs.

  • An API key, kept out of your code
  • A first request, sent with the Responses API
  • A model chosen on purpose, with a cost estimate
  • A bot on Telegram that uses one tool
  • A plan for limits, errors and what could go wrong

Who it is for

Time per page: 15 to 30 minutes Whole course: 4 to 5 hours (11 pages, at your own speed) This is for you if you are: - Learning to code and want a project that shows API skills - A developer who has not used an LLM API yet - Changing career into a role that builds with AI You need to know a little Python: running a script and installing a package. You need a computer, a Telegram account and a few dollars of credit for the API. ---

The situation you work through

Rania, a data analyst in Oulu, builds a Telegram bot that answers recruiters' questions about her three portfolio projects: an API key kept in an environment variable, a first request, a model choice, one tool, a rate limit and a cost estimate for 100 chats.

Your practice task

Build your own Grok bot for a small topic you know well, such as your portfolio or a small service. It runs on Telegram, keeps its keys in environment variables, and has one tool: either the built-in web search or a function of your own. Submit what the bot answers to two questions, the name of the tool and what it does, the model you chose and why, the names (never the values) of your environment variables, and a cost estimate for 100 chats with the prices and the date you checked them.

Illustration from the course Build your own bot with the Grok API

What is inside

  1. What you will build
  2. An API key and credits
  3. Your first request
  4. Choosing a model
  5. Streaming and memory
  6. Your own function

and 5 more pages

Finish with a short quiz to earn your certificate.

More in Technical founder

Build your own bot with the Grok API - Herizon