Environment Variables¶
The MinT client SDK supports a set of environment variables for configuring the endpoint and authentication. The list below corresponds strictly to the variables the SDK explicitly supports.
Connection and authentication¶
| Variable | Description | Example |
|---|---|---|
MINT_API_KEY |
Enterprise API key, starts with sk-. |
sk-your-api-key-here |
MINT_BASE_URL |
MinT endpoint, keep the trailing /. |
https://mint.macaron.im/ or https://mintcn.macaron.xin/ |
TINKER_API_KEY |
tinker-compatible entry point (import mint as tinker). Usually set to $MINT_API_KEY. |
$MINT_API_KEY |
TINKER_BASE_URL |
Same as above, tinker-compatible. Usually set to $MINT_BASE_URL. |
$MINT_BASE_URL |
Default base model¶
| Variable | Description | Example |
|---|---|---|
MINT_BASE_MODEL |
Scripts that support this variable (e.g. Cookbook) read it as the base model. | Qwen/Qwen3-4B-Instruct-2507 |
Automatic .env loading¶
A .env file in the project root is loaded automatically, which makes it easy to share config within a team. The .env file uses the same variable names as above. Be sure to add .env to your .gitignore.
Mainland endpoint¶
It is stated explicitly: "For the Chinese mainland region, use the mintcn endpoint":
Common symptoms of misconfiguration¶
If _require_api_key throws an error or the preflight times out, check:
- Whether
MINT_API_KEYandMINT_BASE_URLare exported correctly. - Whether the endpoint
mint.macaron.im/mintcn.macaron.xin(or your enterprise tenant endpoint) is reachable.
Note
This page lists only the variables the SDK explicitly defines. The SDK has other optional variables internally, but they are used only in special cases. Confirm with your technical contact before enabling them, to avoid relying on undocumented behavior.