Embeddings
Completions
Chat Completions
Chat Text+Vision
Get Your Usage Stats
List Embedding Models
List LLM (Text-only) Models
List Multi-Modal (Text+Vision) Models
API Server Health Check
Chat Completions
Chat Text
POST
/
inference
/
chat_text
curl --request POST \
--url https://api.nugen.in/inference/chat_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"max_tokens": 200,
"messages": [
{
"content": "Hello, how are you?",
"role": "user"
},
{
"content": "I'\''m good, thank you! How can I help you today?",
"role": "assistant"
}
],
"model": "nugen-legal",
"prompt_truncate_len": 1500,
"temperature": 1
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "I'm here to help you with anything you need!",
"role": "assistant"
}
}
],
"created": 16285464635.5454,
"id": "nugen-1234",
"model": "nugen-legal",
"usage": {
"completion_tokens": 7,
"prompt_tokens": 5,
"total_tokens": 12
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.nugen.in/inference/chat_text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"max_tokens": 200,
"messages": [
{
"content": "Hello, how are you?",
"role": "user"
},
{
"content": "I'\''m good, thank you! How can I help you today?",
"role": "assistant"
}
],
"model": "nugen-legal",
"prompt_truncate_len": 1500,
"temperature": 1
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "I'm here to help you with anything you need!",
"role": "assistant"
}
}
],
"created": 16285464635.5454,
"id": "nugen-1234",
"model": "nugen-legal",
"usage": {
"completion_tokens": 7,
"prompt_tokens": 5,
"total_tokens": 12
}
}