Edit Task with Instruction
curl --request PATCH \
--url https://api.promptloop.com/v0.1/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"instruction": "Add a field for the company founding year"
}
'import requests
url = "https://api.promptloop.com/v0.1/tasks/{task_id}"
payload = { "instruction": "Add a field for the company founding year" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({instruction: 'Add a field for the company founding year'})
};
fetch('https://api.promptloop.com/v0.1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"task_id": "abc123-def456-...",
"version": 2,
"message": "Task updated successfully"
},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}Tasks
Edit Task with Instruction
Edits an existing task with a natural language instruction. Creates a new version of the task.
PATCH
/
v0.1
/
tasks
/
{task_id}
Edit Task with Instruction
curl --request PATCH \
--url https://api.promptloop.com/v0.1/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"instruction": "Add a field for the company founding year"
}
'import requests
url = "https://api.promptloop.com/v0.1/tasks/{task_id}"
payload = { "instruction": "Add a field for the company founding year" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({instruction: 'Add a field for the company founding year'})
};
fetch('https://api.promptloop.com/v0.1/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"data": {
"task_id": "abc123-def456-...",
"version": 2,
"message": "Task updated successfully"
},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}{
"status": "error",
"data": {},
"message": "<string>",
"error": {
"code": 123,
"details": "<string>"
},
"request_id": "<string>"
}Authorizations
Path Parameters
Body
application/json
Natural language instruction for how to modify the task
Example:
"Add a field for the company founding year"
