---
title: "Set up the model connection in PreciseMD"
description: "PreciseMD needs an OCR model and a VLM model; confirm both are running in AI Model Center, get their model IDs, then check the connections the system set up for you"
canonical_url: "https://docs.ardge.com/en/knowledge/precisemd/model-connection"
---
# Set up the model connection in PreciseMD

> PreciseMD needs an OCR model and a VLM model; confirm both are running in AI Model Center, get their model IDs, then check the connections the system set up for you

## Overview

PreciseMD gets its parsing ability from two external models: the **OCR model** recognizes the text in a document image, and the **VLM model** (a multimodal model) handles vision correction, rebuilding tables and layout from the original image. Both are deployed in AI Model Center on the same ARX device.

Each of these models has its own connection on PreciseMD's **Model connections** page, marked **Default**. The system creates both at deployment time and fills in **Name**, **Base URL**, and **API key** for you — none of those three are yours to enter.

That makes the setup short: confirm both models are running in AI Model Center, get their model IDs, then go back to the **Model connections** page and check that the two default connections point at the right models.

## What you'll learn

- Tell the OCR model and the VLM model apart, and what each one does in PreciseMD
- Confirm a model's status in AI Model Center and get its model ID
- Check the two default connections the system created on the **Model connections** page
- Add a custom model connection when you want **Playground** to use a different model

**Estimated time: about 10 minutes**

## Applies to

- PreciseMD 1.4.0 and later
- ARX OS 1.0 and later

## Before you begin

- You have deployed an OCR model and a VLM model in AI Model Center on the same ARX device
- You are a PreciseMD administrator. The **Model connections** page is open to administrators only

## What you'll need

Just one thing: the **model ID** of each of the two models.

<table>
<thead>
  <tr>
    <th>
      Value
    </th>
    
    <th>
      What it's for
    </th>
    
    <th>
      Where to find it
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Model ID
      </strong>
    </td>
    
    <td>
      Checking the value in the <strong>
        Model ID
      </strong>
      
       field on <strong>
        Model connections
      </strong>
    </td>
    
    <td>
      The model's <strong>
        Instance Name
      </strong>
      
       on the <strong>
        Model Instances
      </strong>
      
       page in AI Model Center
    </td>
  </tr>
</tbody>
</table>

**Name**, **Base URL**, and **API key** are filled in by the system for your deployment — there's nothing to collect for them.

## The two models PreciseMD needs

<table>
<thead>
  <tr>
    <th>
      Model
    </th>
    
    <th>
      What it does
    </th>
    
    <th>
      What uses it
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        OCR model
      </strong>
    </td>
    
    <td>
      Recognizes the text in a document image and outputs Markdown
    </td>
    
    <td>
      Every parse in <strong>
        Playground
      </strong>
      
       and in <strong>
        OCR tasks
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        VLM model
      </strong>
    </td>
    
    <td>
      Vision correction: corrects the recognition against the original image and rebuilds tables and layout
    </td>
    
    <td>
      Parses with <strong>
        Vision correction
      </strong>
      
       on, and the <strong>
        Agent
      </strong>
      
       (called the default VLM in the interface)
    </td>
  </tr>
</tbody>
</table>

For what vision correction does and when to use it, see [When should I enable vision correction?](https://docs.ardge.com/en/knowledge/precisemd/vision-correction)

## Step 1: Create the administrator account

The first time you open PreciseMD it shows **Create administrator account**. If you have already registered, sign in and skip this step.

1. Fill in the fields as follows

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Username
      </strong>
    </td>
    
    <td>
      The administrator's sign-in name
    </td>
    
    <td>
      3–50 characters
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Email
      </strong>
    </td>
    
    <td>
      The administrator's email address
    </td>
    
    <td>
      Must be a valid email address
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Password
      </strong>
    </td>
    
    <td>
      The sign-in password
    </td>
    
    <td>
      8–128 characters
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Confirm password
      </strong>
    </td>
    
    <td>
      Same as <strong>
        Password
      </strong>
    </td>
    
    <td>
      A mismatch shows "Passwords don't match"
    </td>
  </tr>
</tbody>
</table>

1. Click **Create account**

You can then sign in. The sidebar shows **Agent**, **Playground**, **OCR tasks**, **Storage connections**, **Model connections**, and **User management**.

## Step 2: Get both model IDs from AI Model Center

1. Open **AI Model Center** on the same ARX device and go to the **Model Instances** page
2. Confirm the OCR model and the VLM model both read **Running**
3. Note each one's **Instance Name** — that string is its model ID

![The Model Instances page in AI Model Center](https://docs.ardge.com/screenshots/knowledge/en/precisemd/model-connection/step-2.webp)

<warning>

**Parsing fails while a model isn't running:**

A model whose status isn't **Running** makes parsing fail even when **Model connections** is set up correctly. Start the model in AI Model Center first.

</warning>

## Step 3: Check the two default model connections

1. Sign in to PreciseMD and go to the **Model connections** page
2. Find the two connections marked **Default** in the list — one for OCR, one for the VLM
3. Check each one's **Model ID** field against the **Instance Name** you noted in Step 2

If they match, the setup is done and you can go straight to Step 4.

If a connection's **Model ID** points at a model you don't want to use, change it:

1. Click the edit icon on that row
2. Open the **Model ID** dropdown — the system fetches the endpoint's model list from **Base URL**
3. Select the model you noted in Step 2
4. Click **Save**

![The Model Connections list](https://docs.ardge.com/screenshots/knowledge/en/precisemd/model-connection/step-3-1.webp)

![Editing a model connection](https://docs.ardge.com/screenshots/knowledge/en/precisemd/model-connection/step-3-2.webp)

<warning>

**A default connection's name can't be changed:**

Connections marked **Default** are managed by the system: the **Name** field is disabled, with "The name of a system default model connection can't be changed" below it. Neither of these two connections can be deleted.

</warning>

<note>

**The end of the base URL:**

With or without `/v1`, both work — the system appends the `/v1/models` path itself.

</note>

## Step 4: Confirm the setup works

1. Go to the **Playground** page
2. In the *Source documents* panel, click **Upload** and select a PDF or an image
3. Select that file
4. Click **Run**

With no model specified in **Advanced settings**, the run uses the two default connections you checked in Step 3.

A record appears in the *Run results* panel, moving from **Processing** to **Completed**. Click the file name in that row to open the parsed result — that confirms both models work.

## Adding a custom model connection

In **Playground**'s **Advanced settings**, the OCR and VLM model dropdowns list custom model connections only, not the two marked **Default**. With none created, the dropdown shows "No models available" and both models fall back to the defaults. To compare results from a different model in a test run, add one here.

1. Go to the **Model connections** page and click **Add model connection**
2. Fill in the fields as follows

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Name
      </strong>
    </td>
    
    <td>
      A name that identifies this connection
    </td>
    
    <td>
      Required, up to 128 characters
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Base URL
      </strong>
    </td>
    
    <td>
      The model API endpoint from AI Model Center
    </td>
    
    <td>
      Required, must be an OpenAI-compatible endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        API key
      </strong>
    </td>
    
    <td>
      The API key from AI Model Center
    </td>
    
    <td>
      Optional. Left empty or set to <code>
        null
      </code>
      
      , no auth header is sent
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Model ID
      </strong>
    </td>
    
    <td>
      Select the models to create in the dropdown
    </td>
    
    <td>
      Required. The system fetches the list from the endpoint; you can select several at once
    </td>
  </tr>
</tbody>
</table>

1. Click the **Model ID** dropdown. The system fetches the model list using the **Base URL** and **API key**; the search box at the top filters by name, and the checkbox on the left selects everything currently filtered
2. Select the models you want to create
3. Click **Create**

<warning>

**One connection is created per selected model:**

Each selected model becomes its own model connection, listed as `<name> / <model ID>`. The combined name must not duplicate an existing connection, and is capped at 255 characters.

</warning>

After submitting, the page shows "N model connections created" and that many rows appear in the list. The new connections show up straight away in **Playground**'s **OCR** and **VLM** dropdowns.

A custom connection's **Base URL** and **API key** are yours to fill in. For how to get them, see [Call on-premises models on ARX through the API](https://docs.ardge.com/en/knowledge/arx-os/api-model-calls): **Base URL** takes what that article calls the model API endpoint, and **API key** takes an API key you create in AI Model Center.

## Troubleshooting

<table>
<thead>
  <tr>
    <th>
      Message
    </th>
    
    <th>
      Likely cause
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Couldn't reach the model service — check the base URL, API key, network, and service status
      </code>
    </td>
    
    <td>
      The base URL is wrong, or PreciseMD can't reach the endpoint
    </td>
    
    <td>
      Confirm the model status is <strong>
        Running
      </strong>
      
       on the <strong>
        Model Instances
      </strong>
      
       page in AI Model Center; for a custom connection, check the base URL you entered as well
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        The model service response doesn't match the expected model list API format
      </code>
    </td>
    
    <td>
      The endpoint's response doesn't match the OpenAI model list API
    </td>
    
    <td>
      Check you entered the model gateway's endpoint, not some other service's URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Model connection name already exists
      </code>
    </td>
    
    <td>
      The combined <code>
        <name> / <model ID>
      </code>
      
       duplicates an existing connection
    </td>
    
    <td>
      Use a different <strong>
        Name
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        The model connection is unreachable or has no models available
      </code>
    </td>
    
    <td>
      The endpoint is reachable but returned no models
    </td>
    
    <td>
      In AI Model Center, confirm the API key's model scope covers the model you want
    </td>
  </tr>
</tbody>
</table>

## Next steps

With the model connections checked, tune prompts for a specific document type in **Playground** — see [Tune prompts and compare OCR results in Playground](https://docs.ardge.com/en/knowledge/precisemd/playground-prompt-tuning).

## Related articles

- [When should I enable vision correction?](https://docs.ardge.com/en/knowledge/precisemd/vision-correction)
- [What file formats and limits does PreciseMD support?](https://docs.ardge.com/en/knowledge/precisemd/formats-and-limits)
- [Call on-premises models on ARX through the API](https://docs.ardge.com/en/knowledge/arx-os/api-model-calls)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
