curl --request POST \
--url https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"attachment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"page": {
"entity_id": "<string>",
"entity_name": "<string>",
"entity_type": "<string>",
"page_name": "<string>",
"route": "<string>",
"selected_step_id": "<string>",
"selected_step_label": "<string>"
},
"pasted": [
"<string>"
],
"quote": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/"
payload = {
"prompt": "<string>",
"attachment_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"page": {
"entity_id": "<string>",
"entity_name": "<string>",
"entity_type": "<string>",
"page_name": "<string>",
"route": "<string>",
"selected_step_id": "<string>",
"selected_step_label": "<string>"
},
"pasted": ["<string>"],
"quote": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
attachment_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
page: {
entity_id: '<string>',
entity_name: '<string>',
entity_type: '<string>',
page_name: '<string>',
route: '<string>',
selected_step_id: '<string>',
selected_step_label: '<string>'
},
pasted: ['<string>'],
quote: '<string>'
})
};
fetch('https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/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([
'prompt' => '<string>',
'attachment_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'page' => [
'entity_id' => '<string>',
'entity_name' => '<string>',
'entity_type' => '<string>',
'page_name' => '<string>',
'route' => '<string>',
'selected_step_id' => '<string>',
'selected_step_label' => '<string>'
],
'pasted' => [
'<string>'
],
'quote' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body<string>{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Ask the AI Assistant, streaming its work
Run one turn and stream it as Server-Sent Events: a plan frame whenever the AI Assistant publishes or ticks its plan, a step frame for each thing the AI Assistant actually did (read_context when the workspace has a business context, then plan, then write_column, retry_column and price_column for a column the message described, then one apply_action per action it applied), one turn frame naming the saved user message’s sequence once it is saved (the Stop route is addressed by it), delta frames carrying the whole reply so far (assign, never append), a said frame when a later round of the turn starts writing (the words the reply showed until then, now a step: put step at at among the steps sent and empty the reply, which the next delta fills), then exactly one result frame with the same body the non-streaming route returns, the reply carrying its action cards, sent once the reply is saved. The last delta always equals the saved reply.
A turn that could not run ends in one error frame whose reason is limit, paused or not_found; a message naming a file that is not yours or was already sent ends in an error frame with no reason and nothing saved; any other failure is an error frame with no reason. A turn that breaks while running still ends in a result whose reply carries failed, and so does a stopped one, its reply reading Stopped by you.
Closing the connection does not cancel the turn: it finishes and saves its reply, so reopening the conversation shows the answer.
curl --request POST \
--url https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"attachment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"page": {
"entity_id": "<string>",
"entity_name": "<string>",
"entity_type": "<string>",
"page_name": "<string>",
"route": "<string>",
"selected_step_id": "<string>",
"selected_step_label": "<string>"
},
"pasted": [
"<string>"
],
"quote": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/"
payload = {
"prompt": "<string>",
"attachment_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"page": {
"entity_id": "<string>",
"entity_name": "<string>",
"entity_type": "<string>",
"page_name": "<string>",
"route": "<string>",
"selected_step_id": "<string>",
"selected_step_label": "<string>"
},
"pasted": ["<string>"],
"quote": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
attachment_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
page: {
entity_id: '<string>',
entity_name: '<string>',
entity_type: '<string>',
page_name: '<string>',
route: '<string>',
selected_step_id: '<string>',
selected_step_label: '<string>'
},
pasted: ['<string>'],
quote: '<string>'
})
};
fetch('https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/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([
'prompt' => '<string>',
'attachment_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'page' => [
'entity_id' => '<string>',
'entity_name' => '<string>',
'entity_type' => '<string>',
'page_name' => '<string>',
'route' => '<string>',
'selected_step_id' => '<string>',
'selected_step_label' => '<string>'
],
'pasted' => [
'<string>'
],
'quote' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/assistant/chat/conversations/{conversation_id}/messages/stream/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"page\": {\n \"entity_id\": \"<string>\",\n \"entity_name\": \"<string>\",\n \"entity_type\": \"<string>\",\n \"page_name\": \"<string>\",\n \"route\": \"<string>\",\n \"selected_step_id\": \"<string>\",\n \"selected_step_label\": \"<string>\"\n },\n \"pasted\": [\n \"<string>\"\n ],\n \"quote\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body<string>{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Send the AI Assistant a message.
1 - 4000The files sent with this message, as the attachments route returned them when they were uploaded: CSV, Excel or PDF, each of them yours and not yet sent with another message. The assistant reads a spreadsheet's columns and rows and a PDF's pages. Optional.
10What you have open, so the assistant can resolve 'this table' without you naming it. Optional.
Show child attributes
Show child attributes
A list you pasted rather than typed: domains, emails, names, one per entry. Sent as data instead of prose, so the assistant reads it as a list and the conversation shows it as a count rather than a wall of text. Optional.
1000200Part of an earlier reply you selected, sent with your words so the assistant knows what they refer to. Kept with the message and shown above it in the conversation. Optional.
1 - 2000Response
A stream of Server-Sent Events. The final result frame's data is a turn; an error frame's data is a stream error.
Both halves of one turn, as saved.
The user message too, not just the reply: the client drew its own copy before sending and reconciles it against this one.
Was this page helpful?