Hi, I'm struggling with creating an ai chatbot. Please send help. I don't know what wrong with the block with it doesn't work. I am a beginner

It’s not a bug in your blocks — your setup is mostly fine. The issue is with how you’re calling the AI model.

You’re using:

model = "A1"

That’s not a valid model, so the request will fail.

Change it to something like:

gpt-4o-mini

Also make sure:

  • Your API key is valid (sk-...)
  • Your TextBox is not empty before sending

You don’t need the “replace text” block for now — keep the prompt simple:
just send TextBox1.Text directly.

If it still doesn’t work, the extension you’re using might be outdated, which is common with App Inventor AI extensions.

If you can share the exact error message, I can help you debug further.

1 Like

Here is the next error message

This error is not related to your blocks or logic.

You’re getting:
insufficient_quota

That means your API key has no remaining usage or billing is not set up.