Chat inference
Create Response
OpenAI-compatible response generation. The request body follows the OpenAI Responses API.
POST
/
response
Create Response
curl --request POST \
--url https://rei-api.reilabs.org/v1/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "google/gemini-2.5-flash",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"stream": true,
"store": true,
"previous_response_id": "<string>",
"parallel_tool_calls": true,
"metadata": {},
"text": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": true
}
}
]
}
'import requests
url = "https://rei-api.reilabs.org/v1/response"
payload = {
"input": "<string>",
"model": "google/gemini-2.5-flash",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"stream": True,
"store": True,
"previous_response_id": "<string>",
"parallel_tool_calls": True,
"metadata": {},
"text": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": True
}
}
]
}
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({
input: '<string>',
model: 'google/gemini-2.5-flash',
instructions: '<string>',
max_output_tokens: 2,
temperature: 1,
top_p: 0.5,
stream: true,
store: true,
previous_response_id: '<string>',
parallel_tool_calls: true,
metadata: {},
text: {},
tools: [
{
type: 'function',
function: {name: '<string>', parameters: {}, description: '<string>', strict: true}
}
]
})
};
fetch('https://rei-api.reilabs.org/v1/response', 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://rei-api.reilabs.org/v1/response",
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([
'input' => '<string>',
'model' => 'google/gemini-2.5-flash',
'instructions' => '<string>',
'max_output_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'stream' => true,
'store' => true,
'previous_response_id' => '<string>',
'parallel_tool_calls' => true,
'metadata' => [
],
'text' => [
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'parameters' => [
],
'description' => '<string>',
'strict' => true
]
]
]
]),
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://rei-api.reilabs.org/v1/response"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\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://rei-api.reilabs.org/v1/response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rei-api.reilabs.org/v1/response")
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 \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"created_at": 123,
"model": "<string>",
"output": [
{
"type": "message",
"id": "<string>",
"role": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>"
}
]
}
],
"output_text": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Authorizations
Unit API Key
Body
application/json
Text, image, or file inputs to the model. A string or an array of input items.
Model to use. Defaults to agent's configured model.
Available options:
google/gemini-2.5-flash System (developer) message inserted into the model's context.
Upper bound for the number of tokens generated, including reasoning tokens.
Required range:
x >= 1Required range:
0 <= x <= 2Required range:
0 <= x <= 1Whether to store the generated response for later retrieval.
The unique ID of the previous response, used for multi-turn conversations.
Set of key-value pairs that can be attached to the response.
Show child attributes
Show child attributes
Configuration options for the text response from the model.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
none, auto, required Response
Response object
⌘I
Create Response
curl --request POST \
--url https://rei-api.reilabs.org/v1/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "google/gemini-2.5-flash",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"stream": true,
"store": true,
"previous_response_id": "<string>",
"parallel_tool_calls": true,
"metadata": {},
"text": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": true
}
}
]
}
'import requests
url = "https://rei-api.reilabs.org/v1/response"
payload = {
"input": "<string>",
"model": "google/gemini-2.5-flash",
"instructions": "<string>",
"max_output_tokens": 2,
"temperature": 1,
"top_p": 0.5,
"stream": True,
"store": True,
"previous_response_id": "<string>",
"parallel_tool_calls": True,
"metadata": {},
"text": {},
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": True
}
}
]
}
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({
input: '<string>',
model: 'google/gemini-2.5-flash',
instructions: '<string>',
max_output_tokens: 2,
temperature: 1,
top_p: 0.5,
stream: true,
store: true,
previous_response_id: '<string>',
parallel_tool_calls: true,
metadata: {},
text: {},
tools: [
{
type: 'function',
function: {name: '<string>', parameters: {}, description: '<string>', strict: true}
}
]
})
};
fetch('https://rei-api.reilabs.org/v1/response', 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://rei-api.reilabs.org/v1/response",
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([
'input' => '<string>',
'model' => 'google/gemini-2.5-flash',
'instructions' => '<string>',
'max_output_tokens' => 2,
'temperature' => 1,
'top_p' => 0.5,
'stream' => true,
'store' => true,
'previous_response_id' => '<string>',
'parallel_tool_calls' => true,
'metadata' => [
],
'text' => [
],
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'parameters' => [
],
'description' => '<string>',
'strict' => true
]
]
]
]),
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://rei-api.reilabs.org/v1/response"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\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://rei-api.reilabs.org/v1/response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rei-api.reilabs.org/v1/response")
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 \"input\": \"<string>\",\n \"model\": \"google/gemini-2.5-flash\",\n \"instructions\": \"<string>\",\n \"max_output_tokens\": 2,\n \"temperature\": 1,\n \"top_p\": 0.5,\n \"stream\": true,\n \"store\": true,\n \"previous_response_id\": \"<string>\",\n \"parallel_tool_calls\": true,\n \"metadata\": {},\n \"text\": {},\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"description\": \"<string>\",\n \"strict\": true\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "response",
"created_at": 123,
"model": "<string>",
"output": [
{
"type": "message",
"id": "<string>",
"role": "<string>",
"content": [
{
"type": "output_text",
"text": "<string>"
}
]
}
],
"output_text": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}