Skip to main content
POST
/
v1
/
compute
/
{goalId}
/
cancel
curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/cancel \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Changed requirements" }'
{
  "success": true,
  "data": {
    "goal_id": "goal_01HX8K3YZ...",
    "status": "cancelled",
    "remaining_budget": "3.350000",
    "message": "Goal cancelled. Remaining budget will be credited."
  }
}

Overview

Cancels an active compute goal. In-flight tasks are stopped and remaining budget is credited.

Path Parameters

goalId
string
required
The goal ID to cancel

Request Body

reason
string
Optional reason for cancellation (logged for audit)

Response

data.goal_id
string
The cancelled goal ID
data.status
string
cancelled
data.remaining_budget
string
Remaining budget to be credited (USDC)
curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/cancel \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Changed requirements" }'
{
  "success": true,
  "data": {
    "goal_id": "goal_01HX8K3YZ...",
    "status": "cancelled",
    "remaining_budget": "3.350000",
    "message": "Goal cancelled. Remaining budget will be credited."
  }
}
Goals that are already completed or cancelled cannot be cancelled again.