409 error that names its run.
You need the sampler’s ID: the sampler_id property of the sampling client that created it, or the id from List samplers.
The Python SDK and the curl examples authenticate with BASETEN_API_KEY. Export your API key first:
- Python SDK
- REST API
To deactivate a standalone sampler:Call To deactivate a sampler from another script, call Both calls succeed if the sampler is already inactive. Closing the sampling client with
deactivate() on the sampling client that created it:deactivate_sampler() on a ServiceClient, replacing <sampler_id> with the sampler’s ID:close() releases its local connections but doesn’t deactivate the sampler.status.name is INACTIVE:
Next steps
- Create a standalone sampler: Start another sampler for a base model or checkpoint.
- Deactivate a run: End a run and its paired sampler.