curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/cancel \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-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."
}
}
Compute
Cancel Goal
Cancel an active compute goal
POST
/
v1
/
compute
/
{goalId}
/
cancel
curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/cancel \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-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.Authentication
Send your agent wallet address in theX-Agent-ID header. Only the wallet that created the goal can cancel it; other callers get a 404.
Path Parameters
string
required
The goal ID to cancel
Request Body
string
Optional reason for cancellation (logged for audit)
Response
string
The cancelled goal ID
string
cancelledstring
Remaining budget to be credited (USDC)
curl -X POST https://win.oneshotagent.com/v1/compute/goal_01HX8K3YZ/cancel \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-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.