API Reference#
OpenAPI Schema#
The OpenAPI specification details the endpoints for NVIDIA NIM for VLMs:
/v1/models - List available models
/v1/health/ready - Health check
/v1/health/live - Service liveness check
/v1/chat/completions - OpenAI-compatible chat endpoint
API Examples#
Use the examples in this section to help you get started with using the API.
List Models#
cURL Request
Use the following command to list the available models.
curl -X 'GET' 'http://0.0.0.0:8000/v1/models'
Response
{
"object": "list",
"data": [
{
"id": "nvidia/nemotron-nano-12b-v2-vl",
"object": "model",
"created": 1760745801,
"owned_by": "system",
"root": "nvidia/nemotron-nano-12b-v2-vl",
"parent": null,
"max_model_len": 131072,
"permission": [
{
"id": "modelperm-aad65e5933e84025b335c9e3570b0ebe",
"object": "model_permission",
"created": 1760745801,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
]
}
]
}
Check Health#
Use the following command to check server health.
cURL Request
curl -X 'GET' 'http://0.0.0.0:8000/v1/health/ready'
Response
{
"object": "health.response",
"message": "Service is ready."
}
Check Service Liveness#
Use the following command to check service liveness.
cURL Request
curl -X 'GET' 'http://0.0.0.0:8000/v1/health/live'
Response
{
"object": "readyhealth.response",
"message": "Service is live."
}
OpenAI Chat Completions#
Use the following command to query the OpenAI chat completions endpoint.
cURL Request
curl -X 'POST' \
'http://0.0.0.0:8000/v1/chat/completions' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"model": "nvidia/nemotron-nano-12b-v2-vl",
"messages": [
{
"role":"user",
"content": [
{
"type": "image_url",
"image_url":
{
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
},
{
"type": "text",
"text": "What is in this image?"
}
]
}
],
"max_tokens": 256,
"temperature": 0
}'
Response
{
"id": "chatcmpl-0ce039c0506c4deca27efeb73991452a",
"object": "chat.completion",
"created": 1760746002,
"model": "nvidia/nemotron-nano-12b-v2-vl",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This image captures a serene outdoor scene featuring a wooden boardwalk that extends from the foreground into the distance, flanked by tall, green grasses on both sides. The boardwalk, constructed from weathered wooden planks, serves as a pathway through the lush landscape. The grasses, which appear to be wild and untamed, sway gently, suggesting a light breeze. The sky above is a clear blue, dotted with a few wispy clouds, indicating fair weather. The overall atmosphere of the image is peaceful and inviting, with the natural elements harmoniously coexisting. The perspective of the image draws the viewer's eye along the boardwalk, creating a sense of depth and leading towards the horizon where the sky meets the land.\n",
"refusal": null,
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": [],
"reasoning_content": null
},
"logprobs": null,
"finish_reason": "stop",
"stop_reason": null,
"token_ids": null
}
],
"service_tier": null,
"system_fingerprint": null,
"usage": {
"prompt_tokens": 1815,
"total_tokens": 1963,
"completion_tokens": 148,
"prompt_tokens_details": null
},
"prompt_logprobs": null,
"prompt_token_ids": null,
"kv_transfer_params": null
}