Skip to content

Environment Variables

The Mint Recursive client SDK reads a set of environment variables to configure the endpoint and authentication. The list below covers only 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 Recursive endpoint, keep the trailing /. https://mint.macaron.im/train or https://mintcn.macaron.xin/train
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 default 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 configuration within a team. The .env file uses the same variable names as above. Add .env to your .gitignore to avoid committing secrets.

Mainland endpoint

For the Chinese mainland region, use the mintcn endpoint:

export MINT_BASE_URL=https://mintcn.macaron.xin/train

Common symptoms of misconfiguration

If _require_api_key throws an error or the preflight times out, check the following:

  • MINT_API_KEY and MINT_BASE_URL are exported correctly.
  • 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.