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.
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.
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.
/instancesList all instances in the project./instancesCreate a new GPU instance./instances/{id}Retrieve a single instance./instances/{id}Terminate an instance.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.
/clustersProvision a training cluster./clusters/{id}Fetch topology, health, and utilization./clusters/{id}Scale nodes up or down./clusters/{id}Release the cluster.Storage
S3-compatible object storage plus parallel filesystems for training data.
/storage/bucketsList buckets./storage/bucketsCreate a bucket./storage/filesystemsProvision a Lustre volume.Inference
Deploy and invoke managed inference endpoints.
/inference/endpointsDeploy a model as an endpoint./inference/endpoints/{id}/invokeRun inference (supports streaming).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.
/billing/usageMetered usage by resource and period./billing/invoicesList past invoices./billing/ratesEffective contract rates for the project.Errors
Errors follow a consistent shape. HTTP status conveys the class.
| Code | Meaning | Retry? |
|---|---|---|
| 400 | Invalid request | No |
| 401 | Missing or invalid API key | No |
| 403 | Forbidden — permission scope | No |
| 404 | Resource not found | No |
| 409 | Capacity conflict | Yes, with backoff |
| 429 | Rate limited | Yes, honor Retry-After |
| 5xx | Server error | Yes, exponential backoff |
{
"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" { ... }