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 Text+Vision
Chat Vision
POST
/
inference
/
chat_vision
curl --request POST \
--url https://api.nugen.in/inference/chat_vision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"max_tokens": 200,
"messages": [
{
"content": [
{
"text": "Can you describe this image?",
"type": "text"
},
{
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/c/c7/Asiatic_Lioness_with_around_30_days_old_cub.jpg"
},
"type": "image_url"
}
],
"role": "user"
}
],
"model": "nugen-lvm-legal",
"prompt_truncate_len": 1500,
"temperature": 1
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The image in document describes a flowchart in a patent for optimizing jet engine compressor.",
"role": "assistant"
}
}
],
"created": 16286546649.54,
"id": "nugen-1234",
"model": "nugen-lvm-legal\t",
"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_vision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"max_tokens": 200,
"messages": [
{
"content": [
{
"text": "Can you describe this image?",
"type": "text"
},
{
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/c/c7/Asiatic_Lioness_with_around_30_days_old_cub.jpg"
},
"type": "image_url"
}
],
"role": "user"
}
],
"model": "nugen-lvm-legal",
"prompt_truncate_len": 1500,
"temperature": 1
}'
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The image in document describes a flowchart in a patent for optimizing jet engine compressor.",
"role": "assistant"
}
}
],
"created": 16286546649.54,
"id": "nugen-1234",
"model": "nugen-lvm-legal\t",
"usage": {
"completion_tokens": 7,
"prompt_tokens": 5,
"total_tokens": 12
}
}