> For the complete documentation index, see [llms.txt](https://docs.lumidb.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lumidb.com/api-reference/quickstart-your-first-api-request.md). Agents can also search and read this documentation through its [MCP server](https://docs.lumidb.com/~gitbook/mcp).

# Quickstart: your first API request

Create an API key and make your first requests to the LumiDB API.

In a few minutes you create an API key, list your datasets and search for data in an area. You need a LumiDB account and a tool that sends HTTP requests, such as curl.

All requests go to `https://api.lumidb.com/api`.

### 1. Create an API key

Open **API keys** under **Admin** in the sidebar, click **Create API key**, give the key a name and copy it. LumiDB shows the key once. See [API keys](https://docs.lumidb.com/archive-management/api-keys.md) for the steps and for the ways to send a key.

{% hint style="danger" %}
Treat the key like a password. Don't put it in code that you share or commit. The curl examples show `lumi_your_key_here`, so replace it with your key. The Python and JavaScript examples read the key from the environment variable `LUMIDB_API_KEY`.
{% endhint %}

### 2. List your datasets

Send the key in the `Authorization` header, as `apikey` followed by the key.

{% tabs %}
{% tab title="curl" %}

```sh
curl https://api.lumidb.com/api/datasets \
  -H "Authorization: apikey lumi_your_key_here"
```

{% endtab %}

{% tab title="Python" %}

```python
import os
import requests

BASE = "https://api.lumidb.com/api"
headers = {"Authorization": f"apikey {os.environ['LUMIDB_API_KEY']}"}

datasets = requests.get(f"{BASE}/datasets", headers=headers).json()
for dataset in datasets.values():
    print(dataset["kind"], dataset["display_name"], dataset["size_bytes"])
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const BASE = "https://api.lumidb.com/api";
const headers = { Authorization: `apikey ${process.env.LUMIDB_API_KEY}` };

const response = await fetch(`${BASE}/datasets`, { headers });
const datasets = await response.json();
for (const dataset of Object.values(datasets)) {
  console.log(dataset.kind, dataset.display_name, dataset.size_bytes);
}
```

{% endtab %}
{% endtabs %}

The response is an object keyed by dataset ID. The datasets you can see depend on your access.

```json
{
  "0195f4f2-0000-7000-8000-000000000000": {
    "id": "0195f4f2-0000-7000-8000-000000000000",
    "name": "my_scan",
    "display_name": "My scan",
    "kind": "pointcloud",
    "proj": "EPSG:3067",
    "bounds_wgs84": [24.927, 60.168, 24.929, 60.169, 10.0, 15.0],
    "size_bytes": 60000,
    "created_at": "2026-10-25T08:35:23.163198Z",
    "project_id": null
  }
}
```

| Field          | What it holds                                                        |
| -------------- | -------------------------------------------------------------------- |
| `kind`         | `pointcloud`, `raster` or `attachment`.                              |
| `name`         | The name that other endpoints use.                                   |
| `display_name` | The name shown in the app. It falls back to `name`.                  |
| `proj`         | The coordinate reference system of the dataset.                      |
| `bounds_wgs84` | `[west, south, east, north, low, high]`. The first four are degrees. |
| `size_bytes`   | The size of the dataset.                                             |
| `project_id`   | The project the dataset belongs to, or `null`.                       |

If the response is `401`, the key is missing or invalid.

### 3. Search an area

Send a bounding box as `[west, south, east, north]` in degrees (WGS84). The response lists the point cloud and raster datasets whose footprint intersects the box.

{% tabs %}
{% tab title="curl" %}

```sh
curl -X POST https://api.lumidb.com/api/search \
  -H "Authorization: apikey lumi_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"bbox": [24.8, 60.1, 25.1, 60.3]}'
```

{% endtab %}

{% tab title="Python" %}

```python
import os
import requests

BASE = "https://api.lumidb.com/api"
headers = {"Authorization": f"apikey {os.environ['LUMIDB_API_KEY']}"}

# [west, south, east, north] in degrees (WGS84)
bbox = [24.8, 60.1, 25.1, 60.3]
result = requests.post(f"{BASE}/search", headers=headers, json={"bbox": bbox}).json()
for dataset in result["datasets"]:
    print(dataset["kind"], dataset["display_name"])
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const BASE = "https://api.lumidb.com/api";
const headers = {
  Authorization: `apikey ${process.env.LUMIDB_API_KEY}`,
  "Content-Type": "application/json",
};

// [west, south, east, north] in degrees (WGS84)
const bbox = [24.8, 60.1, 25.1, 60.3];
const response = await fetch(`${BASE}/search`, { method: "POST", headers, body: JSON.stringify({ bbox }) });
const { datasets } = await response.json();
for (const dataset of datasets) {
  console.log(dataset.kind, dataset.display_name);
}
```

{% endtab %}
{% endtabs %}

`west` must be less than `east`. For an area that crosses 180° of longitude, send two searches.

### Next steps

* [Import data with the API](https://docs.lumidb.com/import-data/import-data-with-the-api.md): upload a file and import it from your own code.
* [Cesium 3D Tileset export](https://docs.lumidb.com/integrations/cesium-3d-tileset-export.md): stream a dataset as 3D Tiles.
* [Connecting AI assistants (MCP)](https://docs.lumidb.com/integrations/connecting-ai-assistants-mcp.md): let an AI assistant search and describe your datasets.
* The pages below list every endpoint, grouped by resource.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lumidb.com/api-reference/quickstart-your-first-api-request.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
