🌐 English
עבריתEnglishРусскийالعربيةहिन्दीEspañolFrançaisPortuguêsDeutsch

Level: Advanced · Time: two hours

Your first app with the Claude API

Bring Claude into your website, form or system.

The API lets you add Claude to any product: a form that summarizes inquiries, a tool that writes product descriptions, a chat on a website or a bot (like a WhatsApp bot). You pay by the amount of text sent, so you can start with very small amounts.

What's needed

Step by step

  1. Create a key

    In the developer console, create an API key and store it in an environment variable, not in the code.

  2. Send a first message

    With the official library, you send a message and get a response. This is "Hello World".

  3. Add a system prompt

    Define a role, tone and rules, just like in a WhatsApp bot.

  4. Connect to an interface

    A form on the site sends to your server, the server calls Claude and returns an answer.

  5. Set a spending cap

    In the console, set a monthly budget limit.

Tips

⚠️ Never put an API key in code that runs in the visitor's browser. It will be stolen and billed to you.

Learn more

This guide was written by the AI TIPS team and is updated regularly. Interfaces and programs change, so button names may be slightly different.

More cool things to do