> This page is for version 2.1.7 (Latest) (default).
> 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-Mini

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

Deploy Inkling-2-Mini 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-Mini](/nim/large-language-models/reference/support-matrix#model-free-nim-inkling-2-mini).

Inkling-2-Mini is a looped sparse mixture-of-experts model with
26.4B total and 3.4B active parameters. Its checkpoint mixes NVFP4 and MXFP8
precisions, and the recipe names label it `nvfp4`. The model 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-mini` 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-Mini)
separately, as shown below.

For the generic NIM LLM and VLM onboarding path, refer to
[Quickstart](/nim/large-language-models/get-started/quickstart). For endpoint schemas, refer to
[API Reference](/nim/large-language-models/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/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. Use four B200, GB200, H200,
  H20 (96 GB), or H20-3e GPUs, or one DGX Spark. Data parallelism and pipeline
  parallelism are not supported for this model. The four GPUs in a multi-GPU
  deployment must be connected by NVLink.
* **Disk space**: The checkpoint is approximately 20 GB. Provide at least 25 GB
  of free space for it, in addition to approximately 31 GB for the container
  image.
* **NGC CLI**: Install the [NGC CLI](https://docs.ngc.nvidia.com/cli/index.html)
  to download the serving recipe.

## 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-Mini:b85c3cfa615fc413cc9af3379f491b963f3b586a"
```

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 25 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-mini-run) mounts it read-only:

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

For other sources, refer to [Supported Model Sources](/nim/large-language-models/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-Mini recipe](https://catalog.ngc.nvidia.com/orgs/nim/nvidia/resources/inkling-2-mini-recipe). Both artifacts
use version `2.1.9-variant-inkling-2-mini`:

```bash
docker pull nvcr.io/nim/nvidia/sglang-model-free-nim-experimental:2.1.9-variant-inkling-2-mini
ngc registry resource download-version "nim/nvidia/inkling-2-mini-recipe:2.1.9-variant-inkling-2-mini"
export RECIPE_DIR="$PWD/inkling-2-mini-recipe_v2.1.9-variant-inkling-2-mini"
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 data center GPU type has two recipes. The standard recipe uses plain
decoding. The recipe whose name ends in `-dspark.yaml` enables DSpark
speculative decoding and serves a shorter context. DGX Spark has a DSpark recipe
only. 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-mini-nvfp4-b200-4gpu-tp4-ep4.yaml`   | `inkling-2-mini-nvfp4-b200-4gpu-tp4-ep4-dspark.yaml`   |
| GB200       | 4         | `inkling-2-mini-nvfp4-gb200-4gpu-tp4-ep4.yaml`  | `inkling-2-mini-nvfp4-gb200-4gpu-tp4-ep4-dspark.yaml`  |
| H200        | 4         | `inkling-2-mini-nvfp4-h200-4gpu-tp4-ep4.yaml`   | `inkling-2-mini-nvfp4-h200-4gpu-tp4-ep4-dspark.yaml`   |
| H20 (96 GB) | 4         | `inkling-2-mini-nvfp4-h20-4gpu-tp4-ep4.yaml`    | `inkling-2-mini-nvfp4-h20-4gpu-tp4-ep4-dspark.yaml`    |
| H20-3e      | 4         | `inkling-2-mini-nvfp4-h20-3e-4gpu-tp4-ep4.yaml` | `inkling-2-mini-nvfp4-h20-3e-4gpu-tp4-ep4-dspark.yaml` |
| DGX Spark   | 1         | Not available                                   | `inkling-2-mini-nvfp4-spark-1gpu-tp1-ep1-dspark.yaml`  |

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

```bash
export RECIPE="$RECIPE_DIR/inkling-2-mini-nvfp4-h200-4gpu-tp4-ep4.yaml"
export GPU_COUNT=4
```

For DGX Spark, set `GPU_COUNT=1`.

All recipes use the following settings:

| Recipe setting                               | Value                             |
| :------------------------------------------- | :-------------------------------- |
| `context_length` (standard recipes)          | `1048576` (1M tokens)             |
| `context_length` (DSpark recipes)            | `131072`                          |
| `tp_size` and `ep_size`                      | Equal to the GPU count            |
| `served_model_name`                          | `thinkingmachines/Inkling-2-Mini` |
| `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) | `64`; `4` on DGX Spark            |

## 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-mini \
  --gpus "$GPU_COUNT" --ipc=host --shm-size=32g --ulimit memlock=-1 \
  -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-mini
```

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

```bash
docker run --rm --name inkling-2-mini \
  --gpus "$GPU_COUNT" --ipc=host --shm-size=32g --ulimit memlock=-1 \
  -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-mini
```

Load a recipe for every deployment. The recipe sets the parallel layout:
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**: Keep `--ipc=host`, `--shm-size=32g`, and
  `--ulimit memlock=-1`, which every validated configuration uses.

### 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/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/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 took approximately 7 to 15 minutes in
testing. In the startup logs, CUDA graph capture accounts for approximately 50%
to 90% of that time, and weight loading and other initialization account for the
rest. 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-Mini`.
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-Mini",
    "messages": [{"role": "user", "content": "What is 17 multiplied by 23?"}],
    "max_tokens": 2048
  }'
```

The model always reasons. 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.

Set `max_tokens` on every request. The model can occasionally keep reasoning
until it reaches the output limit. Refer to the
[long-reasoning known issue](/nim/large-language-models/about-nim-llm/release-notes#issue-inkling-2-mini-long-reasoning).

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

Reasoning cannot be turned off for this model. Set the top-level
`reasoning_effort` field of a Chat Completions request to adjust how much the
model reasons:

* Set `reasoning_effort` to `none`, `minimal`, `low`, `medium`, `high`,
  `xhigh`, or `max`, or to a number from `0.0` to `0.99`.
* For the least reasoning, use `minimal` or a small number such as `0.01`.
  `none` is accepted, but the model still reasons and can use more reasoning
  tokens than `minimal`.

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

For example, to answer with minimal reasoning:

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

### 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-Mini",
    "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`, so 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/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-Mini",
    "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-Mini",
    "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`. Stored responses remain in server-process memory,
have no expiry or size limit, and are lost when the server restarts. Set
`"store": false` on requests that do not need to be retained:

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

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

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

The response returns the reasoning in a `thinking` content block before the
`text` block, whether or not the request includes a `thinking` block.

## Troubleshooting

* **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
  [Pull the Container and Download the Recipe](#pull-the-container-and-download-the-recipe).
* **Requests fail with a model-name error**: Query `/v1/models` and use the
  reported identifier, `thinkingmachines/Inkling-2-Mini`.
* **An answer is empty**: Check `finish_reason`. If it is `length`, the
  reasoning used the output budget. Increase `max_tokens`, set
  `reasoning_effort` to a lower effort, or retry the request.
* **A long prompt is rejected**: The prompt tokens plus `max_tokens` must fit
  in the context window, which also holds the reasoning and the final answer.
  The DSpark recipes serve a 131,072-token window. For a 1,048,576-token
  window, use a standard recipe on a data center GPU.
* **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 answer**: Stop strings also match
  control-token text and reasoning text. Refer to the
  [stop-string known issue](/nim/large-language-models/about-nim-llm/release-notes#issue-inkling-2-mini-stop-strings).

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