API Reference

The NexusCompute REST API lets you integrate AI compute directly into your applications. All endpoints return JSON. The base URL for all requests is:

https://nexuscompute.com/api

Your API key (for Try it)

session only

Paste your sk-nx-… key here once. It's stored in sessionStorage and cleared when you close the tab — never sent to our servers except as your request's Bearer token.

Getting Started

1. Create an account — Sign up via POST /auth/sign-up or through the web app at /auth/sign-up.

2. Get an API key — Create a long-lived API key via POST /api-keys. Store it securely — it is shown only once.

3. Authenticate requests — Pass your key in the Authorization header:

curl
Authorization: Bearer sk-nx-YOUR_API_KEY

4. Browse listings — Call GET /listings to find GPU compute nodes. Connect to one with POST /connections, then dispatch inference jobs via POST /jobs.

Conventions

  • All request bodies must be Content-Type: application/json.
  • Successful creates return 201 Created. Successful deletes return 204 No Content.
  • Errors return a JSON body with an "error" string field and an appropriate 4xx status.
  • Token prices are expressed as USD per 1,000 tokens (e.g. 0.15 = $0.15 / 1K tokens).
  • Monetary amounts in the billing API are in USD cents (integer).
  • Fields marked * are required.

Authentication

Listings

Listings represent individual GPU compute nodes offered by Providers. Each listing includes pricing, hardware specs, and the AI model it serves.

Endpoints

Endpoints are named, reusable inference targets that point to a specific listing. Providers create endpoints; buyers call them.

Connections

A connection links a buyer to a listing and creates a scoped API key for that listing. The raw key is returned once at creation time — store it immediately.

Jobs

Jobs represent individual inference requests. Dispatching a job requires an API key and a positive credit balance. Billing is calculated once the job completes.

Billing

Buyers prepay a credit balance via Stripe Checkout. All amounts are in USD cents. The minimum balance required to dispatch a job is $1.00 (100 cents).

API Keys

API keys have the format sk-nx-… and authenticate requests via Authorization: Bearer sk-nx-YOUR_KEY. The raw key is returned once at creation — store it immediately. All subsequent calls return only the key prefix (first 8 characters after sk-nx-).

NexusCompute API v1 · Questions? api@nexuscompute.com