Send Message
curl --request POST \
--url https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"conversation_id": "<string>"
}
'import requests
url = "https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages"
payload = {
"content": "<string>",
"conversation_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', conversation_id: '<string>'})
};
fetch('https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages', 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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages",
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([
'content' => '<string>',
'conversation_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyContent-Type: text/event-stream
data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
data: {"type":"done"}
Instances
Send Message
POST
/
v1
/
agents
/
{agentId}
/
instances
/
{id}
/
messages
Send Message
curl --request POST \
--url https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"content": "<string>",
"conversation_id": "<string>"
}
'import requests
url = "https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages"
payload = {
"content": "<string>",
"conversation_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', conversation_id: '<string>'})
};
fetch('https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages', 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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages",
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([
'content' => '<string>',
'conversation_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.opencomputer.dev/v1/agents/{agentId}/instances/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"conversation_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyContent-Type: text/event-stream
data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
data: {"type":"done"}
Send a message to an agent instance. Returns a server-sent event stream with the agent’s response.
If the instance is still
creating, waits up to 30s for it to become ready.
string
required
Agent ID
string
required
Instance ID
string
required
Message content
string
Conversation identifier for multiplexing. The caller owns this identity (e.g. Slack thread timestamp).
Content-Type: text/event-stream
data: {"type":"text","content":"Cloning the repo now...","conversation_id":"1712345678.123456"}
data: {"type":"text","content":"Found 3 issues...","conversation_id":"1712345678.123456"}
data: {"type":"done"}
⌘I