---
title: "Create Insights on an AOI"
method: POST
path: "/v0/aoi/{aoi_id}/insights"
tags: ["Insights"]
---

# Create Insights on an AOI

`POST /v0/aoi/{aoi_id}/insights`

## Request

- Base URL: `https://api.pixxel.space`
- URL: `https://api.pixxel.space/v0/aoi/{aoi_id}/insights`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pixxel/apis/stargate/docs/v0/aoi/:aoi_id/insights/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates an insight or get the estimated cost of running the insight.

## Path parameters

- `aoi_id` string, required

## Request body

- DexterCreateInsightsWildcardTransformerRequest
  - `name` string: Name is a human-readable title for the insight
  - `block` object, required: Describes the processing block to use for the insight
    - `name` string: Name of the block
    - `string` string: Id is a unique identifier for the block
    - `version` string, required: Semantic version of the block to use
  - `input` integer[], required: Inputs to the insight
  - `project_id` string: Identifies which project this insight belongs to
  - `metadata` object: Contains additional key-value information about the insight
  - `estimate` boolean: Indicates whether to return a cost estimate instead of running the insight.

## Response `200`

When estimating cost

- DexterCreateInsightCostEstimateUpstreamResponseBody
  - `estimate` integer: Estimate provides the computed cost value for the insight execution

## Other responses

- `201`: When creating an insight
- `400`: Bad Request
- `403`: Forbidden

---

[API](https://skmtc.dev/pixxel/apis/stargate.md) - [All operations](https://skmtc.dev/pixxel/apis/stargate/llms.txt) - [OpenAPI document](https://skmtc.dev/pixxel/apis/stargate/revisions/519562bd9d7a?raw)
