import requests

MISTRAL_API_KEY = "2iGzTzE9csRQ9IoASoUjplHwEjA200Vh"
MISTRAL_API_URL = "https://api.mistral.ai/v1/models"

headers = {
    "Authorization": f"Bearer {MISTRAL_API_KEY}"
}

response = requests.get(MISTRAL_API_URL, headers=headers)

if response.status_code == 200:
    models = response.json().get('data', [])
    print("Modèles disponibles via Mistral :")
    for model in models:
        print(f"- {model['id']}")
else:
    print(f"Erreur : {response.status_code} - {response.text}")
