Quickstart
This quickstart runs a NIM LLM and VLM container and sends a first inference request. For installation details, refer to installation.
Prerequisites
Before you start, complete the following prerequisites:
- Complete the requirements in prerequisites.
- Configure
LOCAL_NIM_CACHEand exportNGC_API_KEYby following configuration. - Pull the container image by following installation.
Both PB7 containers require a valid NGC Personal API key at startup whenever they need to download model files, including from Hugging Face. For gated or private Hugging Face models, also provide HF_TOKEN. With a complete model cache or local model store, the NIM can start offline without either credential.
How to Choose the Right Model Profile
NIM LLM and VLM automatically selects the most optimal model profile based on the detected hardware (for example, number of GPUs or GPU architecture). If you need to manually override this selection, you can specify the NIM_MODEL_PROFILE environment variable. For more information, refer to Model Profiles.
Run NIM
To run a NIM LLM and VLM container and download the model, complete the following steps according to your NIM type.
Some NIM LLM and VLM containers need extra profile selection or startup settings beyond the standard path. Refer to Model-Specific Deployment Considerations to see if the NIM you want to run is listed.
Mounting a local cache directory lets you avoid re-downloading the model on subsequent restarts. Refer to Local Cache for details.
PB7.0 uses the vLLM backend. The image variables in the following commands include the repository and tag. Check the Support Matrix for PB NIMs for supported models and hardware.
Model-Specific NIM
Model-Free NIM
Run the container to download the model.
Interact with the API
There are three main inference endpoints:
- Chat Completions:
/v1/chat/completions - Text Completions:
/v1/completions - Responses:
/v1/responses
All three endpoints support streaming.
Find the Model Name
Replace the "model" value in the examples below with the model name served by
your NIM container. To find it, query the models endpoint:
Use the id returned by /v1/models in requests. For the model-specific example, the ID is nvidia/nemotron-3.5-lightning. A model-free NIM derives its default ID from the model source. In the Hugging Face example above, the ID is openai/gpt-oss-20b.
You can set the environment variable NIM_SERVED_MODEL_NAME to a desired string.
This name is used as the model name in API requests. For more information, refer to
Environment Variables.
Send a Chat Completion Request
After the server is running, you can send a request to the chat completion endpoint:
The expected response:
Verify Health Endpoints
You can verify that the NIM container is running and ready to accept requests by checking its health endpoints. By default, these endpoints are served on port 8000. If you set NIM_HEALTH_PORT, use that port instead.
Live Endpoint
Perform a liveness check to see if the server is running:
Example response:
Ready Endpoint
Perform a readiness check to see if the model is fully loaded and ready for inference:
Example response:
Streaming
To receive responses incrementally as they are generated, you can enable streaming by adding "stream": true to your request payload. This is supported across the /v1/chat/completions, /v1/completions, and /v1/responses endpoints.
When streaming is enabled, the API returns a sequence of Server-Sent Events (SSE).
The response is streamed back in chunks, with each chunk containing a data JSON object. The stream terminates with a data: [DONE] message:
Next Steps
After the container is serving requests, explore the following resources: