import requests, json # Test /optimize r = requests.post('http://localhost:8000/optimize', json={'trials': 10}) d = r.json() print('STATUS:', r.status_code) print('SOLUTIONS:', d.get('solutions_found', 0)) sols = d.get('solutions', []) for s in sols[:5]: print(f" E={s.get('energy',0):.2f} Q={s.get('quality',0):.2f}")