---
title: "Create, update, or rename one virtual model"
method: PUT
path: "/admin/virtual-models"
tags: ["admin"]
---

# Create, update, or rename one virtual model

`PUT /admin/virtual-models`

## Request body

- AdminUpsertVirtualModelRequest
  - `description` string
  - `enabled` boolean
  - `old_source` string
  - `source` string, required
  - `strategy` string
  - `target_model` string
  - `targets` AdminVirtualModelTargetRequest[]
    - `model` string
    - `provider` string
    - `weight` number
  - `user_paths` string[]

## Response `200`

OK

- VirtualmodelsView
  - `created_at` string
  - `description` string
  - `enabled` boolean
  - `kind` string
  - `managed` boolean
  - `model` string
  - `provider_name` string
  - `provider_type` string
  - `resolved_model` string
  - `scope_kind` string
  - `source` string
  - `strategy` string
  - `targets` VirtualmodelsTarget[]
    - `model` string
    - `provider` string
    - `weight` number
  - `updated_at` string
  - `user_paths` string[]
  - `valid` boolean

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `502` — Bad Gateway
- `503` — Service Unavailable

## Changes

- **2026-06-28** `47b6a9727683` — 4 info
  - added the new optional request property `old_source`
  - added the new optional request property `strategy`
  - added the new optional request property `targets`
  - added the optional property `managed` to the response with the `200` status
- **2026-06-25** `aa549def1ff8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/enterpilot/apis/gomodel-api/changes/admin/virtual-models/put.md)

---

[API](https://skmtc.dev/enterpilot/apis/gomodel-api.md) · [All operations](https://skmtc.dev/enterpilot/apis/gomodel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/enterpilot/gomodel-api/revisions/a807d76b5ae5/schema)
