<!-- Source: https://docs.geopera.com/api-reference/operations/cog · Markdown for LLMs -->

<!-- AUTO-GENERATED by scripts/generate-api-reference.cjs from the committed OpenAPI spec. Do not edit by hand. -->

# COG & tiles operations

Cloud-optimized GeoTIFF tiling and rendering.

Each operation below is reachable at `POST /v1/op/{operation_id}` or the resource path `POST /v1/{resource}/{action}`, with a Bearer token (a `gpra_` API key or a session token). Back to the [Operations Reference](/api-reference/operations) index.

## `cog.colormaps`

Curated colormap groups for the frontend picker (bare-dict).

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.colormaps`  ·  `POST /v1/cog/colormaps` |
| **Python / TypeScript** | `client.cog.colormaps(…)` |
| **CLI** | `geopera cog colormaps …` |

**Request** — `CogEmptyInput` _(see the OpenAPI schema for fields)_.

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `cog.formulas`

Predefined spectral-index formula templates (bare-dict, keyed by index id).

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.formulas`  ·  `POST /v1/cog/formulas` |
| **Python / TypeScript** | `client.cog.formulas(…)` |
| **CLI** | `geopera cog formulas …` |

**Request** — `CogEmptyInput` _(see the OpenAPI schema for fields)_.

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `cog.statistics`

AOI-scoped percentile statistics for a COG — drives per-AOI colormap rescale.

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.statistics`  ·  `POST /v1/cog/statistics` |
| **Python / TypeScript** | `client.cog.statistics(…)` |
| **CLI** | `geopera cog statistics …` |

**Request** — `CogStatsInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `geometry` | object | yes |  |
| `expression` | string | — |  |
| `bands` | string | — |  |
| `percentiles` | array of any | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `cog.thumbnail`

Generate a JPEG thumbnail from the smallest COG overview.

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.thumbnail`  ·  `POST /v1/cog/thumbnail` |
| **Python / TypeScript** | `client.cog.thumbnail(…)` |
| **CLI** | `geopera cog thumbnail …` |

**Request** — `CogThumbnailInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `width` | integer | — |  |
| `height` | integer | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `cog.tile.render`

Render an XYZ tile from a COG (bands or band-math expression).

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.tile.render`  ·  `POST /v1/cog/tile/render` |
| **Python / TypeScript** | `client.cog.tile.render(…)` |
| **CLI** | `geopera cog tile render …` |

**Request** — `CogTileInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `z` | integer | yes |  |
| `x` | integer | yes |  |
| `y` | integer | yes |  |
| `format` | string | yes |  |
| `bands` | string | — |  |
| `expression` | string | — |  |
| `rescale` | string | — |  |
| `colormap` | string | — |  |
| `quality` | integer | — |  |
| `aoi` | string | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

## `cog.tile.terrain`

Render a Mapbox Terrain-RGB tile from a single-band elevation/depth COG.

| | |
|---|---|
| **Scope** | `tiles:read` |
| **Side-effect** | read |
| **HTTP** | `POST /v1/op/cog.tile.terrain`  ·  `POST /v1/cog/tile/terrain` |
| **Python / TypeScript** | `client.cog.tile.terrain(…)` |
| **CLI** | `geopera cog tile terrain …` |

**Request** — `CogTerrainInput`

| Field | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes |  |
| `z` | integer | yes |  |
| `x` | integer | yes |  |
| `y` | integer | yes |  |
| `invert` | boolean | — |  |
| `aoi` | string | — |  |

**Response** — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.
