List sessions
curl --request GET \
--url https://api.tensorpro.ai/api/v1/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/sessions', 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.tensorpro.ai/api/v1/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.tensorpro.ai/api/v1/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tensorpro.ai/api/v1/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"id": "chat-42",
"title": "Website planning",
"created_at": "2026-11-10T04:40:02+00:00",
"updated_at": "2026-11-10T04:43:25+00:00",
"message_count": 4,
"last_message_preview": "Sara manages the website project.",
"project_id": null,
"is_archived": false
}
],
"total": 1
}
Sessions
List sessions
List your sessions, most recently active first. Filter by project or by title.
GET
/
api
/
v1
/
sessions
List sessions
curl --request GET \
--url https://api.tensorpro.ai/api/v1/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/sessions', 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.tensorpro.ai/api/v1/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.tensorpro.ai/api/v1/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tensorpro.ai/api/v1/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"id": "chat-42",
"title": "Website planning",
"created_at": "2026-11-10T04:40:02+00:00",
"updated_at": "2026-11-10T04:43:25+00:00",
"message_count": 4,
"last_message_preview": "Sara manages the website project.",
"project_id": null,
"is_archived": false
}
],
"total": 1
}
Use this endpoint to list your conversations, for example in a chat sidebar.
See Error handling.
What EDN does
Returns your sessions, most recently active first. Deleted sessions are left out.Required headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Your EDN API key. Create keys in the Console. See Authentication |
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | No | Only sessions in this project |
q | string | No | Only sessions whose title contains this text. Not case-sensitive |
limit | integer | No | How many sessions to return. Default 50; values above 200 return 200 |
offset | integer | No | How many sessions to skip, for paging. Default 0 |
curl "https://api.tensorpro.ai/api/v1/sessions?limit=20" \
-H "Authorization: Bearer $EDN_API_KEY"
import os
import requests
resp = requests.get(
"https://api.tensorpro.ai/api/v1/sessions",
headers={"Authorization": f"Bearer {os.environ['EDN_API_KEY']}"},
params={
"limit": 20
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.tensorpro.ai/api/v1/sessions?limit=20", {
headers: {
Authorization: `Bearer ${process.env.EDN_API_KEY}`,
},
});
console.log(await resp.json());
Response
200 OK
{
"sessions": [
{
"id": "chat-42",
"title": "Website planning",
"created_at": "2026-11-10T04:40:02+00:00",
"updated_at": "2026-11-10T04:43:25+00:00",
"message_count": 4,
"last_message_preview": "Sara manages the website project.",
"project_id": null,
"is_archived": false
}
],
"total": 1
}
| Field | Type | Description |
|---|---|---|
sessions | array | The page of sessions, most recently active first |
sessions[].id | string | Identifier for the session |
sessions[].title | string | The session’s title |
sessions[].created_at | string (date-time) | When the session was created |
sessions[].updated_at | string (date-time) | When the session was last active |
sessions[].message_count | integer | How many messages are stored in the session |
sessions[].last_message_preview | string or null | The start of the latest saved turn, up to 200 characters |
sessions[].project_id | string or null | The project the session belongs to, or null for general chat |
sessions[].is_archived | boolean | true when the session was archived in the Console |
total | integer | How many sessions match, across all pages |
Errors
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | The API key is missing, invalid or revoked |
422 | VALIDATION_ERROR | limit or offset is invalid |
429 | RATE_LIMITED | Per-minute limit reached. Retry after Retry-After seconds |
500 | INTERNAL_ERROR | Something failed on EDN’s side. Retry later |
{
"sessions": [
{
"id": "chat-42",
"title": "Website planning",
"created_at": "2026-11-10T04:40:02+00:00",
"updated_at": "2026-11-10T04:43:25+00:00",
"message_count": 4,
"last_message_preview": "Sara manages the website project.",
"project_id": null,
"is_archived": false
}
],
"total": 1
}
