Docs navigation
Tasks

Update Task

Update Task

PATCH/v2/tasks/{task_id}

Path Parameters

task_idstring · uuidrequired

Request Body

titlestringoptional
metadataobjectoptional
metadata_patchobjectoptional

Label edits merged into a task's metadata in one statement.

metadata_patch.setobjectoptional

Labels to add or overwrite. Other labels are kept.

metadata_patch.unsetarray<string>optional

Label keys to remove. A key the task does not have is ignored.

modelstringoptional

Model the task's next turn runs on, as a catalog model id. The turn in progress keeps its model. Omit or null to leave it unchanged.

clear_modelbooleanoptional

True returns the task to its agent's default model from its next turn. Cannot be combined with `model`.

Request
curl --request PATCH \
  --url https://api.brainbaselabs.com/v2/tasks/{task_id} \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "string",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "metadata_patch": {
    "set": {
      "property1": "string",
      "property2": "string"
    },
    "unset": [
      "string"
    ]
  },
  "model": "string",
  "clear_model": false
}'
Response
json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
  "owner_user_id": "65139110-7c3c-4777-b692-80c218be3b9d",
  "parent_task_id": "0595d3a2-39ad-4ab5-906d-3e39522e8eed",
  "title": "string",
  "status": "string",
  "status_info": {},
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "sandbox_id": "string",
  "machine_id": "76ca96f6-a9a8-43bf-917c-a176478a33ba",
  "machine_size": "xs",
  "model": "string",
  "benchmark_attempt_id": "5321abbd-5523-4e8e-9800-e8132608c1f0",
  "created_at": "2019-08-24T14:15:22Z"
}