API Documentation

The Nx AI Cloud exposes two REST APIs: one for managing AI models and catalogues, and one for managing edge devices and sites. Both are documented via OpenAPI (Swagger UI).

API
OpenAPI UI
Description

Compute API

Model upload, conversion, catalogue management

Device API

Site, server, and edge device management

The raw OpenAPI JSON specifications are available at /cpt/openapi.json and /dev/openapi.json on the same host.

Swagger UI showing the Compute API endpoint list organized by tag
The Swagger UI at api.sclbl.nxvms.com/cpt/openapi.html lists all available Compute API endpoints

Authentication

All API endpoints require a Bearer token obtained via the Nx OAuth2 flow.

Getting a token

The token exchange happens automatically when you log in through the Nx AI Cloud admin interface. For programmatic access, follow the OAuth2 authorization code flow against the Nx Cloud identity provider:

The response includes an access_token (JWT). Use it as the Bearer token in all subsequent API calls.

Note: The code parameter is obtained via the OAuth2 authorization code redirect flow, which requires a browser. For interactive testing, use the Swagger UI linked in the Authentication section above. Headless programmatic authentication is not yet covered here.

Using the token

Pass the token in the Authorization header on every request:


Multi-tenant context (acting as an organization)

Users with access to multiple organizations can make API calls on behalf of a specific organization by passing two additional headers:

Header
Values
Description

X-Act-As-Kind

user, organization, channel_partner

The entity type to act as

X-Act-As-ID

UUID of the organization

The organization UUID

Omitting these headers causes the API to act as the authenticated user (personal context).


Pagination

List endpoints return paginated results. The total record count is exposed in a response header:

Header
Description

X-Pagination-Records

Total number of records matching the query (regardless of page size)

Pagination parameters vary by endpoint; see the OpenAPI spec for limit and offset query parameters.


Common operations

Upload a model

Get a specific model

List devices for a site

Assign a model pipeline to a device


circle-info

For a full list of endpoints, request/response schemas, and query parameters, use the interactive OpenAPI documentation linked at the top of this page.

Last updated