---
title: "Validate Model Instance"
method: POST
path: "/v1/workspaces/{workspace}/model-instances/test"
tags: ["v1", "protected", "model-instances"]
---

# Validate Model Instance

`POST /v1/workspaces/{workspace}/model-instances/test`

Test a model instance configuration before creating it.

## Path parameters

- `workspace` string, required — Slug of the workspace the request acts in

## Request body

- ModelInstanceTestRequest
  - `model_spec_id` string, uuid, required
  - `provider_config_id` string, uuid, required
  - `test_message` string, nullable

## Response `200`

Successful Response

- ModelInstanceTestResponse
  - `cost` string, nullable
  - `error_type` string, nullable
  - `message` string, required
  - `model_name` string, nullable
  - `provider_type` string, nullable
  - `response_content` string, nullable
  - `success` boolean, required
  - `tokens_used` integer, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-26** `d3ad8e1a3681` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/model-instances/test/post.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentarea/apis/agentarea-api/revisions/d3ad8e1a3681?raw)
