A complete training workflow
Upload media directly to storage, submit a training job, then retrieve its capture. Every job uses your Splatware account’s API allowance or saved payment method.
- 1Dataset
- 2Direct upload
- 3Training
- 4Generated capture
Python 3.10+ · standard library only. Set SPLATWARE_API_KEY in your environment.
Download splatware.py into your working directory, then run the example.
from splatware import train
train("./photos", depth="fast")Authentication
Send your API key as a bearer token on every authenticated request. Use a server environment variable; keep credentials out of URLs, browser bundles, and version control.
Authorization: Bearer $SPLATWARE_API_KEY
Content-Type: application/json
Idempotency-Key: <unique-operation-id>Keys belong to your account and grant only their selected scopes. The full secret is shown once when you create it. To rotate a key, create a replacement, update your service, then revoke the old key.
The capabilities and OpenAPI endpoints are public. API key management requires signing in to the website.
Datasets & direct uploads
Create a dataset with its input type. Request upload sessions in batches, transfer each file to its returned storage URL, then complete the dataset.
/api/v1/datasets{
"name": "Courtyard",
"input_type": "images"
}Supported input types: images, videos, mixed, 360-image, 360-video, dataset.
/api/v1/datasets/{dataset_id}/uploads{
"files": [
{
"path": "IMG_0001.jpg",
"content_type": "image/jpeg",
"size_bytes": 2457600
}
]
}The response contains data.uploads[] with file_id, path, upload_url and expires_at. Transfer bytes directly to the returned resumable storage URL. Treat that URL as a temporary credential. The API server receives only file metadata.
/api/v1/datasets/{dataset_id}/completeSend {} after storage uploads finish. Each completion request validates up to 50 uploaded objects. If the response status is validating, call complete again with a new Idempotency-Key until status is ready. Image training requires at least 25 images. Keep relative paths for reconstructed datasets. ZIP extraction is not supported. The API checks metadata and file signatures; video decoding, frame counts and panorama geometry are validated by the processing backend.
Start a training job
/api/v1/trainings{
"dataset_id": "<dataset_id>",
"configuration": {
"trainingDepth": "fast"
}
}Choose Fast for regular photos or video. Choose Balanced or above for 360° inputs and reconstructed datasets. Unknown configuration fields are rejected.
Use a unique Idempotency-Key for each new operation. On a network failure, retry the same body with the same key. Reusing a key with different input is a conflict.
Model Quality & parameters
This reference comes directly from the server validation schema. Defaults below apply when the setting is active for the selected quality level and input.
360
| Parameter / type | Allowed values | Default |
|---|---|---|
hide_camera_operatorboolean360-degree images/videos only. Exclude the camera operator. Requires worker support. | true · false | true |
Model Quality
| Parameter / type | Allowed values | Default |
|---|---|---|
trainingDepthstring | fast · balanced · high · higher · highest | "fast" |
Quality
| Parameter / type | Allowed values | Default |
|---|---|---|
maxGaussiansCountinteger / stringAutomatic population or an explicit cap of 1–20000000. Fast always uses 1100000. | 1–20,000,000 · auto | "auto" |
modelSHDegreeinteger | 0 · 1 · 2 · 3 | 3 |
Output
| Parameter / type | Allowed values | Default |
|---|---|---|
atmosphericAudioboolean | true · false | true |
Model Quality and input requirements
- Fast accepts images/videos with shared training selectors and a fixed population of 1100000.
- 360 and reconstructed datasets require Balanced or above.
- Meshes are converted locally in Create/Convert and cannot be uploaded or queued for API training.
- Gaussian Splat and instant mesh conversions are local Create/Convert operations, not training jobs.
- ZIP extraction is not supported by the existing pipeline. Upload dataset relative files in batches.
- Image training requires at least 25 images.
- API upload and queue limits apply independently of website subscriptions.
Job status & outputs
/api/v1/trainings/{training_id}Poll the training resource with a short delay between requests. Read data.status; stop polling at completed or failed.
uploadingpayment_pendingqueuedprocessingcompletedfailed/api/v1/captures/{capture_id}A completed training response includes capture_id and capture_url when available. Use these returned values rather than building a storage URL. Access remains subject to ownership and the capture’s visibility.
Errors & safe retries
Errors use a stable JSON envelope. Retain the request ID when contacting support; do not log credentials or upload-session URLs.
{
"error": {
"code": "invalid_configuration",
"message": "configuration.modelSHDegree is outside its allowed values.",
"request_id": "<request_id>",
"details": {}
}
}| HTTP status | Action |
|---|---|
| 400 | Correct the invalid or unknown field before retrying. |
| 401 / 403 | Check key validity, scopes and account permissions. |
| 404 | Check the resource ID and ownership. |
| 409 | Check resource state or conflicting idempotency input. |
| 429 | Wait for the Retry-After duration. |
| 500 / network failure | Retry with bounded backoff and the original idempotency key. |
Limits & billing
API training uses its own billing. Check your monthly included API points with GET /api/v1/usage. Set up a saved payment method to pay per generation in euros. Before submitting, send the training request to POST /api/v1/trainings/quote to check the price and billing mode. Use billing_mode to choose included, pay_as_you_go, or auto. Automatic paid fallback requires your authorization. Set max_amount_cents to cap a paid request. A bank debit can stay in payment_pending until Stripe confirms it. Failed training returns the included allowance or the full charge.
- Files per upload request
- 50
- Files per dataset
- 10,000
- JSON request body
- 65,536 byte
- Requests per key / minute
- 120
- Requests per account / minute
- 300
Direct storage traffic does not pass through the API server. API request limits and training concurrency are separate limits.
Webhooks
Receive signed completion and failure notifications for long-running training. Verify the signature against the original request body before processing an event. Handle repeated deliveries idempotently.
/api/v1/webhooks{
"url": "https://your-service.example/webhooks/splatware"
}Save the returned signing_secret securely. Events are training.completed and training.failed. The Splatware-Signature header contains t=<timestamp>,v1=<signature>. Verify HMAC-SHA256 over the timestamp, a dot, and the unchanged request body; allow at most five minutes of clock skew. Deduplicate using Splatware-Event-Id.
Failed deliveries retry after 60 seconds, 5 minutes, 30 minutes, 2 hours and 6 hours, for at most six total attempts. Callback URLs must use HTTPS and public addresses; redirects are rejected.
/api/v1/webhooks/{webhook_id}Use the webhook operations in the OpenAPI specification to register a callback and pass its ID as webhook_id when creating a training.
"""Verify before parsing JSON. Persist event IDs to deduplicate delivery retries."""
import hashlib, hmac, time
def verify_webhook(raw_body: bytes, signature: str, signing_secret: str) -> bool:
try:
fields = dict(part.split('=', 1) for part in signature.split(','))
timestamp = fields['t']
if abs(time.time() - int(timestamp)) > 300:
return False
expected = hmac.new(signing_secret.encode(), timestamp.encode() + b'.' + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, fields['v1'])
except (KeyError, ValueError):
return False
import { createHmac, timingSafeEqual } from "node:crypto";
// Verify raw bytes before JSON.parse. Persist Splatware-Event-Id to deduplicate retries.
export function verifyWebhook(rawBody, signature, signingSecret) {
const fields = Object.fromEntries(
String(signature)
.split(",")
.map((v) => v.split("=")),
);
if (
!/^\d+$/.test(fields.t || "") ||
Math.abs(Date.now() / 1000 - Number(fields.t)) > 300 ||
!/^[a-f0-9]{64}$/.test(fields.v1 || "")
)
return false;
const expected = createHmac("sha256", signingSecret)
.update(fields.t + ".")
.update(rawBody)
.digest();
return timingSafeEqual(expected, Buffer.from(fields.v1, "hex"));
}
