---
title: "Preview Ai Config"
method: POST
path: "/api/agents/{agent_id}/ai-config/preview"
tags: ["agents"]
---

# Preview Ai Config

`POST /api/agents/{agent_id}/ai-config/preview`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/agents/{agent_id}/ai-config/preview`
- Auth: none declared

Resolve a candidate template selection WITHOUT saving (TOS-2491).

This is what lets the agent editor treat template selection like every
other section - buffer it into the editor's dirty state and commit on the
global Save - rather than writing on click. The client cannot resolve it
itself: ``GET /api/agents/model-bundles`` returns template metadata only,
with no operations blob, and resolution additionally needs the identity's
credential policy, model bindings and contract data.

Read-only. Same visibility gate as ``GET .../ai-config``; it performs no
writes, so it deliberately does NOT require config authority - previewing
is exactly as sensitive as reading the sheet you are previewing against.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- AiConfigPreviewBody: A candidate template selection to resolve WITHOUT saving. ``drop_overrides`` is the "reset" branch of the keep-or-reset prompt: the same candidate template resolved as if every stored override were removed. The two branches are what the prompt compares, so both have to be renderable before anything is written.
  - `template_id` string, uuid, required
  - `template_version_id` string, uuid, nullable
  - `drop_overrides` boolean

## Response `200`

Successful Response

- AiConfigResponse
  - `bundle` IdentityModelBundleResponse, required
    - `template_id` string, uuid, required
    - `template_name` string, required
    - `provider_family` string, required
    - `template_version` integer, required
    - `template_version_id` string, uuid, nullable
  - `groups` AiConfigGroupResponse[], required
    - `group` string, required
    - `rows` AiConfigRowResponse[], required
      - `op_key` string, required
      - `label` string, required
      - `description` string, required
      - `group` string, required
      - `locked` boolean, required
      - `source` 'override' | 'bundle' | 'platform', required
      - `bundle_fill` boolean, required
      - `provider` string, required
      - `model_id` string, required
      - `model_display_name` string, nullable, required
      - `params` object, required
      - `bundle_default` object, nullable, required
      - `funding` 'byok' | 'credits' | 'platform', required
      - `required_features` string[], required
      - `editable_params` object[], required
      - `allowed_models` object[], required
      - `locked_reason` string, nullable, required
      - `vision_capable` boolean, nullable
  - `override_count` integer, required
  - `overridden_op_keys` string[], required
  - `rules` RuleSummaryResponse[], required
    - `id` string, required
    - `enabled` boolean, required
    - `description` string, nullable, required
    - `predicates` RulePredicateResponse[], required
      - `predicate` string, required
      - `op` string, required
      - `value` unknown, required
    - `then` RuleThenResponse, required
      - `provider` string, nullable, required
      - `model` string, nullable, required
      - `model_display_name` string, nullable, required
      - `params` object, required
    - `operations` string[], required
    - `judged_question` string, nullable, required
  - `rules_source` 'identity' | 'template', required

## Other responses

- `422`: Validation Error

---

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