curl --request POST \
--url https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/stream/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_description": "<string>",
"reference_material": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/stream/"
payload = {
"task_description": "<string>",
"reference_material": "<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({task_description: '<string>', reference_material: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/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/table-enrichments/saved-agents/generate/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([
'task_description' => '<string>',
'reference_material' => '<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/table-enrichments/saved-agents/generate/stream/"
payload := strings.NewReader("{\n \"task_description\": \"<string>\",\n \"reference_material\": \"<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/table-enrichments/saved-agents/generate/stream/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_description\": \"<string>\",\n \"reference_material\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/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 \"task_description\": \"<string>\",\n \"reference_material\": \"<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>"
}Generate an agent draft from a task, streaming its work
Expand a natural-language task into a complete agent draft — a structured prompt with placeholders, a name and icon, typed output fields and sample test cases — streamed as Server-Sent Events. The first frame is turn, carrying the generation_id a Stop is sent to; then a step frame for each thing the builder actually did (read_context when the workspace has written its business context, write_instructions, choose_outputs, write_examples, finish), each with its measured duration; then one result frame with the draft.
Failures arrive as an error frame, because the stream has already answered 200: reason limit or paused when the workspace’s daily AI Assistant allowance refused the build, stopped when the caller stopped it, and no reason for anything else. Counts against the allowance; a stopped or failed build gives its turn back.
Closing the connection does not stop the build; the Stop route does.
curl --request POST \
--url https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/stream/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task_description": "<string>",
"reference_material": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/stream/"
payload = {
"task_description": "<string>",
"reference_material": "<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({task_description: '<string>', reference_material: '<string>'})
};
fetch('https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/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/table-enrichments/saved-agents/generate/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([
'task_description' => '<string>',
'reference_material' => '<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/table-enrichments/saved-agents/generate/stream/"
payload := strings.NewReader("{\n \"task_description\": \"<string>\",\n \"reference_material\": \"<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/table-enrichments/saved-agents/generate/stream/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task_description\": \"<string>\",\n \"reference_material\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/table-enrichments/saved-agents/generate/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 \"task_description\": \"<string>\",\n \"reference_material\": \"<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.
Body
A natural-language task to expand into a full agent draft.
Response
A stream of Server-Sent Events; the final result frame's data is the generated draft.
The AI-built agent draft the editor seeds itself from.
Was this page helpful?