curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "brahma-30b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 0.7,
"max_tokens": 256,
"stream": false
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions"
payload = {
"model": "brahma-30b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 0.7,
"max_tokens": 256,
"stream": False
}
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({
model: 'brahma-30b',
messages: [
{role: 'system', content: 'You are a helpful assistant.'},
{role: 'user', content: 'Hello!'}
],
temperature: 0.7,
max_tokens: 256,
stream: false
})
};
fetch('https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions', 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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions",
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([
'model' => 'brahma-30b',
'messages' => [
[
'role' => 'system',
'content' => 'You are a helpful assistant.'
],
[
'role' => 'user',
'content' => 'Hello!'
]
],
'temperature' => 0.7,
'max_tokens' => 256,
'stream' => false
]),
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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions")
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 \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_bodyProxy Chat Completions
OpenAI-compatible chat completions, org-scoped by the caller’s PeachDesk
API key, stream-proxied to the self-hosted BRAHMA LLM plane selected by the
request’s model.
MODEL-BASED PLANE ROUTING: model == "brahma-30b-reasoning" is served on
the dedicated reasoning endpoint (VOICE_ENGINE_REASONING_URL); every other
model rides the shared plane (VOICE_ENGINE_LLM_URL) exactly as before. Only
the upstream base URL differs — the raw body relays verbatim (so
reasoning_effort passes through untouched) and the response/usage relay is
identical (reasoning_tokens inside completion_tokens_details count as
output for billing, so metering is unchanged).
Returns 503 when the selected plane’s URL is unset (the shared plane for
normal models, the reasoning plane for brahma-30b-reasoning) and 400 when
the caller has no selected org. Upstream 502/503 received before any bytes
were relayed (RunPod worker churn) is retried up to 2 more times with
short backoff; terminal upstream errors map via
_upstream_error_response (engine OpenAI-style errors verbatim, JSON
4xx reasons relayed, HTML/garbage replaced by a clean 503 envelope) and
timeout/connect failures as 502. Token usage is metered per org after
the relay completes.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "brahma-30b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 0.7,
"max_tokens": 256,
"stream": false
}
'import requests
url = "https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions"
payload = {
"model": "brahma-30b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 0.7,
"max_tokens": 256,
"stream": False
}
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({
model: 'brahma-30b',
messages: [
{role: 'system', content: 'You are a helpful assistant.'},
{role: 'user', content: 'Hello!'}
],
temperature: 0.7,
max_tokens: 256,
stream: false
})
};
fetch('https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions', 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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions",
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([
'model' => 'brahma-30b',
'messages' => [
[
'role' => 'system',
'content' => 'You are a helpful assistant.'
],
[
'role' => 'user',
'content' => 'Hello!'
]
],
'temperature' => 0.7,
'max_tokens' => 256,
'stream' => false
]),
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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\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.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/voice-engine/llm/v1/chat/completions")
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 \"model\": \"brahma-30b\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 256,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Body
OpenAI-compatible chat completion request. Additional OpenAI parameters not listed here are forwarded to the engine unchanged.
Model id from GET /v1/models. brahma-30b-reasoning is served on the dedicated reasoning plane.
"brahma-30b"
The conversation so far.
1Show child attributes
Show child attributes
0 <= x <= 2Output token ceiling. Omitted leaves the engine's realtime default.
1 <= x <= 4096Stream the completion back as server-sent events.
0 <= x <= 1Up to a few stop sequences.
Response
Successful Response

