Spend credits to unlock a finished job
unlock_jobSpends the customer's credits to unlock a finished job's files. Only call once get_job says the job is ready and the customer has approved a maximum spend. Refuses, charging nothing, if the job costs more than max_credits, is not ready, or the balance is short (the error says which, with the amount needed). A job that is already unlocked comes back as it is, with no charge and no balance or max_credits check. Needs a signed-in connection with spend access. Returns the job (same shape as get_job, with unlocked: true) plus credits_left and next: 'get_downloads'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The id (UUID) of a ready job on this account. | |
| max_credits | Yes | The most the customer agreed to spend on this job, 1 to 100 credits. The unlock is refused, charging nothing, if the job costs more. |