Unit and agent management
Agent Creation
Create a Rei Agent using the user’s secret token.
POST
/
accounts
/
units
Agent Creation
curl --request POST \
--url https://api.reilabs.org/v1/accounts/units \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentModel": "google/gemini-2.5-flash",
"tag": "<string>",
"behaviourPrompt": "<string>",
"temperature": 0,
"maxTokens": 1000000,
"color": "#FFFFFF"
}
'import requests
url = "https://api.reilabs.org/v1/accounts/units"
payload = {
"agentModel": "google/gemini-2.5-flash",
"tag": "<string>",
"behaviourPrompt": "<string>",
"temperature": 0,
"maxTokens": 1000000,
"color": "#FFFFFF"
}
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({
agentModel: 'google/gemini-2.5-flash',
tag: '<string>',
behaviourPrompt: '<string>',
temperature: 0,
maxTokens: 1000000,
color: '#FFFFFF'
})
};
fetch('https://api.reilabs.org/v1/accounts/units', 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.reilabs.org/v1/accounts/units",
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([
'agentModel' => 'google/gemini-2.5-flash',
'tag' => '<string>',
'behaviourPrompt' => '<string>',
'temperature' => 0,
'maxTokens' => 1000000,
'color' => '#FFFFFF'
]),
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.reilabs.org/v1/accounts/units"
payload := strings.NewReader("{\n \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\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.reilabs.org/v1/accounts/units")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reilabs.org/v1/accounts/units")
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 \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\n}"
response = http.request(request)
puts response.read_body{
"secretToken": "<string>"
}Authorizations
Account API Key from Rei Portal
Body
application/json
The model to use for the agent
Available options:
google/gemini-2.5-flash Tag to identify your unit
The behaviour prompt for the agent
Required range:
0 <= x <= 1Required range:
1 <= x <= 2000000Available options:
text, json, markdown, html Color code in Hex format
Pattern:
^#[0-9A-Fa-f]{6}$Example:
"#FFFFFF"
Response
Agent created successfully
⌘I
Agent Creation
curl --request POST \
--url https://api.reilabs.org/v1/accounts/units \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentModel": "google/gemini-2.5-flash",
"tag": "<string>",
"behaviourPrompt": "<string>",
"temperature": 0,
"maxTokens": 1000000,
"color": "#FFFFFF"
}
'import requests
url = "https://api.reilabs.org/v1/accounts/units"
payload = {
"agentModel": "google/gemini-2.5-flash",
"tag": "<string>",
"behaviourPrompt": "<string>",
"temperature": 0,
"maxTokens": 1000000,
"color": "#FFFFFF"
}
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({
agentModel: 'google/gemini-2.5-flash',
tag: '<string>',
behaviourPrompt: '<string>',
temperature: 0,
maxTokens: 1000000,
color: '#FFFFFF'
})
};
fetch('https://api.reilabs.org/v1/accounts/units', 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.reilabs.org/v1/accounts/units",
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([
'agentModel' => 'google/gemini-2.5-flash',
'tag' => '<string>',
'behaviourPrompt' => '<string>',
'temperature' => 0,
'maxTokens' => 1000000,
'color' => '#FFFFFF'
]),
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.reilabs.org/v1/accounts/units"
payload := strings.NewReader("{\n \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\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.reilabs.org/v1/accounts/units")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reilabs.org/v1/accounts/units")
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 \"agentModel\": \"google/gemini-2.5-flash\",\n \"tag\": \"<string>\",\n \"behaviourPrompt\": \"<string>\",\n \"temperature\": 0,\n \"maxTokens\": 1000000,\n \"color\": \"#FFFFFF\"\n}"
response = http.request(request)
puts response.read_body{
"secretToken": "<string>"
}