curl --request POST \
--url https://flow.seekr.com/v1/threads/{thread_id}/runs/stream \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"model_settings": {
"temperature": 1,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"response_format": {
"json_schema": {}
},
"group": "default_group",
"metadata": {}
}
'import requests
url = "https://flow.seekr.com/v1/threads/{thread_id}/runs/stream"
payload = {
"agent_id": "<string>",
"model_settings": {
"temperature": 1,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"response_format": { "json_schema": {} },
"group": "default_group",
"metadata": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
model_settings: {temperature: 1, top_p: 1, frequency_penalty: 0, presence_penalty: 0},
response_format: {json_schema: {}},
group: 'default_group',
metadata: {}
})
};
fetch('https://flow.seekr.com/v1/threads/{thread_id}/runs/stream', 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://flow.seekr.com/v1/threads/{thread_id}/runs/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '<string>',
'model_settings' => [
'temperature' => 1,
'top_p' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0
],
'response_format' => [
'json_schema' => [
]
],
'group' => 'default_group',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/threads/{thread_id}/runs/stream"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/threads/{thread_id}/runs/stream")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/threads/{thread_id}/runs/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Stream agent run
Run an agent on a thread and stream the response as server-sent events.
curl --request POST \
--url https://flow.seekr.com/v1/threads/{thread_id}/runs/stream \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"model_settings": {
"temperature": 1,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"response_format": {
"json_schema": {}
},
"group": "default_group",
"metadata": {}
}
'import requests
url = "https://flow.seekr.com/v1/threads/{thread_id}/runs/stream"
payload = {
"agent_id": "<string>",
"model_settings": {
"temperature": 1,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"response_format": { "json_schema": {} },
"group": "default_group",
"metadata": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
model_settings: {temperature: 1, top_p: 1, frequency_penalty: 0, presence_penalty: 0},
response_format: {json_schema: {}},
group: 'default_group',
metadata: {}
})
};
fetch('https://flow.seekr.com/v1/threads/{thread_id}/runs/stream', 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://flow.seekr.com/v1/threads/{thread_id}/runs/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '<string>',
'model_settings' => [
'temperature' => 1,
'top_p' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0
],
'response_format' => [
'json_schema' => [
]
],
'group' => 'default_group',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/threads/{thread_id}/runs/stream"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/threads/{thread_id}/runs/stream")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/threads/{thread_id}/runs/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"<string>\",\n \"model_settings\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0\n },\n \"response_format\": {\n \"json_schema\": {}\n },\n \"group\": \"default_group\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Headers
ID of the team to use for the request. If omitted, the request uses your personal workspace.
Path Parameters
ID of the thread.
Body
Request model for creating a run.
ID of the agent.
Settings to use when calling an LLM.
This class holds optional model configuration parameters (e.g. temperature, top_p, penalties, truncation, etc.).
Not all models/providers support all of these parameters, so please check the API documentation for the specific model and provider you are using.
Show child attributes
Show child attributes
Format the model must use for its output.
Show child attributes
Show child attributes
Label attached to the run for grouping and filtering observability spans. Defaults to default_group.
1 - 32768String key-value pairs attached to the run for observability. These values can be used to filter spans.
Show child attributes
Show child attributes
Response
Success