// Developer docs

REST API reference.

Provision GPUs, orchestrate clusters, and stream inference — all over a stable, versioned HTTP API.

Overview

The Gensparkly API is a JSON-over-HTTPS interface for provisioning GPU instances, managing training clusters, and serving inference. All requests are versioned under /v1 and accept & return application/json.

  • REST semantics, predictable resource URLs
  • HTTPS only, TLS 1.3, mTLS optional on Enterprise
  • Cursor pagination on list endpoints
  • Idempotency-Key header on all mutating requests
  • Server-Sent Events for long-running operations

Authentication

All requests require a bearer token issued from the console. Tokens are scoped to a project and can be restricted by IP and permission set.

bash
curl https://api.gensparkly.com/v1/instances \
  -H "Authorization: Bearer $GENSPARKLY_API_KEY" \
  -H "Content-Type: application/json"

Request console

Fill parameters below and copy the equivalent request in cURL, Python, or Node. Nothing is sent — the console builds the request for you to run locally.

POST
https://api.gensparkly.com/v1/instances
Body
h100 | h200 | b200 | gb200 | l40s | a100
integer
Headers
curl -X POST "https://api.gensparkly.com/v1/instances" \
  -H "Authorization: Bearer $GENSPARKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: req_01HRXK7Q8Z3F4M5W6N" \
  -d '{
  "gpu": "h100",
  "count": 8,
  "region": "us-east-1",
  "image": "cuda:12.4-torch:2.4"
}'

Instances

Provision single-node GPU instances on-demand.

GET/instancesList all instances in the project.
POST/instancesCreate a new GPU instance.
GET/instances/{id}Retrieve a single instance.
DELETE/instances/{id}Terminate an instance.
bash
curl -X POST https://api.gensparkly.com/v1/instances \
  -H "Authorization: Bearer $GENSPARKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "gpu": "h100",
    "count": 8,
    "region": "us-east-1",
    "image": "cuda:12.4-torch:2.4",
    "ssh_keys": ["key_01H..."]
  }'

Clusters

Multi-node training clusters with NVLink and InfiniBand fabric.

POST/clustersProvision a training cluster.
GET/clusters/{id}Fetch topology, health, and utilization.
PATCH/clusters/{id}Scale nodes up or down.
DELETE/clusters/{id}Release the cluster.

Storage

S3-compatible object storage plus parallel filesystems for training data.

GET/storage/bucketsList buckets.
POST/storage/bucketsCreate a bucket.
POST/storage/filesystemsProvision a Lustre volume.

Inference

Deploy and invoke managed inference endpoints.

POST/inference/endpointsDeploy a model as an endpoint.
POST/inference/endpoints/{id}/invokeRun inference (supports streaming).
bash
curl -X POST https://api.gensparkly.com/v1/inference/endpoints/ep_llama3/invoke \
  -H "Authorization: Bearer $GENSPARKLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Explain NVLink in one sentence.", "max_tokens": 128}'

Billing

Read-only endpoints for cost, usage, and invoices.

GET/billing/usageMetered usage by resource and period.
GET/billing/invoicesList past invoices.
GET/billing/ratesEffective contract rates for the project.

Errors

Errors follow a consistent shape. HTTP status conveys the class.

CodeMeaningRetry?
400Invalid requestNo
401Missing or invalid API keyNo
403Forbidden — permission scopeNo
404Resource not foundNo
409Capacity conflictYes, with backoff
429Rate limitedYes, honor Retry-After
5xxServer errorYes, exponential backoff
json
{
  "error": {
    "type": "capacity_conflict",
    "message": "No H100 capacity in us-east-1 for the requested window.",
    "request_id": "req_01HRXK7Q8Z3F4M5W6N",
    "retry_after": 30
  }
}

SDKs

  • python · pip install gensparkly
  • typescript · npm i @gensparkly/sdk
  • go · go get github.com/gensparkly/gensparkly-go
  • terraform · provider "gensparkly" { ... }