This is a simple Python script demonstrating how to use the OpenRouter API to interact with an AI model (mistralai/mistral-7b-instruct) and get a text-based response.
- Connects to the OpenRouter API using
requests - Sends a simple chat completion request
- Parses and prints the AI-generated response
Make sure you have the following installed:
pip install requests