curl --request GET \
--url https://api.consensus.app/v1/threads/{thread_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.consensus.app/v1/threads/{thread_id}"
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.consensus.app/v1/threads/{thread_id}', 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.consensus.app/v1/threads/{thread_id}",
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.consensus.app/v1/threads/{thread_id}"
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.consensus.app/v1/threads/{thread_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.consensus.app/v1/threads/{thread_id}")
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{
"thread_id": "<string>",
"status": "running",
"url": "<string>",
"interactions": [
{
"interaction_id": "<string>",
"status": "running",
"mode": "pro",
"input_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"response": "<string>",
"agent_trace": "<string>",
"citations": [
{
"n": 123,
"paper_id": "<string>",
"title": "<string>",
"authors": [
"<string>"
],
"year": 123,
"journal": "<string>",
"doi": "<string>",
"url": "<string>",
"snippets": [
{
"marker": "<string>",
"quote": "<string>",
"section": "<string>"
}
]
}
],
"stats": {
"retrieved": 123,
"screened": 123,
"included": 123
}
}
],
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Poll a Thread
The polling half of create-then-poll. While status is running, wait ~30 seconds between polls; faster polling is rate-limited (hard cap 3/s). Readable for any Thread the key can access, including ones shared with the caller, not only Threads it created. Only the target interaction (interaction_id, or the latest) carries response/citations; earlier turns are metadata unless requested explicitly.
curl --request GET \
--url https://api.consensus.app/v1/threads/{thread_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.consensus.app/v1/threads/{thread_id}"
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.consensus.app/v1/threads/{thread_id}', 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.consensus.app/v1/threads/{thread_id}",
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.consensus.app/v1/threads/{thread_id}"
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.consensus.app/v1/threads/{thread_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.consensus.app/v1/threads/{thread_id}")
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{
"thread_id": "<string>",
"status": "running",
"url": "<string>",
"interactions": [
{
"interaction_id": "<string>",
"status": "running",
"mode": "pro",
"input_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"response": "<string>",
"agent_trace": "<string>",
"citations": [
{
"n": 123,
"paper_id": "<string>",
"title": "<string>",
"authors": [
"<string>"
],
"year": 123,
"journal": "<string>",
"doi": "<string>",
"url": "<string>",
"snippets": [
{
"marker": "<string>",
"quote": "<string>",
"section": "<string>"
}
]
}
],
"stats": {
"retrieved": 123,
"screened": 123,
"included": 123
}
}
],
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Opaque Thread id.
^[A-Za-z0-9_-]+$Query Parameters
Opt in to the textual agent_trace per interaction. Off by default: the trace is internal agent-graph structure, so shipping it only on request keeps a node rename from becoming a breaking change.
Hydrate this interaction instead of the latest.
Response
Successful Response
GET /v1/threads/{thread_id} — the polling half of create-then-poll.
Overall status, mirroring the latest interaction.
running, idle, failed Deep-link to the Thread on consensus.app.
Show child attributes
Show child attributes