Overview
This endpoint allows users to either run a new insight on a selected Area of Interest (AOI) or get an estimate of the cost associated with that insight. By specifying processing blocks, input datasets, and metadata, users can configure customized geospatial analyses. Setting the estimate flag to true lets users preview the cost without executing the operation. This endpoint is crucial for initiating insights or assessing their resource requirements within the Pixxel platform.
-
Method:
POST -
Endpoint:
/v0/aoi/{aoi_id}/insights - Operation: Create a new insight or estimate its cost.
- Authentication Required: Yes
Authorization
You need the api key which you can get from the API tab in Organization Settings. The api key is required in almost all the commands
Path Parameters
The path parameter aoi_id is used to specify the Area of Interest on which the insight is to be created or costed. It is essential to target the right geospatial context for processing and ensures that insight operations are scoped to a valid AOI within the platform.
| Name | Type | Required | Description |
|---|---|---|---|
aoi_id | string | Yes | ID of the AOI to run the insight on |
Request Body
The request body defines the configuration for the insight. It includes the processing block, the required input asset IDs, optional metadata, and an optional flag for cost estimation. The flexibility allows either simulation of cost or actual insight generation depending on the use case.
| Name | Type | Required | Description |
|---|---|---|---|
block | object | Yes | Describes the processing block to use for generating the insight |
input | integer[] | Yes | IDs of input assets (e.g., imagery IDs) |
name | string | No | Human-readable name for the insight |
project_id | string | No | ID of the project under which the insight is created |
metadata | object | No | Additional metadata as key-value pairs |
estimate | boolean | No | If true, returns cost estimate instead of creating an insight |
Response
A 200 OK response is returned when the estimate flag is true, indicating the computed cost of executing the insight. A 201 Created response indicates successful creation of the insight with a confirmation message and the insight ID. Both responses confirm the request was processed without errors.
- Returned when the estimate flag is set to true. Provides the cost of executing the insight.
- Returned when the insight is created with the estimate flag set to false.
How to use the Endpoint
- Construct Your Request Prepare a JSON body with mandatory fields like block and input. Set estimate to true to fetch cost or false to run the insight. Set the Authorization header with your token and replace aoi_id in the URL.
-
Send the Request
Make a POST request to
https://api.pixxel.space/v0/aoi/{aoi_id}/insights. Include your request body and authorization header. - Examine the Response If estimate is true, you’ll receive the cost estimate. If false, the response will confirm insight creation with an ID and message. Handle errors by checking status codes and structured error responses.