---
title: "Run Generation"
method: POST
path: "/metadata/attributes/{attribute_id}/run"
tags: ["Metadata"]
---

# Run Generation

`POST /metadata/attributes/{attribute_id}/run`

## Request

- Base URL: `https://api.aspect.inc`
- URL: `https://api.aspect.inc/metadata/attributes/{attribute_id}/run`
- Auth: API key in header `Authorization`

Start AI generation for this attribute.

- `mode`: `fill` generates missing and failed values. `overwrite` regenerates all values.
- `replace_manual`: if `true`, an `overwrite` run also regenerates manually entered values. Ignored by `fill`. Default `false`.
- `target`: `watch` (the watch directories), `directories`, or `assets`.

To track progress, call `GET /metadata/attributes/stats`.

## Path parameters

- `attribute_id` string, uuid, required: Attribute ID

## Query parameters

- `dry_run` boolean: Count the assets the run would cover without starting it. Not supported when `target.kind` is `assets`.

## Request body

- CellRunRequest: API request schema for a run: what it does and which assets it covers.
  - `mode` 'fill' | 'overwrite', required: `fill` generates missing and failed values. `overwrite` regenerates all values.
  - `replace_manual` boolean: With `overwrite`, also replace answers entered by hand. Ignored by `fill`
  - `target` union, required: Which assets the run covers: `watch` = every asset in the watch directories, rejected when there are none; `directories` = assets in the given directories (`recursive: true` includes their subdirectories); `assets` = only the listed assets, wherever they are
    - WatchRunTarget: Every asset the attribute watches; rejected when it watches nothing.
      - `kind` 'watch', required
    - DirectoriesRunTarget: Assets in the given directories (`recursive: true` includes their subdirectories), of every type the attribute runs on: the watch and its asset-type limit do not apply.
      - `kind` 'directories', required
      - `directory_ids` string[], required: Directories in the attribute's project; the trash directory is not allowed
      - `recursive` boolean, required: `true` includes each directory's subdirectories; `false` covers only the assets directly inside it
    - AssetsRunTarget: Only the listed assets, wherever they are.
      - `kind` 'assets', required
      - `asset_ids` string[], required: Assets to run on

## Response `200`

Successful Response

- CellRunResponse: API response schema for an explicit run's counts.
  - `count` integer, required: Assets the run covers. Hand-entered values are included only with `replace_manual`.
  - `manually_entered` integer, nullable: Assets with a hand-entered value. Set only by `overwrite` dry runs.

## Other responses

- `422`: Validation Error

---

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