curl --request POST \
--url https://api.animusai.co/v2/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "You are having a conversation with a friend.",
"role": "system"
},
{
"content": "Hey, what have you been up to?",
"role": "user"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"max_tokens": 150,
"stop": [
"<|im_end|>"
],
"stream": false,
"presence_penalty": 1,
"frequency_penalty": 1,
"best_of": 1,
"top_k": 40,
"repetition_penalty": 1,
"min_p": 0,
"length_penalty": 1,
"compliance": true,
"model": "animuslabs/Vivian-llama3.1-70b-1.0-fp8",
"reasoning": false,
"check_image_generation": false,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "auto",
"autoTurn": false
}
'import requests
url = "https://api.animusai.co/v2/chat/completions"
payload = {
"messages": [
{
"content": "You are having a conversation with a friend.",
"role": "system"
},
{
"content": "Hey, what have you been up to?",
"role": "user"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"max_tokens": 150,
"stop": ["<|im_end|>"],
"stream": False,
"presence_penalty": 1,
"frequency_penalty": 1,
"best_of": 1,
"top_k": 40,
"repetition_penalty": 1,
"min_p": 0,
"length_penalty": 1,
"compliance": True,
"model": "animuslabs/Vivian-llama3.1-70b-1.0-fp8",
"reasoning": False,
"check_image_generation": False,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "auto",
"autoTurn": 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({
messages: [
{content: 'You are having a conversation with a friend.', role: 'system'},
{content: 'Hey, what have you been up to?', role: 'user'}
],
temperature: 1,
top_p: 1,
n: 1,
max_tokens: 150,
stop: ['<|im_end|>'],
stream: false,
presence_penalty: 1,
frequency_penalty: 1,
best_of: 1,
top_k: 40,
repetition_penalty: 1,
min_p: 0,
length_penalty: 1,
compliance: true,
model: 'animuslabs/Vivian-llama3.1-70b-1.0-fp8',
reasoning: false,
check_image_generation: false,
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}}
}
],
tool_choice: 'auto',
autoTurn: false
})
};
fetch('https://api.animusai.co/v2/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.animusai.co/v2/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([
'messages' => [
[
'content' => 'You are having a conversation with a friend.',
'role' => 'system'
],
[
'content' => 'Hey, what have you been up to?',
'role' => 'user'
]
],
'temperature' => 1,
'top_p' => 1,
'n' => 1,
'max_tokens' => 150,
'stop' => [
'<|im_end|>'
],
'stream' => false,
'presence_penalty' => 1,
'frequency_penalty' => 1,
'best_of' => 1,
'top_k' => 40,
'repetition_penalty' => 1,
'min_p' => 0,
'length_penalty' => 1,
'compliance' => true,
'model' => 'animuslabs/Vivian-llama3.1-70b-1.0-fp8',
'reasoning' => false,
'check_image_generation' => false,
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
]
]
]
],
'tool_choice' => 'auto',
'autoTurn' => 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.animusai.co/v2/chat/completions"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": 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.animusai.co/v2/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.animusai.co/v2/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 \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created": 123,
"choices": [
{
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"reasoning": "<string>",
"image_prompt": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"turns": [
"<string>"
],
"next": true
},
"finish_reason": "<string>",
"compliance_violations": [
"pedophilia"
]
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"compliance_violations": [
"drug_use"
]
}Chat Completion
Receives a series of messages as input to generate a contextually relevant chat response using a large language model (LLM).
curl --request POST \
--url https://api.animusai.co/v2/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"content": "You are having a conversation with a friend.",
"role": "system"
},
{
"content": "Hey, what have you been up to?",
"role": "user"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"max_tokens": 150,
"stop": [
"<|im_end|>"
],
"stream": false,
"presence_penalty": 1,
"frequency_penalty": 1,
"best_of": 1,
"top_k": 40,
"repetition_penalty": 1,
"min_p": 0,
"length_penalty": 1,
"compliance": true,
"model": "animuslabs/Vivian-llama3.1-70b-1.0-fp8",
"reasoning": false,
"check_image_generation": false,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "auto",
"autoTurn": false
}
'import requests
url = "https://api.animusai.co/v2/chat/completions"
payload = {
"messages": [
{
"content": "You are having a conversation with a friend.",
"role": "system"
},
{
"content": "Hey, what have you been up to?",
"role": "user"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"max_tokens": 150,
"stop": ["<|im_end|>"],
"stream": False,
"presence_penalty": 1,
"frequency_penalty": 1,
"best_of": 1,
"top_k": 40,
"repetition_penalty": 1,
"min_p": 0,
"length_penalty": 1,
"compliance": True,
"model": "animuslabs/Vivian-llama3.1-70b-1.0-fp8",
"reasoning": False,
"check_image_generation": False,
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {}
}
}
],
"tool_choice": "auto",
"autoTurn": 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({
messages: [
{content: 'You are having a conversation with a friend.', role: 'system'},
{content: 'Hey, what have you been up to?', role: 'user'}
],
temperature: 1,
top_p: 1,
n: 1,
max_tokens: 150,
stop: ['<|im_end|>'],
stream: false,
presence_penalty: 1,
frequency_penalty: 1,
best_of: 1,
top_k: 40,
repetition_penalty: 1,
min_p: 0,
length_penalty: 1,
compliance: true,
model: 'animuslabs/Vivian-llama3.1-70b-1.0-fp8',
reasoning: false,
check_image_generation: false,
tools: [
{
type: 'function',
function: {name: '<string>', description: '<string>', parameters: {}}
}
],
tool_choice: 'auto',
autoTurn: false
})
};
fetch('https://api.animusai.co/v2/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.animusai.co/v2/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([
'messages' => [
[
'content' => 'You are having a conversation with a friend.',
'role' => 'system'
],
[
'content' => 'Hey, what have you been up to?',
'role' => 'user'
]
],
'temperature' => 1,
'top_p' => 1,
'n' => 1,
'max_tokens' => 150,
'stop' => [
'<|im_end|>'
],
'stream' => false,
'presence_penalty' => 1,
'frequency_penalty' => 1,
'best_of' => 1,
'top_k' => 40,
'repetition_penalty' => 1,
'min_p' => 0,
'length_penalty' => 1,
'compliance' => true,
'model' => 'animuslabs/Vivian-llama3.1-70b-1.0-fp8',
'reasoning' => false,
'check_image_generation' => false,
'tools' => [
[
'type' => 'function',
'function' => [
'name' => '<string>',
'description' => '<string>',
'parameters' => [
]
]
]
],
'tool_choice' => 'auto',
'autoTurn' => 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.animusai.co/v2/chat/completions"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": 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.animusai.co/v2/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.animusai.co/v2/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 \"messages\": [\n {\n \"content\": \"You are having a conversation with a friend.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"Hey, what have you been up to?\",\n \"role\": \"user\"\n }\n ],\n \"temperature\": 1,\n \"top_p\": 1,\n \"n\": 1,\n \"max_tokens\": 150,\n \"stop\": [\n \"<|im_end|>\"\n ],\n \"stream\": false,\n \"presence_penalty\": 1,\n \"frequency_penalty\": 1,\n \"best_of\": 1,\n \"top_k\": 40,\n \"repetition_penalty\": 1,\n \"min_p\": 0,\n \"length_penalty\": 1,\n \"compliance\": true,\n \"model\": \"animuslabs/Vivian-llama3.1-70b-1.0-fp8\",\n \"reasoning\": false,\n \"check_image_generation\": false,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"parameters\": {}\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"autoTurn\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created": 123,
"choices": [
{
"index": 123,
"message": {
"role": "<string>",
"content": "<string>",
"reasoning": "<string>",
"image_prompt": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"turns": [
"<string>"
],
"next": true
},
"finish_reason": "<string>",
"compliance_violations": [
"pedophilia"
]
}
],
"model": "<string>",
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"compliance_violations": [
"drug_use"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A chronological list of messages that compose the current conversation.
Show child attributes
Show child attributes
Adjusts randomness in the response generation, with lower values yielding more predictable responses.
Filters the token set to those with cumulative probability above this threshold, influencing diversity.
Number of alternate responses to generate.
Caps the number of tokens in the generated response. Lacks a default to allow model-specific limits.
A set of strings which, when generated, signal the model to cease response generation.
If set to true, the response is streamed back to the client as it's being generated.
Adjusts likelihood of new words based on their existing presence in the text. Discourages repetition when positive.
Penalizes words based on their frequency in the document to encourage diversity.
Generates several completions server-side and returns the best. The definition of "best" depends on model and settings.
Limits consideration to the top k tokens, diversifying outputs by reducing predictability.
Modifies likelihood of repeating tokens based on their previous occurrence, counteracting model's repetition tendency.
Sets a minimum probability threshold for tokens to be considered for generation, further filtering the possible outputs.
Adjusts the impact of sequence length on selection, encouraging shorter or longer responses.
When true, verifies if the response contains any violations such as inappropriate content.
The model to use for generating the response.
"animuslabs/Vivian-llama3.1-70b-1.0-fp8"
When true, enables reasoning/thinking content from the model. For non-streaming responses, adds a reasoning field. For streaming, thinking content appears in the stream.
⚠️ ALPHA FEATURE: When true, the AI analyzes its response and creates an image_prompt field if an image is requested or desired. This feature is in alpha state and not recommended for production use.
A list of tools the model may call. Currently, only functions are supported as a tool.
Show child attributes
Show child attributes
Controls which (if any) tool is called by the model.
none, auto When true, splits the API response into individual conversational turns returned as an array called 'turns'.
Response
The generated response along with relevant metadata.
Unique identifier for the chat completion provided by the system.
Type indicator for the object, typically 'chat.completion'.
Unix timestamp when the response was created.
Contains the generated responses, along with meta-information about each.
Show child attributes
Show child attributes
Identifier for the model used in generating the response.
Show child attributes
Show child attributes
List of detected content violations when compliance checking is enabled.
pedophilia, beastiality, murder, rape, incest, gore, prostitution, drug_use ["drug_use"]
