> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ornn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the supplier API

Use the supplier API to enroll servers, track your nodes and the VMs running on them, read telemetry, and submit listings from your own tools. It is the same API the supplier portal uses.

## Authenticate

In the supplier portal's **Developers** section, select **Create key**. Enter a name in the dialog and create the key. Copy it before selecting **Done**; it is only shown once. Send it as a bearer token to `https://api.ornn.com`.

The **Developer quickstart** banner above the API keys list shows a copyable request. Your API base URL and organization ID appear underneath with copy controls. Choose a request from **Code example** above the snippet to update and copy a curl example for authentication, inventory, telemetry, enrollment, or listing submission. Replace the placeholders before running a command in your terminal.

```bash theme={null}
export ORNN_API_KEY="ornn_sk_..."

curl https://api.ornn.com/v1/auth/session \
  -H "Authorization: Bearer $ORNN_API_KEY"
```

The key belongs to the organization you created it in, so you don't need an organization header. The response lists that one organization; its `id` is your organization ID. Supplier routes require that organization to be a supplier. See [API keys](/api-keys) to create, revoke, and secure keys.

## Routes

| Method | Path | Use |
| - | - | - |
| `GET` | `/commerce/supplier/fees` | Returns `{ "listingFeePpm": 0 }`. |
| `GET` | `/v1/orchestrator/nodes` | List your enrolled nodes. |
| `GET` | `/v1/orchestrator/nodes/{node_id}/virtual-machines` | List active VMs on one of your nodes. |
| `POST` | `/v1/observability/nodes/telemetry/latest` | Read current node or VM metrics in a batch. |
| `GET` | `/v1/observability/nodes/{node_id}/telemetry/query` | Read a node's metric history. |
| `GET` | `/v1/observability/virtual-machines/{vm_id}/telemetry/query` | Read a VM's metric history. |
| `POST` | `/v1/orchestrator/enrollment-tokens` | Create an enrollment command for your organization. |
| `GET` | `/v1/orchestrator/enrollment-logs` | Read enrollment progress. |
| `GET`, `POST` | `/commerce/supplier/listings` | Read or submit listing requests. |
| `GET`, `PATCH` | `/commerce/supplier/listings/{id}` | Read or edit one listing request. |
| `GET`, `POST` | `/commerce/supplier/listings/{id}/messages` | Read or post in the listing's private conversation with Ornn. |

### Nodes and VMs

The node list returns `nodes` and, when there are more, `next_cursor`. Send that cursor unchanged on the same path until it is `null`.

```bash theme={null}
curl "https://api.ornn.com/v1/orchestrator/nodes?limit=100" \
  -H "Authorization: Bearer $ORNN_API_KEY"
```

VM reads only work for nodes your organization owns. They return operational fields only, never renter details.

### Telemetry

The batch read accepts `node_ids`, `virtual_machine_ids`, or both, up to 5,000 IDs in total.

```bash theme={null}
curl https://api.ornn.com/v1/observability/nodes/telemetry/latest \
  -H "Authorization: Bearer $ORNN_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"node_ids":["<node-id>"]}'
```

History reads take ISO `start` and `end` timestamps, a comma-separated `metrics` list, and `max_points` from 1 to 500. Available metrics are `gpu_temperature`, `gpu_utilization`, `cpu_utilization`, `cpu_temperature`, and `memory_utilization`. The response contains `windows`, each with `metric`, `start`, `end`, `mean`, `min`, and `max`.

```bash theme={null}
curl "https://api.ornn.com/v1/observability/nodes/<node-id>/telemetry/query?start=2026-10-01T00:00:00Z&end=2026-10-02T00:00:00Z&metrics=gpu_utilization,gpu_temperature&max_points=240" \
  -H "Authorization: Bearer $ORNN_API_KEY"
```

Poll current readings every 20–30 seconds. On a `429`, wait for the `Retry-After` interval before retrying.

### Enrollment

Create an enrollment command with your organization ID:

```bash theme={null}
curl https://api.ornn.com/v1/orchestrator/enrollment-tokens \
  -H "Authorization: Bearer $ORNN_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"organization_id":"<your-organization-id>"}'
```

The response contains a one-time install command. Running it on a server enrolls that server with Ornn and changes the machine, so treat it as a deliberate step rather than an automated retry. Track progress with `GET /v1/orchestrator/enrollment-logs`.

#### Custom network setup

When Ornn has enabled a custom network setup for your organization, your custom installer can request it with `POST /v1/orchestrator/enrollment/gateway` and read its status with `GET` on the same path. These calls use the installer's enrollment token as the bearer token, rather than your API key. Send no request body or organization header.

Repeated calls share one setup request for your organization. The `status` is `queued`, `provisioning`, `ready`, or `failed`; GET returns `404` before a request exists. Stop and contact Ornn if setup fails. Downloading an installer does not start setup. A `ready` response confirms this network setup step only; enrollment and customer access still need their own verification.

When setup reports an error, display its `error_message` and include the `error_code` when contacting Ornn. Both fields are `null` when no error is recorded.

## Listing fee

`GET /commerce/supplier/fees` returns `{ "listingFeePpm": 0 }`. To estimate take-home after the transaction fee, add `?pricePerGpuHourMicroUsd=2000000` for a \$2/GPU-hour price. The response also includes `takeHomePerGpuHourMicroUsd`, calculated by subtracting the current fee amount, rounded to the nearest micro-dollar. The estimate does not change your submitted listing rate. Submissions omit `expectedFeePpm`.

## Submit a listing from an enrolled node

Send a `POST` to `/commerce/supplier/listings` with an `Idempotency-Key` header. Reuse the same key when you retry the same submission.

```bash theme={null}
curl https://api.ornn.com/commerce/supplier/listings \
  -H "Authorization: Bearer $ORNN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  --data '{
    "nodeId": "<your enrolled node ID>",
    "supplierPricePerGpuHour": "2.00",
    "startAt": "2026-11-01T00:00:00Z",
    "endAt": "2026-12-01T00:00:00Z",
    "attestationAccepted": true
  }'
```

* `supplierPricePerGpuHour` is your listing price in USD per GPU-hour, as a decimal string with up to six decimal places and a minimum of `0.01`.
* `startAt` and `endAt` are ISO timestamps in whole seconds.
* The node must be enrolled and on-grid (not off-grid or terminated), with GPU inventory. Hardware and location come from enrollment, so you don't send them.

Your submission creates a proposed listing. Ornn reviews it before making it available to buyers; approval keeps the same listing ID. Rejected listings remain unpublished and can be edited and resubmitted. Until publication, edit it with `PATCH /commerce/supplier/listings/{id}`, sending the same fields plus the `expectedRevision` you last read. A published request can no longer be edited.

## Facilities for manual capacity offers

List your facilities with `GET /commerce/facilities?owned=true` using your selected organization. For a manual offer, send either `facilityId` or `newFacility: { "displayName": "US East", "region": "us-east", "zone": "" }`. Region and zone are optional. A new facility is saved with the offer and returned as `facilityId`; reuse that ID for subsequent edits or offers. An existing facility must belong to your selected organization. Enrolled-node offers use the facility recorded during enrollment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.