> This page is for version 2.1.5-pb7.
> For other versions, use one of these documentation indexes:
> - 2.1.7 (Latest) (default): https://docs.nvidia.com/nim/large-language-models/2.1.7/llms.txt
> - 2.1.6: https://docs.nvidia.com/nim/large-language-models/2.1.6/llms.txt
> - 2.1.5-pb7: https://docs.nvidia.com/nim/large-language-models/2.1.5-pb7/llms.txt
> - 2.1.5: https://docs.nvidia.com/nim/large-language-models/2.1.5/llms.txt
> - 2.1.4: https://docs.nvidia.com/nim/large-language-models/2.1.4/llms.txt
> - 2.0.13: https://docs.nvidia.com/nim/large-language-models/2.0.13/llms.txt
> - 2.0.12: https://docs.nvidia.com/nim/large-language-models/2.0.12/llms.txt
> - 2.0.11: https://docs.nvidia.com/nim/large-language-models/2.0.11/llms.txt
> - 2.0.10: https://docs.nvidia.com/nim/large-language-models/2.0.10/llms.txt
> - 2.0.4-pb6: https://docs.nvidia.com/nim/large-language-models/2.0.4-pb6/llms.txt
> - Archive: https://docs.nvidia.com/nim/large-language-models/archive/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/large-language-models/llms.txt.

# Quickstart

> Run a NIM LLM PB7 container and send your first inference request, from a pulled image to a working API call.

This quickstart runs a NIM LLM and VLM container and sends a first inference request. For installation details, refer to [installation](/nim/large-language-models/2.1.5-pb7/get-started/installation).

## Prerequisites

Before you start, complete the following prerequisites:

* Complete the requirements in [prerequisites](/nim/large-language-models/2.1.5-pb7/get-started/prerequisites).
* Configure `LOCAL_NIM_CACHE` and export `NGC_API_KEY` by following [configuration](/nim/large-language-models/2.1.5-pb7/get-started/configuration).
* Pull the container image by following [installation](/nim/large-language-models/2.1.5-pb7/get-started/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](/nim/large-language-models/2.1.5-pb7/deployment/model-profiles-and-selection).

## 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](/nim/large-language-models/2.1.5-pb7/get-started/advanced/model-specific-deployment-considerations)
to see if the NIM you want to run is listed.

> **Tip**
>
> Mounting a local cache directory lets you avoid re-downloading the model on subsequent restarts. Refer to [Local Cache](/nim/large-language-models/2.1.5-pb7/get-started/configuration#configure-local-cache) for details.

> **Note**
>
> 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](/nim/large-language-models/2.1.5-pb7/reference/support-matrix) for supported models and hardware.

#### Model-Specific NIM

Run the container to download the model.

```bash
export NIM_LLM_IMAGE=nvcr.io/nim/nvidia/nemotron-3.5-lightning-30b-a3b-pb7:2.1.5-pb7.0

docker run --gpus=all \
  -e NGC_API_KEY \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 8000:8000 \
  "$NIM_LLM_IMAGE"
```

#### Model-Free NIM

The following example downloads GPT-OSS-20B from Hugging Face. The command also forwards `HF_TOKEN` if you set one for a gated or private model.

```bash
export NIM_LLM_MODEL_FREE_IMAGE=nvcr.io/nim/nvidia/model-free-nim-pb7:2.1.5-pb7.0
export NIM_MODEL_PATH=hf://openai/gpt-oss-20b

docker run --gpus=all \
  -e NGC_API_KEY \
  -e NIM_MODEL_PATH \
  -e HF_TOKEN \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 8000:8000 \
  "$NIM_LLM_MODEL_FREE_IMAGE"
```

> **Note**
>
> If you want to serve a pre-downloaded local model or a private cloud model instead of downloading one from Hugging Face, refer to [Model Downloads](/nim/large-language-models/2.1.5-pb7/deployment/model-download) for your workflow.

## Interact with the API

There are three main inference endpoints:

* **Chat Completions**: `/v1/chat/completions`
* **Text Completions**: `/v1/completions`
* **Responses**: `/v1/responses`

> **Tip**
>
> All three endpoints support [streaming](#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:

```bash
curl -s http://localhost:8000/v1/models
```

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`.

> **Note**
>
> 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](/nim/large-language-models/2.1.5-pb7/reference/environment-variables).

### Send a Chat Completion Request

After the server is running, you can send a request to the chat completion endpoint:

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nvidia/nemotron-3.5-lightning",
    "messages": [
      {
        "role": "user",
        "content": "Hello! How are you?"
      }
    ],
    "max_tokens": 100
  }'
```

The expected response:

```json
{
  "id":"chatcmpl-9de33afddf166791",
  "object":"chat.completion",
  "created":1782320669,
  "prompt_routed_experts":null,
  "model":"nvidia/nemotron-3.5-lightning",
  "choices":[
    {
      "index":0,
      "message":{
        "role":"assistant",
        "content":"I'm just a language model, so I don't have feelings or emotions like humans do. However, I'm functioning properly and ready to assist you with any questions or tasks you may have. How can I help you today?",
        "refusal":null,
        "annotations":null,
        "audio":null,
        "function_call":null,
        "tool_calls":[
          
        ],
        "reasoning":null
      },
      "logprobs":null,
      "finish_reason":"stop",
      "stop_reason":null,
      "token_ids":null,
      "routed_experts":null
    }
  ],
  "service_tier":null,
  "usage":{
    "prompt_tokens":41,
    "total_tokens":88,
    "completion_tokens":47,
    "prompt_tokens_details":null
  },
  "prompt_logprobs":null,
  "prompt_token_ids":null,
  "prompt_text":null,
  "kv_transfer_params":null
}
```

### 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:

```bash
curl -v http://localhost:8000/v1/health/live
```

Example response:

```http
GET /v1/health/live HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.81.0
Accept: */*

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json
Content-Length: 61
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate

{
  "object": "health.response",
  "message": "live",
  "status": "live"
}
```

#### Ready Endpoint

Perform a readiness check to see if the model is fully loaded and ready for inference:

```bash
curl -v http://localhost:8000/v1/health/ready
```

Example response:

```http
GET /v1/health/ready HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.81.0
Accept: */*

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json
Content-Length: 63
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate

{
  "object": "health.response",
  "message": "ready",
  "status": "ready"
}
```

### 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).

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model":"nvidia/nemotron-3.5-lightning",
    "messages": [
      {
        "role": "user",
        "content": "Write a short poem about a robot."
      }
    ],
    "max_tokens": 100,
    "stream": true
  }'
```

The response is streamed back in chunks, with each chunk containing a `data` JSON object. The stream terminates with a `data: [DONE]` message:

```text
data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"nvidia/nemotron-3.5-lightning","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"prompt_token_ids":null}

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"nvidia/nemotron-3.5-lightning","choices":[{"index":0,"delta":{"content":"In"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"nvidia/nemotron-3.5-lightning","choices":[{"index":0,"delta":{"content":" cir"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"nvidia/nemotron-3.5-lightning","choices":[{"index":0,"delta":{"content":"cuits"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

...

data: [DONE]
```

## Next Steps

After the container is serving requests, explore the following resources:

#### [Environment Variables](/nim/large-language-models/2.1.5-pb7/reference/environment-variables)

Set served model names, health port, and other runtime variables.

#### [Model Profiles and Selection](/nim/large-language-models/2.1.5-pb7/deployment/model-profiles-and-selection)

Override automatic profile selection or inspect available profiles.

#### [Model Download](/nim/large-language-models/2.1.5-pb7/deployment/model-download)

Serve a pre-downloaded local model or a private cloud model.

#### [Advanced Configuration](/nim/large-language-models/2.1.5-pb7/reference/advanced-configuration)

Configure TLS, logging, and profile overrides for production.