cURL
curl --request POST \ --url https://api.sutro.sh/job-cancel/{job_id} \ --header 'Authorization: <authorization>'
{ "cancelled": true, "message": "Job batch_job_12345 has been successfully cancelled" }
Cancel a batch inference job by its job_id
Key YOUR_API_KEY
Authorization: Key sk_live_abc123...
import requests job_id = "batch_job_12345" response = requests.post( f'https://api.sutro.sh/job-cancel/{job_id}', headers={ 'Authorization': 'Key YOUR_SUTRO_API_KEY', 'Content-Type': 'application/json' } ) result = response.json() if result['cancelled']: print(f"Job {job_id} was successfully cancelled") else: print(f"Failed to cancel job: {result['message']}")