Skip to main content
POST
/
tc
/
{version}
Text Classification
curl --request POST \
  --url https://api.ragbuddy.ai/tc/{version} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'helvia-rag-buddy-token: <helvia-rag-buddy-token>' \
  --data '
{
  "remote_llm_url": "<string>",
  "user_message": "<string>",
  "system_instructions": "<string>"
}
'
import requests

url = "https://api.ragbuddy.ai/tc/{version}"

payload = {
"remote_llm_url": "<string>",
"user_message": "<string>",
"system_instructions": "<string>"
}
headers = {
"helvia-rag-buddy-token": "<helvia-rag-buddy-token>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'helvia-rag-buddy-token': '<helvia-rag-buddy-token>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
remote_llm_url: '<string>',
user_message: '<string>',
system_instructions: '<string>'
})
};

fetch('https://api.ragbuddy.ai/tc/{version}', 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.ragbuddy.ai/tc/{version}",
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([
'remote_llm_url' => '<string>',
'user_message' => '<string>',
'system_instructions' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"helvia-rag-buddy-token: <helvia-rag-buddy-token>"
],
]);

$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.ragbuddy.ai/tc/{version}"

payload := strings.NewReader("{\n \"remote_llm_url\": \"<string>\",\n \"user_message\": \"<string>\",\n \"system_instructions\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("helvia-rag-buddy-token", "<helvia-rag-buddy-token>")
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.ragbuddy.ai/tc/{version}")
.header("helvia-rag-buddy-token", "<helvia-rag-buddy-token>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"remote_llm_url\": \"<string>\",\n \"user_message\": \"<string>\",\n \"system_instructions\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.ragbuddy.ai/tc/{version}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["helvia-rag-buddy-token"] = '<helvia-rag-buddy-token>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"remote_llm_url\": \"<string>\",\n \"user_message\": \"<string>\",\n \"system_instructions\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "content": "<string>",
        "role": "<unknown>",
        "function_call": {
          "arguments": "<string>",
          "name": "<string>"
        },
        "tool_calls": [
          {
            "id": "<string>",
            "function": {
              "arguments": "<string>",
              "name": "<string>"
            },
            "type": "<unknown>"
          }
        ]
      }
    }
  ],
  "created": 123,
  "model": "<string>",
  "object": "<unknown>",
  "system_fingerprint": "<string>",
  "usage": {
    "completion_tokens": 123,
    "prompt_tokens": 123,
    "total_tokens": 123
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

helvia-rag-buddy-token
string
required

Path Parameters

version
string
required

Version of the API to use

Allowed value: "v1"

Body

application/json
remote_llm_url
string
required
user_message
string
required
system_instructions
string
required

Response

Successful Response

id
string
required
choices
Choice · object[]
required
created
integer
required
model
string
required
object
any
required
system_fingerprint
string | null
usage
CompletionUsage · object | null