Clear Tinker Storage
Delete all checkpoints from the authenticated Tinker account to free up storage.
Instructions
When this skill is invoked, perform the following steps:
Load the API key from
docker/.env.tinker(theTINKER_API_KEYvariable). If not found, ask the user to provide one.List all checkpoints by paginating through the Tinker REST API:
GET https://tinker.thinkingmachines.dev/services/tinker-prod/api/v1/checkpoints Headers: X-API-Key: <key>, User-Agent: CLaaS/0.1 Params: limit=100, offset=0The response JSON has
checkpoints(array) andcursor(withtotal_count,offset,limit). Paginate by incrementingoffsetuntil all checkpoints are fetched. Important: A customUser-Agentheader is required — Cloudflare blocks Python's default user-agent.Display a summary to the user before deleting:
- Total number of checkpoints
- Total storage in GB
- Breakdown by
checkpoint_type(training vs sampler)
Ask for confirmation before proceeding with deletion. This is a destructive, irreversible operation.
Delete each checkpoint by parsing the
tinker_pathand calling:DELETE https://tinker.thinkingmachines.dev/services/tinker-prod/api/v1/training_runs/{training_run_id}/checkpoints/{checkpoint_id} Headers: X-API-Key: <key>The
tinker_pathformat istinker://{training_run_id}/{checkpoint_id}. Split on the first/after removing thetinker://prefix to extract both parts.Verify deletion by re-querying the list endpoint and confirming 0 checkpoints remain.
Report results: number deleted, number failed, storage freed.
Authentication
- The API key must be a valid Tinker API key (starts with
tml-) - Auth header format:
X-API-Key: <key> - If the key returns 401, ask the user for a fresh key
Notes
- All API calls use
httpxwith a 30-second timeout - This deletes checkpoints across ALL training runs for the authenticated user
- There is no undo — deleted checkpoints cannot be recovered
- After clearing, new LoRAs must be re-initialized via
POST /v1/lora/init