---
title: "Suggest a source for every model parameter with AI"
method: POST
path: "/model_builders/suggest"
tags: ["Model builders"]
---

# Suggest a source for every model parameter with AI

`POST /model_builders/suggest`

## Request

- Base URL: `https://api.ionworks.com`
- URL: `https://api.ionworks.com/model_builders/suggest`
- Auth: none declared

Best-guess sources: pattern rules first, then AI for the gaps; all validated.

## Request body

- SuggestRequest: What to suggest sources for: a model, against an example cell spec.
  - `model_id` string, required
  - `cell_spec_id` string, required
  - `use_ai` boolean: Ask the AI to fill what the pattern rules could not place.

## Response `200`

Successful Response

- SuggestResponse: Validated suggestions, in the editor's per-parameter source shape.
  - `sources` object, required: Parameter -> {kind: 'cell_spec', path} | {kind: 'value', value} | {kind: 'calculation', type, options}.
  - `reasons` object
  - `origins` object: Who placed it: a rule, a conventional default to confirm, or the AI.
  - `rejected` RejectedSuggestion[]
    - `parameter` string, required
    - `reason` string, required
  - `ai_error` string, nullable: Why the AI step did not run or failed; rules still apply.

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-22** `39d84bb8875e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ionworks/apis/ionworks-api/changes/model_builders/suggest/post.md)

---

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