Set spend-down for a Cursor key
set_byok_spend_downTurn spend-down mode on or off for a project Cursor key and configure credit expiry, model, daily fix limit, and start window so Mushi auto-dispatches open reports as draft PRs.
Instructions
Turn spend-down mode on or off for one of this project's own Cursor keys and set when its credits expire (YYYY-MM-DD), the Cursor model (id?param=value), fixes per day (1-200) and how many days before expiry to start (1-90). While on, Mushi dispatches the project's best open reports to Cursor on its own, inside the auto-fix caps; each fix opens a draft PR. A key shared by the organization can only be changed by an org owner or admin in the console. Write; spends Cursor credits once on; idempotent. Confirm with the user before turning it on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyId | Yes | Cursor key id from get_spend_down_status | |
| model | No | Cursor model spec, e.g. grok-4.7?reasoning_effort=xhigh&context=500k | |
| enabled | No | Turn spend-down on or off | |
| projectId | Yes | Project id (`project_id` is accepted too.) | |
| dailyLimit | No | Fixes per day across the apps this key pays for | |
| windowDays | No | Start this many days before the credits expire | |
| creditsExpireAt | No | When the credits expire, YYYY-MM-DD |