This endpoint lets users create a new custom or preset index by submitting a formula and related metadata. It requires a JSON request body with fields like name
, expression
, description
, rescale
, and lens_satellite_id
. Once created, the API returns the index object with a 201 Created status. This functionality is useful for defining spectral indices like NDVI, or grayscale composites for further processing. API key authentication is mandatory. Errors for invalid input or duplication are returned with appropriate codes and messages.
POST
/v0/indices
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
The body of an API request is where you send the actual data that the server needs to perform an action. For example, when creating a new AOI, the body contains details like its name, location, description, and related IDs. Think of it like filling out a form — the body holds all the answers you’re submitting. It’s usually sent in JSON format and is required for actions like POST or PUT requests.You need the following fields in Body
Field | Type | Required | Description |
---|---|---|---|
name | string | ✅ | Name of the index (e.g., "NDVI" ). |
description | string | ✅ | Short explanation of the index’s purpose. |
rescale | integer[] | ✅ | Array with min and max rescale values (e.g., [0, 1] ). |
expression | string | ✅ | Formula for calculating the index (e.g., "(B04-B08)/(B04+B08)" ). |
colormap | string | ✅ | Color palette for rendering the index (e.g., "rplumbho" ). |
lens_satellite_id | string | ✅ | Satellite ID associated with this index. |
expression_type | enum<string> | ✅ | Type of expression: composite , index , or grayscale . |
type | enum<string> | ✅ | Index category: custom or preset . |
This endpoint does not require any query parameters.
This endpoint does not require any path parameters.
The response for this endpoint confirms successful index creation with a 201 Created
status. It returns detailed information about the new index, including its ID, name, expression, bands, satellite, and timestamps. If there’s an error, such as missing fields or duplication, a structured error message with relevant status code is returned.Please refer to the table below for explaination of the fields in the response:
Name | Type | Description |
---|---|---|
bands | string[] | List of spectral bands used in the expression |
colormap | string | Name of the colormap applied to the output visualization |
created_at | string | Timestamp when the formula was created (ISO 8601 format) |
description | string | Description of what the formula is intended to analyze or reveal |
expression | string | Mathematical expression applied using the selected bands |
expression_type | string | Type of the expression (e.g., “index”, “formula”) |
id | string | Unique identifier of the custom expression |
lens_satellite_id | string | Internal ID of the satellite configuration this formula is tied to |
name | string | Human-readable name of the custom formula |
rescale | number[] | Min and max range used to normalize or rescale the output values |
satellite_name | string | Name of the satellite (e.g., “Sentinel-2”) |
type | string | Type of formula, usually “custom” for user-defined expressions |
updated_at | string | Timestamp when the formula was last updated (ISO 8601 format) |
name
, description
, expression
, rescale
, colormap
, lens_satellite_id
, expression_type
, and type
. Make sure all fields are filled correctly as required.
https://api.pixxel.space/v0/indices
. Include the JSON body and your API key in the headers.