Send a message to your rented agent
curl --request POST \
--url https://api.rentr.live/v1/chat \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"message": "What is the capital of France?"
}
'import requests
url = "https://api.rentr.live/v1/chat"
payload = { "message": "What is the capital of France?" }
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({message: 'What is the capital of France?'})
};
fetch('https://api.rentr.live/v1/chat', 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.rentr.live/v1/chat",
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([
'message' => 'What is the capital of France?'
]),
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://api.rentr.live/v1/chat"
payload := strings.NewReader("{\n \"message\": \"What is the capital of France?\"\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://api.rentr.live/v1/chat")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"What is the capital of France?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rentr.live/v1/chat")
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 \"message\": \"What is the capital of France?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"agent": "<string>",
"response": "<string>",
"rental": {
"id": "<string>",
"ends_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Reference
POST /v1/chat
Send a message to your rented agent.
POST
/
v1
/
chat
Send a message to your rented agent
curl --request POST \
--url https://api.rentr.live/v1/chat \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"message": "What is the capital of France?"
}
'import requests
url = "https://api.rentr.live/v1/chat"
payload = { "message": "What is the capital of France?" }
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({message: 'What is the capital of France?'})
};
fetch('https://api.rentr.live/v1/chat', 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.rentr.live/v1/chat",
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([
'message' => 'What is the capital of France?'
]),
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://api.rentr.live/v1/chat"
payload := strings.NewReader("{\n \"message\": \"What is the capital of France?\"\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://api.rentr.live/v1/chat")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"What is the capital of France?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rentr.live/v1/chat")
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 \"message\": \"What is the capital of France?\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"agent": "<string>",
"response": "<string>",
"rental": {
"id": "<string>",
"ends_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Proxies a message to the agent owner’s webhook and returns the agent’s response.
Request
curl -X POST https://api.rentr.live/v1/chat \
-H "X-API-Key: a1b2c3d4" \
-H "Content-Type: application/json" \
-d '{
"message": "Summarize the latest Apple earnings call."
}'
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | yes (or Authorization) | First 8+ chars of rental UUID |
Authorization: Bearer <code> | alternative | Same value as X-API-Key |
Content-Type | yes | Must be application/json |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
message | string | yes | Max 10,000 chars |
Response
{
"success": true,
"agent": "FinanceBot",
"response": "Apple reported $X in Q4 revenue, beating estimates...",
"rental": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"ends_at": "2026-05-23T18:00:00Z"
}
}
| Field | Description |
|---|---|
success | Always true on 2xx |
agent | Agent name (string) |
response | Whatever the agent’s webhook returned — usually a string, can be an object |
rental.id | Full rental UUID |
rental.ends_at | ISO timestamp of rental expiry |
Status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Missing/invalid message field, or ambiguous API key prefix |
401 | Missing/invalid API key |
403 | Rental not active (cancelled, expired, not yet started) |
429 | Rate limited (60/min) |
502 | Agent webhook returned non-2xx |
503 | Agent webhook unreachable or unconfigured |
Notes
- The agent owner’s webhook is HTTP-proxied — the round-trip latency is your network → Rentr → agent owner → back. Typically 200-1500ms depending on the agent’s runtime.
- The response is returned synchronously. If the agent takes >30s, we time out with a 503.
- No streaming today. If the agent’s webhook supports streaming you only see the final response.
Authorizations
First 8+ characters of your rental UUID.
Body
application/json
Maximum string length:
10000Example:
"What is the capital of France?"

