Get Result Content
curl --request GET \
--url https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content', 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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content",
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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content"
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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content")
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{
"startChar": 0,
"endChar": 11,
"totalChars": 11,
"text": "hello world",
"nextStartChar": null,
"tokenBudget": {
"fullOutputTokens": 3,
"returnedTokens": 3,
"savedTokens": 0
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}Tools
Get Result Content
Read a character slice of a text-shaped stored result.
GET
/
api
/
tools
/
projects
/
{projectId}
/
results
/
{resultId}
/
content
Get Result Content
curl --request GET \
--url https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content', 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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content",
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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content"
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://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentos.useparagon.com/api/tools/projects/{projectId}/results/{resultId}/content")
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{
"startChar": 0,
"endChar": 11,
"totalChars": 11,
"text": "hello world",
"nextStartChar": null,
"tokenBudget": {
"fullOutputTokens": 3,
"returnedTokens": 3,
"savedTokens": 0
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}{
"error": {
"code": "REQUEST_INVALID",
"message": "The request payload failed validation.",
"hint": "Correct the fields named in details and retry.",
"retryable": false,
"requestId": "req_01hxyz",
"details": [
{
"field": "query",
"issue": "query should not be empty"
}
]
}
}Reads a
text-shaped result, by character offsets.
startChar defaults to 0 and must be >= 0. maxChars defaults to 20000 and must be from 1 to 100000. nextStartChar is the next offset, or null at the end.
const response = await fetch(
`https://agentos.useparagon.com/api/tools/projects/${projectId}/results/${resultId}/content?startChar=0&maxChars=20000`,
{ headers: { Authorization: `Bearer ${paragonUserToken}` } },
);
Authorizations
Your Paragon User Token (JWT), which you can generate using your project's signing keys.
Query Parameters
Required range:
x >= 0Required range:
1 <= x <= 100000