#!/bin/sh
set -eu
: "${MISTRAL_API_KEY:?Set MISTRAL_API_KEY first}"
curl --no-buffer --fail-with-body --silent --show-error \
  "${MISTRAL_API_BASE:-https://api.mistral.ai/v1}/chat/completions" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"model":"mistral-large-4","messages":[{"role":"user","content":"Explain mixture-of-experts in two sentences."}],"max_tokens":128,"stream":true}'
