Image Generation
Chat
Chat Completion
Receives a series of messages as input to generate a contextually relevant chat response using a large language model (LLM).
POST
/
chat
/
completions
Copy
Ask AI
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": "none",
"autoTurn": false
}'
Copy
Ask AI
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"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"
]
}
],
"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
application/json
Response
200 - application/json
The generated response along with relevant metadata.
The response is of type object
.
Copy
Ask AI
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": "none",
"autoTurn": false
}'
Copy
Ask AI
{
"id": "<string>",
"object": "<string>",
"created": 123,
"model": "<string>",
"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"
]
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"compliance_violations": [
"drug_use"
]
}
Assistant
Responses are generated using AI and may contain mistakes.