Verify the MinT SDK is working correctly:
# Set credentials
export MINT_BASE_URL=https://mint-training-api.macaron.xin
export MINT_API_KEY=your-api-key
# Run example
python examples/basic_training_setup.pyExpected output:
MinT SDK Example - v0.2.0
============================================================
Endpoint: https://mint-training-api.macaron.xin
API Key: your-api-key...
1. Creating ServiceClient...
✓ ServiceClient created
2. Getting available models...
✓ Found 1 model(s):
- Qwen/Qwen3.6-35B-A3B (context: 65536)
3. Creating LoRA TrainingClient...
Model: Qwen/Qwen3.6-35B-A3B
LoRA rank: 16
✓ TrainingClient created
4. Loading tokenizer...
✓ Tokenizer ready: Qwen2Tokenizer
Example: 'Hello, world!' → 4 tokens
============================================================
✓ Setup complete!
| Endpoint | Status | Notes |
|---|---|---|
https://mint-training-api.macaron.xin |
✓ Working | Recommended endpoint |
https://mintcn.macaron.xin/train |
✓ Working | Alternative endpoint |
https://mint-cn.macaron.xin/ |
Key registration required |
- ✓ ServiceClient creation
- ✓ API authentication (both
sk-andtml-prefixes) - ✓ Server capabilities query
- ✓ Model list retrieval
- ✓ TrainingClient creation
- ✓ Tokenizer loading
Qwen/Qwen3.6-35B-A3B(context: 65536)
Use get_server_capabilities() to check currently available models on your endpoint.
# Create virtual environment
python3.12 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e .
# Verify installation
python -c "import mint; print(f'mint {mint.__version__}')"The SDK supports both key formats:
sk-...(MinT standard keys)tml-...(Tinker/legacy keys)
This was a bug in v0.2.0 that has been fixed. The auth patch now handles both code paths:
resolve_auth_provider(JWT-enabled flow)- Direct
ApiKeyAuthProviderinstantiation (non-JWT flow)
Update to the latest version to resolve this issue.
Check:
- Your API key has training permissions
- The model name matches an available model from
get_server_capabilities() - Your account has sufficient quota/balance
The endpoint may require:
- Account activation
- Billing setup
- Different base URL
Contact MinT support for assistance.