> This page is for version 2.1.6.
> 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.

# Get Started with Inkling-2-Small

> Deploy Inkling-2-Small with the experimental SGLang Model-Free NIM collection and a matching serving recipe.

Deploy Inkling-2-Small using the
[SGLang Model-Free NIM Experimental Collection](https://catalog.ngc.nvidia.com/orgs/nim/nvidia/collections/sglang-model-free-nim-experimental).
The collection provides a model-free container and a separate serving recipe
resource. Supply the model weights at runtime and load the recipe for your GPU
and topology. For the supported configurations, refer to
[Inkling-2-Small](/nim/large-language-models/2.1.6/reference/support-matrix#model-free-nim-inkling-2-small).

Inkling-2-Small is a sparse mixture-of-experts model with 594B
total and 17B active parameters, published in NVFP4 precision. It accepts text
and image input and returns text. Audio and video input are not supported.

Use container and recipe version `2.1.9-variant-inkling-2-small` together.
A recipe may set engine options that another container version does not
support. The container does not include model weights. Download the
[Thinking Machines checkpoint](https://huggingface.co/thinkingmachines/Inkling-2-Small)
separately, as shown below.

For the generic NIM LLM and VLM onboarding path, refer to
[Quickstart](/nim/large-language-models/2.1.6/get-started/quickstart). For endpoint schemas, refer to
[API Reference](/nim/large-language-models/2.1.6/reference/api-reference).

## Prerequisites

Before deploying the container, ensure your environment meets the following
requirements:

### Hardware Requirements

The following are the minimum required specifications for supported hardware
components:

| Requirement | Specification                                                     |
| :---------- | :---------------------------------------------------------------- |
| **CPU**     | AMD64, ARM64                                                      |
| **GPU**     | Refer to the [Support Matrix for NIMs](/nim/large-language-models/2.1.6/reference/support-matrix) |

### Software Requirements

Minimum required versions for supported software components.

| Requirement           | Specification                         |
| :-------------------- | :------------------------------------ |
| **Operating System**  | Ubuntu 22.04 LTS or later recommended |
| **Container Toolkit** | 1.14.0 or later                       |
| **CUDA SDK**          | 12.9 or later                         |
| **GPU Driver**        | 580 or later                          |
| **Docker**            | 24.0 or later                         |

#### Operating System

While other Linux distributions can be compatible with NIM, they have not been officially validated.

We recommend using Ubuntu 22.04 LTS or later for the best experience.

#### CUDA SDK

Install CUDA SDK by following the [CUDA installation guide for Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html).

#### GPU Drivers

Install the NVIDIA GPU drivers by following the [NVIDIA Driver Installation Guide](https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/choose-an-installation-method.html).

#### Docker

Docker is required to run the containerized NIM services.

1. Install Docker Engine for your Linux distribution by following the [Docker Engine installation guide](https://docs.docker.com/engine/install/).
2. Verify that the Docker daemon is running and that your user can execute `docker` commands without `sudo`. Add your user to the `docker` group if needed:

   ```bash
   sudo groupadd docker
   sudo usermod -aG docker $USER
   ```
3. Log out and back in for the group change to take effect.

#### Container Toolkit

The NVIDIA Container Toolkit enables Docker containers to access the host GPU.

1. Install the toolkit by following the [NVIDIA Container Toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-the-nvidia-container-toolkit).
2. Configure Docker to use the NVIDIA runtime by following the [Docker configuration steps](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-docker).
3. Restart the Docker daemon after configuration:

   ```bash
   sudo systemctl restart docker
   ```

### NIM Container Access

To download and deploy NIM containers, you need one of the following:

* A free [NVIDIA Developer Program](https://developer.nvidia.com/developer-program) membership.
* An NVIDIA AI Enterprise license. To request a free 90-day evaluation license, refer to [Ways to Get Started With NVIDIA AI Enterprise](https://www.nvidia.com/en-us/data-center/products/ai-enterprise/get-started) and [Activate Your NVIDIA AI Enterprise License](https://www.nvidia.com/en-us/data-center/activate-license/).

### Generate Access Credentials

#### NGC

An NGC Personal API key is not required to access most NVIDIA NIM containers and
models hosted on NGC. An NGC API key is only required to download Production
Branch (PB) models. This Get Started documentation uses a feature branch model
as an example, so creating an NGC Personal API key is **optional**.

If you want to create an NGC Personal API key, do the following:

1. Generate the Personal API Key on the [Setup API Keys](https://org.ngc.nvidia.com/setup/api-keys) page.

2. When creating the Personal API key, select at least **NGC Catalog** from the
   **Services Included** list. You can also include additional services if you want
   to use the same key for other purposes.

> **Warning**
>
> Legacy API keys are not supported by NIM. Always use a
> Personal API Key.

#### Hugging Face

Create a
[Hugging Face access token](https://huggingface.co/docs/hub/en/security-tokens)
with **read** permissions (or higher, only if your org or private repos require
it). This token allows model-free NIM to fetch models directly from Hugging
Face.

### Verify NVIDIA Runtime Access

To ensure that your setup is correct, run the following command:

```sh
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
```

This command should produce output similar to one of the following, where you can confirm CUDA driver version, and available GPUs.

```console
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05              Driver Version: 580.95.05      CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA H100 80GB HBM3          On  |   00000000:1B:00.0 Off |                    0 |
| N/A   36C    P0            112W /  700W |   78489MiB /  81559MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
```

In addition, this model has the following requirements:

* **GPUs**: Run each deployment on a single node whose GPUs are connected by
  NVLink. Use four B200 or GB200 GPUs, or eight H200, H20 (96 GB), or H20-3e
  GPUs. Data parallelism and pipeline parallelism are not supported for this
  model.
* **Disk space**: The NVFP4 checkpoint is approximately 394 GB (367 GiB).
  Provide at least 400 GB of free space for it, in addition to approximately
  40 GB for the container image.
* **NGC CLI**: Install the [NGC CLI](https://docs.ngc.nvidia.com/cli/index.html)
  to download the serving recipe.
* **GB200 only**: Configure an IMEX domain on the host that spans one tray with
  four GPUs.

## Configure Authentication and Caching

The Hugging Face repository for this model is public, so a Hugging Face token
is optional. Review the model's license and acceptable use policy on Hugging
Face before you download the weights.

### Export a Hugging Face Access Token

Export a Hugging Face token to download models from Hugging Face.

1. Export the variable in your shell (temporary), replacing `<token-value>` with your actual token:

   ```bash
   export HF_TOKEN="<token-value>"
   ```

2. Optional: Persist the variable in your shell profile for future terminals.

   If using bash:

   ```bash
   echo 'export HF_TOKEN="<token-value>"' >> ~/.bashrc
   ```

   If using zsh:

   ```bash
   echo 'export HF_TOKEN="<token-value>"' >> ~/.zshrc
   ```

3. Verify the variable is set:

   ```bash
   echo "$HF_TOKEN"
   ```

### Export an NGC API Key

> **Note**
>
> An NGC API key is only required to download Production Branch (PB) models.
> You can skip this section if you did not create an NGC API key.

1. Export the variable in your shell (temporary), replacing `<VALUE>` with your actual API key:

   ```bash
   export NGC_API_KEY=<VALUE>
   ```

2. Optional: Persist the variable in your shell profile for future terminals.

   If using bash:

   ```bash
   echo "export NGC_API_KEY=$NGC_API_KEY" >> ~/.bashrc
   ```

   If using zsh:

   ```bash
   echo "export NGC_API_KEY=$NGC_API_KEY" >> ~/.zshrc
   ```

3. Verify the variable is set:

   ```bash
   echo "$NGC_API_KEY"
   ```

### Model Cache

NIM downloads model weights to a cache on the host that you mount into the container. Artifacts persist across restarts, so you do not pull the full model on every run.

#### Local Cache

An essential variable to configure on your host system is the cache path directory. This directory is mapped from the host machine to container; assets (for example, model weights) are downloaded to this host directory and persist across container restarts. Configuring a local cache is highly recommended, as it avoids re-downloading large model files upon subsequent container restarts. You can name the environment variable containing the path to the local cache whatever you want.

Create the cache directory and export an environment variable:

```bash
export LOCAL_NIM_CACHE=~/.cache/nim
mkdir -p $LOCAL_NIM_CACHE
# Optionally add sticky bit to avoid issues writing to the cache if the container is running as a different user
chmod -R a+rwxt $LOCAL_NIM_CACHE
```

When you start the NIM container, you must map your host machine's local cache directory (`$LOCAL_NIM_CACHE`) to the container's internal cache path (`/opt/nim/.cache`) using a Docker volume mount, such as `-v "$LOCAL_NIM_CACHE:/opt/nim/.cache"`. This mapping ensures that the large model weights downloaded by the container are saved to your host machine. Because containers are ephemeral, any data stored only inside the container is lost when it stops. By using a volume mount, subsequent container runs detect the existing model files in your local cache and skip the lengthy download process, allowing the NIM to start up faster.

If you created an NGC API key, authenticate with the NVIDIA Container Registry using the following command:

```bash
echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin
```

Use `$oauthtoken` as the username and `NGC_API_KEY` as the password. The `$oauthtoken` username is a special name that indicates that you will authenticate with an API key and not a user name and password.

## Choose the Model Source

Choose one of the following model sources.

To download the checkpoint from Hugging Face when the container starts, set
`NIM_MODEL_PATH` to the repository. Append the revision that the recipes were
validated with to pin the download to that revision:

```bash
export NIM_MODEL_PATH="hf://thinkingmachines/Inkling-2-Small:ef5bf64c1b8e7d0e57b284e10c6891f8db6304c4"
```

Without the revision suffix, NIM follows the `main` branch of the repository.
NIM saves the downloaded files in the mounted cache, so the cache volume needs
approximately 400 GB of free space.

To use a checkpoint that you already downloaded, set `MODEL_DIR` to the host
directory that contains the Hugging Face files. The launch command in
[Run NIM](#get-started-inkling-2-small-run) mounts it read-only:

```bash
export MODEL_DIR=/path/to/Inkling-2-Small
export NIM_MODEL_PATH=/opt/nim/model
```

For other sources, refer to [Supported Model Sources](/nim/large-language-models/2.1.6/deployment/model-free-nim#supported-model-sources).

## Pull the Container and Download the Recipe

Pull the experimental SGLang Model-Free NIM container and download the matching
[Inkling-2-Small recipe](https://catalog.ngc.nvidia.com/orgs/nim/nvidia/resources/inkling-2-small-recipe). Both artifacts
use version `2.1.9-variant-inkling-2-small`:

```bash
docker pull nvcr.io/nim/nvidia/sglang-model-free-nim-experimental:2.1.9-variant-inkling-2-small
ngc registry resource download-version "nim/nvidia/inkling-2-small-recipe:2.1.9-variant-inkling-2-small"
export RECIPE_DIR="$PWD/inkling-2-small-recipe_v2.1.9-variant-inkling-2-small"
chmod 0755 "$RECIPE_DIR"
chmod 0644 "$RECIPE_DIR"/*.yaml
```

The container runs as UID 1000. The NGC CLI can save the recipe directory and
files with modes `0700` and `0600`, so that only the downloading user can read
them. The `chmod` commands make them readable by the container user and change
only the file mode.

### Select a Recipe

Each GPU type has two recipes. The standard recipe uses plain decoding. The
recipe whose name ends in `-dspark.yaml` enables DSpark speculative decoding.
Select the recipe for your GPU type, and set `GPU_COUNT` to the GPU count in the
recipe name:

| GPU         | GPU count | Standard recipe                                  | DSpark recipe                                           |
| :---------- | :-------- | :----------------------------------------------- | :------------------------------------------------------ |
| B200        | 4         | `inkling-2-small-nvfp4-b200-4gpu-tp4-ep4.yaml`   | `inkling-2-small-nvfp4-b200-4gpu-tp4-ep4-dspark.yaml`   |
| GB200       | 4         | `inkling-2-small-nvfp4-gb200-4gpu-tp4-ep4.yaml`  | `inkling-2-small-nvfp4-gb200-4gpu-tp4-ep4-dspark.yaml`  |
| H200        | 8         | `inkling-2-small-nvfp4-h200-8gpu-tp8-ep8.yaml`   | `inkling-2-small-nvfp4-h200-8gpu-tp8-ep8-dspark.yaml`   |
| H20 (96 GB) | 8         | `inkling-2-small-nvfp4-h20-8gpu-tp8-ep8.yaml`    | `inkling-2-small-nvfp4-h20-8gpu-tp8-ep8-dspark.yaml`    |
| H20-3e      | 8         | `inkling-2-small-nvfp4-h20-3e-8gpu-tp8-ep8.yaml` | `inkling-2-small-nvfp4-h20-3e-8gpu-tp8-ep8-dspark.yaml` |

For example, to use four B200 GPUs with standard decoding, set:

```bash
export RECIPE="$RECIPE_DIR/inkling-2-small-nvfp4-b200-4gpu-tp4-ep4.yaml"
export GPU_COUNT=4
GPU_DOCKER_ARGS=()
```

For GB200, also set the IMEX channel:

```bash
GPU_DOCKER_ARGS=(-e NVIDIA_IMEX_CHANNELS=0)
```

For all other GPU types, leave `GPU_DOCKER_ARGS` empty (`GPU_DOCKER_ARGS=()`).
Run the launch command in the same Bash shell where you set these variables.

All recipes use the following settings:

| Recipe setting                               | Value                                                  |
| :------------------------------------------- | :----------------------------------------------------- |
| `context_length`                             | `1048576` (1M tokens)                                  |
| `tp_size` and `ep_size`                      | Equal to the GPU count                                 |
| `served_model_name`                          | `thinkingmachines/Inkling-2-Small`                     |
| `reasoning_parser`                           | `inkling`                                              |
| `tool_call_parser`                           | `inkling2`                                             |
| `enable_multimodal`                          | `true` (image input)                                   |
| `no_allow_local_media_files`                 | `true`                                                 |
| `enable_response_store`                      | `true`                                                 |
| `max_running_requests` (DSpark recipes only) | `192` on B200 and GB200, `64` on H200, H20, and H20-3e |

## Run NIM

Mount the selected recipe read-only and load it with `NIM_CONFIG_FILE`.

To download the checkpoint from Hugging Face, mount the cache:

```bash
docker run --rm --name inkling-2-small \
  --gpus "$GPU_COUNT" --ipc=host --shm-size=32g --ulimit memlock=-1 \
  "${GPU_DOCKER_ARGS[@]}" \
  -e NIM_MODEL_PATH="$NIM_MODEL_PATH" \
  -e HF_TOKEN \
  -e NIM_CONFIG_FILE=/opt/nim/recipe.yaml \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -v "$RECIPE:/opt/nim/recipe.yaml:ro" \
  -p 8000:8000 \
  nvcr.io/nim/nvidia/sglang-model-free-nim-experimental:2.1.9-variant-inkling-2-small
```

To use a local checkpoint, mount the model directory read-only instead:

```bash
docker run --rm --name inkling-2-small \
  --gpus "$GPU_COUNT" --ipc=host --shm-size=32g --ulimit memlock=-1 \
  "${GPU_DOCKER_ARGS[@]}" \
  -e NIM_MODEL_PATH="$NIM_MODEL_PATH" \
  -e NIM_CONFIG_FILE=/opt/nim/recipe.yaml \
  -v "$MODEL_DIR:/opt/nim/model:ro" \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -v "$RECIPE:/opt/nim/recipe.yaml:ro" \
  -p 8000:8000 \
  nvcr.io/nim/nvidia/sglang-model-free-nim-experimental:2.1.9-variant-inkling-2-small
```

A recipe is required for this model. The recipe sets the parallel layout, and
the engine accepts only one layout per node for this model: expert parallelism
equal to tensor parallelism, with no data or pipeline parallelism. Starting the
container without `NIM_CONFIG_FILE` is not a supported configuration.

Note the following about the launch options:

* **GPU count**: Expose exactly the GPU count of the recipe. If more GPUs are
  visible, NIM uses the first GPUs up to the recipe's `tp_size` and logs a
  warning that names the used and idle GPUs. If fewer GPUs are visible, the
  container does not start.
* **Shared memory**: The container needs more shared memory than the Docker
  default of 64 MB. With the default, startup fails after one to two minutes
  with `NCCL error: unhandled system error`. Keep `--ipc=host`,
  `--shm-size=32g`, and `--ulimit memlock=-1`, which every validated
  configuration uses. On GB200, all three options are required.

### Override a Recipe Setting

While `NIM_CONFIG_FILE` is set, the recipe is authoritative. A key in the recipe
takes precedence over the matching `NIM_*` environment variable,
`NIM_PASSTHROUGH_ARGS`, and container command-line options. Settings that the
recipe does not name follow the usual precedence. For the general recipe
workflow, refer to [Run with a Downloaded Serving Recipe](/nim/large-language-models/2.1.6/deployment/model-free-nim#model-free-nim-serving-recipes).

To run with a different value for a recipe key, edit a copy of the recipe and
set `RECIPE` to the copy. Any change moves the deployment outside the validated
configuration.

## Interact with the API

The container provides `/v1/chat/completions`, `/v1/completions`,
`/v1/responses`, and the Anthropic-compatible `/v1/messages` endpoint. Use the
running container's `/docs` explorer for request and response schemas. For
additional request formats, refer to [API Reference](/nim/large-language-models/2.1.6/reference/api-reference).

### Verify Health Endpoints

Wait for the model to load before sending inference requests. The readiness
endpoint returns HTTP 200 when the model is ready:

```bash
until curl --fail --silent --output /dev/null http://localhost:8000/v1/health/ready; do
  sleep 10
done
```

With the weights on local disk, startup takes approximately 10 to 15 minutes
for weight loading and CUDA graph capture. The first start with an `hf://`
model path also includes the download time. Set Kubernetes startup probes and
client timeouts accordingly.

### Find the Model Name

The recipes set `served_model_name` to `thinkingmachines/Inkling-2-Small`.
Query `/v1/models` to confirm the identifier:

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

Use this identifier in the `model` field of every request. You do not need to
set `NIM_SERVED_MODEL_NAME`.

### Send a Chat Completion Request

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "messages": [{"role": "user", "content": "What is 17 multiplied by 23?"}],
    "max_tokens": 2048
  }'
```

The model reasons by default. The response returns the reasoning text in
`choices[0].message.reasoning_content` and the final answer in
`choices[0].message.content`. Reasoning tokens count against `max_tokens`. If
the response ends with `finish_reason: "length"` and an empty `content`,
increase `max_tokens` and retry.

### Streaming

To receive output incrementally, add `"stream": true` to the request. The API
returns Server-Sent Events. Streamed chunks carry reasoning in
`choices[0].delta.reasoning_content` and the answer in
`choices[0].delta.content`, and the stream ends with `data: [DONE]`.

### Control Reasoning

Set the top-level `reasoning_effort` field of a Chat Completions request to
control reasoning:

* To turn reasoning off, set `"reasoning_effort": "none"`.
* To select an effort, set `reasoning_effort` to `minimal`, `low`, `medium`,
  `high`, `xhigh`, or `max`, or to a number from `0.0` to `0.99`.

If you omit `reasoning_effort`, the model reasons at its default effort. Other
values return HTTP 400. The `chat_template_kwargs` flags `enable_thinking` and
`thinking` have no effect on this model.

For example, to answer without reasoning:

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "messages": [{"role": "user", "content": "What is 17 multiplied by 23?"}],
    "max_tokens": 1024,
    "reasoning_effort": "none"
  }'
```

### Send an Image Request

Include `text` and `image_url` content parts in a user message. The image can be
an `http` or `https` URL that the container can reach, or a base64 `data:` URI:

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe the image in one sentence."},
        {"type": "image_url", "image_url": {"url": "https://assets.ngc.nvidia.com/products/api-catalog/phi-3-5-vision/example1b.jpg"}}
      ]
    }],
    "max_tokens": 2048
  }'
```

Every recipe sets `no_allow_local_media_files: true`. An image given as a path
or a `file://` URL inside the container returns HTTP 400. The recipes do not
restrict the hosts from which the container fetches `http` or `https` images.
If your deployment requires that restriction, apply it at the network level.

Audio and video content parts are not supported and return HTTP 400.

### Tool Calling

Supply function definitions in `tools`. The model can return one or more tool
calls in `choices[0].message.tool_calls`. Your application runs each tool and
sends the result in a `tool` message in the next request. `tool_choice` accepts
`auto`, `required`, `none`, or a named function. For a complete execution loop,
refer to [Tool Calling and MCP Integration](/nim/large-language-models/2.1.6/advanced-use-cases/tool-calling-and-mcp).

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "messages": [{"role": "user", "content": "What is the weather in Paris?"}],
    "tools": [{"type": "function", "function": {
      "name": "get_weather",
      "description": "Get the current weather for a city.",
      "parameters": {
        "type": "object",
        "properties": {"city": {"type": "string"}},
        "required": ["city"]
      }
    }}],
    "max_tokens": 2048
  }'
```

### Structured Output

Use `response_format` to constrain the answer to a JSON schema. The constraint
applies to the answer in `content`, not to the reasoning text:

```bash
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "messages": [{"role": "user", "content": "Name the largest city in Japan and its population in millions."}],
    "response_format": {
      "type": "json_schema",
      "json_schema": {
        "name": "city",
        "strict": true,
        "schema": {
          "type": "object",
          "properties": {
            "city": {"type": "string"},
            "population_millions": {"type": "number"}
          },
          "required": ["city", "population_millions"],
          "additionalProperties": false
        }
      }
    },
    "max_tokens": 2048
  }'
```

### Send a Responses Request

The recipes enable the response store, so you can retrieve a stored response
with `GET /v1/responses/{response_id}` and continue a conversation with
`previous_response_id`:

```bash
curl http://localhost:8000/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "input": "Name one prime number greater than 10.",
    "max_output_tokens": 2048
  }'
```

The model reasons by default. The response `output` contains a `reasoning` item
followed by the `message` item. To select an effort, add
`"reasoning": {"effort": "low"}`.

### Send an Anthropic-Compatible Messages Request

On `/v1/messages`, the model does not reason unless the request asks for it.
To request reasoning, add a `thinking` block:

```bash
curl http://localhost:8000/v1/messages \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "thinkingmachines/Inkling-2-Small",
    "max_tokens": 2048,
    "thinking": {"type": "enabled", "budget_tokens": 1024},
    "messages": [{"role": "user", "content": "What is 17 multiplied by 23?"}]
  }'
```

The response returns the reasoning in a `thinking` content block before the
`text` block.

## Troubleshooting

* **Startup fails with `NCCL error: unhandled system error`**: The container
  does not have enough shared memory. Add `--ipc=host --shm-size=32g --ulimit memlock=-1` to `docker run`.
* **The container does not start**: Confirm that `NIM_CONFIG_FILE` is set, that
  the recipe matches your GPU type, and that at least the recipe's GPU count is
  visible to the container. Use the container and recipe from the same version.
* **The recipe cannot be read**: Run `chmod 0755` on the recipe directory and
  `chmod 0644` on the recipe files, as shown in
  [Run NIM](#get-started-inkling-2-small-run).
* **Requests fail with a model-name error**: Query `/v1/models` and use the
  reported identifier, `thinkingmachines/Inkling-2-Small`.
* **An answer is empty**: Check `finish_reason`. If it is `length`, the
  reasoning used the output budget. Increase `max_tokens`, or set
  `reasoning_effort` to a lower effort or to `none`.
* **An image request returns HTTP 400**: Send an `http` or `https` URL that the
  container can reach, or a base64 `data:` URI. Local paths and `file://` URLs
  are not allowed.
* **A request with `stop` returns an empty or truncated answer**: Stop strings
  also match control-token text and reasoning text. Refer to the
  [stop-string known issue](/nim/large-language-models/2.1.6/about-nim-llm/release-notes#issue-inkling-2-small-stop-strings).

For additional diagnostics, refer to [Troubleshooting](/nim/large-language-models/2.1.6/troubleshooting/index).

## Next Steps

* To build a complete tool execution loop, refer to [Tool Calling and MCP Integration](/nim/large-language-models/2.1.6/advanced-use-cases/tool-calling-and-mcp).
* For request and response formats, refer to [API Reference](/nim/large-language-models/2.1.6/reference/api-reference).
* For known issues, refer to the Inkling-2-Small entries in the
  release notes, starting with
  [stop strings](/nim/large-language-models/2.1.6/about-nim-llm/release-notes#issue-inkling-2-small-stop-strings).