AdvancedCheckpointUpload

Upload a Checkpoint

This page documents advanced/checkpoint.py upload in mint-quickstart.

What this command does

  • reads a local .tar.gz checkpoint archive
  • uploads it directly to POST /api/v1/checkpoints/upload
  • returns a server-side checkpoint path that you can use for later resume

Today this flow is documented as a direct HTTP upload path, not as a high-level MinT SDK helper. The quickstart script uses a stdlib multipart implementation so it does not need extra dependencies.

Use the MinT endpoint that matches your region:

  • Mainland China: https://mint.macaron.xin/
  • Outside Mainland China: https://i18n.mint.macaron.xin/

Command

export MINT_API_KEY=sk-...
python advanced/checkpoint.py upload ./ckpts/my-ckpt-state.tar.gz

Optional flag:

  • --timeout: upload timeout in seconds

Core request shape

POST /api/v1/checkpoints/upload
Content-Type: multipart/form-data
file=<checkpoint archive>

A simplified Python version would upload the archive with a standard multipart HTTP client. advanced/checkpoint.py keeps the robust implementation in one place and prints the returned checkpoint path.

Expected output

[upload] archive=./ckpts/my-ckpt-state.tar.gz server=<your-region-endpoint>
[upload] uploaded: ckpt_...

Common failure cases

  • archive path does not exist
  • the archive is not a .tar.gz
  • the API key does not have upload permission
  • the request exceeds --timeout
  • Produce a checkpoint locally or remotely first: Save
  • Download a server-side checkpoint archive: Download
  • Resume from the uploaded checkpoint path: Resume