Start an operator conversation
curl --request POST \
--url https://api.cool.computer/api/operator/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"turn_id": "<string>",
"title": "<string>",
"message": "<string>",
"default_computer_id": "<string>",
"computer_reference_ids": [
"<string>"
],
"attachment_ids": [
"<string>"
]
}
'import requests
url = "https://api.cool.computer/api/operator/conversations"
payload = {
"turn_id": "<string>",
"title": "<string>",
"message": "<string>",
"default_computer_id": "<string>",
"computer_reference_ids": ["<string>"],
"attachment_ids": ["<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({
turn_id: '<string>',
title: '<string>',
message: '<string>',
default_computer_id: '<string>',
computer_reference_ids: ['<string>'],
attachment_ids: ['<string>']
})
};
fetch('https://api.cool.computer/api/operator/conversations', 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.cool.computer/api/operator/conversations",
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([
'turn_id' => '<string>',
'title' => '<string>',
'message' => '<string>',
'default_computer_id' => '<string>',
'computer_reference_ids' => [
'<string>'
],
'attachment_ids' => [
'<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.cool.computer/api/operator/conversations"
payload := strings.NewReader("{\n \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\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.cool.computer/api/operator/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cool.computer/api/operator/conversations")
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 \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"title": "<string>",
"pi_version": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default_computer_id": "<string>",
"status": "running"
},
"turn": {
"id": "<string>",
"source": "browser",
"message": "<string>",
"state": "queued",
"attempt": 1,
"cancellation_requested": true,
"presented": true,
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"media_type": "<string>",
"size_bytes": 1,
"width": 2,
"height": 2
}
],
"provider": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"computer_id": "<string>",
"usage": "<unknown>",
"error": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
},
"status_stream_cursor": 1
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}Operator
Start an operator conversation
Starts a conversation with the account operator and queues its first turn. turn_id is a caller-chosen opt_ identity that makes the call safe to retry. Callers: the account owner with a user API key, user access token, claimed agent access token, or MCP token; organization API keys are refused.
POST
/
api
/
operator
/
conversations
Start an operator conversation
curl --request POST \
--url https://api.cool.computer/api/operator/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"turn_id": "<string>",
"title": "<string>",
"message": "<string>",
"default_computer_id": "<string>",
"computer_reference_ids": [
"<string>"
],
"attachment_ids": [
"<string>"
]
}
'import requests
url = "https://api.cool.computer/api/operator/conversations"
payload = {
"turn_id": "<string>",
"title": "<string>",
"message": "<string>",
"default_computer_id": "<string>",
"computer_reference_ids": ["<string>"],
"attachment_ids": ["<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({
turn_id: '<string>',
title: '<string>',
message: '<string>',
default_computer_id: '<string>',
computer_reference_ids: ['<string>'],
attachment_ids: ['<string>']
})
};
fetch('https://api.cool.computer/api/operator/conversations', 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.cool.computer/api/operator/conversations",
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([
'turn_id' => '<string>',
'title' => '<string>',
'message' => '<string>',
'default_computer_id' => '<string>',
'computer_reference_ids' => [
'<string>'
],
'attachment_ids' => [
'<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.cool.computer/api/operator/conversations"
payload := strings.NewReader("{\n \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\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.cool.computer/api/operator/conversations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cool.computer/api/operator/conversations")
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 \"turn_id\": \"<string>\",\n \"title\": \"<string>\",\n \"message\": \"<string>\",\n \"default_computer_id\": \"<string>\",\n \"computer_reference_ids\": [\n \"<string>\"\n ],\n \"attachment_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"conversation": {
"id": "<string>",
"title": "<string>",
"pi_version": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"default_computer_id": "<string>",
"status": "running"
},
"turn": {
"id": "<string>",
"source": "browser",
"message": "<string>",
"state": "queued",
"attempt": 1,
"cancellation_requested": true,
"presented": true,
"attachments": [
{
"id": "<string>",
"filename": "<string>",
"media_type": "<string>",
"size_bytes": 1,
"width": 2,
"height": 2
}
],
"provider": "<string>",
"model": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"computer_id": "<string>",
"usage": "<unknown>",
"error": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
},
"status_stream_cursor": 1
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"context": {}
}Authorizations
A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.
Body
application/json
Pattern:
^opt_[A-Za-z0-9_-]{24}$The conversation title; blank or whitespace-only titles are refused with 400.
Required string length:
1 - 200Pattern:
\SMinimum string length:
1
