List edits for a task
curl --request GET \
--url https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deepresearch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"edits": [
{
"edit_id": "ed_01j9x4k2m8n7p3q5r6s8t0v2w4",
"deepresearch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "running",
"target": {
"kind": "report"
},
"base_version": 2,
"created_at": "2023-11-07T05:31:56Z",
"version": 2,
"focus": {
"start_char": 1840,
"end_char": 1965,
"text": "<string>",
"prefix": "<string>",
"suffix": "<string>",
"section": "Executive Summary",
"scope": "prefer"
},
"retry_after_seconds": 123,
"summary": "<string>",
"changes": [
{
"line": 2,
"removed": [
"<string>"
],
"added": [
"<string>"
]
}
],
"unapplied": [
"<string>"
],
"stats": {},
"warnings": [
{
"type": "datasets_not_in_plan",
"message": "Your Pay-as-you-go plan doesn't include valyu/valyu-chemrxiv (Comfortably Pro, $99/mo), so it was skipped. Results come from your other sources. Comfortably Pro ($99/mo) includes it: https://platform.valyu.ai/user/account/billing?tab=plan",
"detail": {
"datasets": [
{
"id": "valyu/valyu-chemrxiv",
"required_plan": "tier_2"
}
],
"current_plan": "tier_0",
"required_plan": {
"id": "tier_2",
"name": "Comfortably Pro",
"price": "$99/mo"
},
"upgrade_url": "https://platform.valyu.ai/user/account/billing?tab=plan"
}
}
],
"decline": {
"code": "edit.rewrite_requested",
"message": "<string>",
"suggestion": "<string>"
},
"error": {
"code": "edit.interrupted",
"message": "<string>",
"retryable": true
},
"pdf_url": "<string>"
}
]
}List Edits
Reference for listing edits on a DeepResearch task via GET /v1/deepresearch/tasks//edits.
GET
/
v1
/
deepresearch
/
tasks
/
{id}
/
edits
List edits for a task
curl --request GET \
--url https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valyu.ai/v1/deepresearch/tasks/{id}/edits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deepresearch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"edits": [
{
"edit_id": "ed_01j9x4k2m8n7p3q5r6s8t0v2w4",
"deepresearch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "running",
"target": {
"kind": "report"
},
"base_version": 2,
"created_at": "2023-11-07T05:31:56Z",
"version": 2,
"focus": {
"start_char": 1840,
"end_char": 1965,
"text": "<string>",
"prefix": "<string>",
"suffix": "<string>",
"section": "Executive Summary",
"scope": "prefer"
},
"retry_after_seconds": 123,
"summary": "<string>",
"changes": [
{
"line": 2,
"removed": [
"<string>"
],
"added": [
"<string>"
]
}
],
"unapplied": [
"<string>"
],
"stats": {},
"warnings": [
{
"type": "datasets_not_in_plan",
"message": "Your Pay-as-you-go plan doesn't include valyu/valyu-chemrxiv (Comfortably Pro, $99/mo), so it was skipped. Results come from your other sources. Comfortably Pro ($99/mo) includes it: https://platform.valyu.ai/user/account/billing?tab=plan",
"detail": {
"datasets": [
{
"id": "valyu/valyu-chemrxiv",
"required_plan": "tier_2"
}
],
"current_plan": "tier_0",
"required_plan": {
"id": "tier_2",
"name": "Comfortably Pro",
"price": "$99/mo"
},
"upgrade_url": "https://platform.valyu.ai/user/account/billing?tab=plan"
}
}
],
"decline": {
"code": "edit.rewrite_requested",
"message": "<string>",
"suggestion": "<string>"
},
"error": {
"code": "edit.interrupted",
"message": "<string>",
"retryable": true
},
"pdf_url": "<string>"
}
]
}List edit records submitted for a DeepResearch task, including running, applied, declined, and failed edits.
Each item uses the same edit record shape returned by Get edit. Only the task owner can list edits for a task (
403 for shared or public viewers). See Edit a finished report.Authorizations
API key for authentication. Get yours at platform.valyu.ai.
Was this page helpful?