Scalarwaredocs
Getting started Welcome
Scalarware API · v1

Build with Scalarware.

One API for language inference, image and video generation, deployment templates, and live GPU compute. Use it directly from your application or optionally give the same documentation to an AI agent.

New here?Everything below works with one base URL and one bearer token. If you want an AI agent to read these docs instead, use llms-full.txt — the Copy page button above puts it on your clipboard.
BASE URLhttps://scalarware.com/api/v1
Call the API directlyUse cURL, Python, JavaScript, or any HTTP client. No skill required.Start with REST
Give it to an AIShare llms.txt or install the optional Scalarware Media skill for Claude and Codex.Agent setup
Run on rented GPUsRent private capacity and optionally import the same media skill onto the machine.Browse GPUs
OVERVIEW

API reference

Every Scalarware API is one base URL and one bearer token. Requests and responses are JSON; language inference follows the OpenAI chat-completions schema so existing clients work unchanged.

Base URL

bash
https://scalarware.com/api/v1

API groups

Model APIs

List models and run language inference across the live catalog, billed at the published rate.

Image and video

Create asynchronous media jobs, poll them, and download outputs with the same key.

GPUs

Browse live capacity, quote a template, launch a private machine, and destroy it.

Workspace

Manage API keys, read the wallet balance, and review usage.

Authentication

bash
Authorization: Bearer $SCALARWARE_API_KEY

Keys carry scopes. inference:read and inference:write cover models, chat and media; compute:read and compute:write cover GPUs. A call outside a key's scopes returns 401.

Billing

Requests are metered against the workspace balance at the published rate with no Scalarware markup. A request is priced before it runs and refused with 402 insufficient_balance when the workspace cannot cover it. GPU runtime is charged every minute a machine is up.

01 · GET STARTED

Your first direct API call

You do not need Claude, Codex, a Scalarware skill, or a rented GPU. Every media operation is available through normal authenticated HTTP.

bash
export SCALARWARE_API_KEY="scalar_live_..."

curl "https://scalarware.com/api/v1/catalog/search?modality=image" \
  -H "Accept: application/json"
bash
curl "https://scalarware.com/api/v1/images/generations" \
  -H "Authorization: Bearer $SCALARWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/nano-banana-2",
    "input": {"prompt": "Editorial product photo", "resolution": "1K"}
  }'
Asynchronous by defaultThe response includes a job ID and authenticated poll URL. Poll it until the status becomes succeeded, failed, or canceled.
02 · SECURITY

Authentication

Send your Scalarware key as a Bearer token from a server, agent runtime, or private GPU. Never put it in browser JavaScript or a public repository.

bash
Authorization: Bearer $SCALARWARE_API_KEY
One Scalarware credential

The upstream media credential remains inside Scalarware.

Visible unit pricing

Scalarware verifies the displayed model rate before creating a paid job.

03 · OPTIONAL

Use Scalarware with an AI

Agent integration is optional. Direct API users can skip this entire section.

Give your AI one URL

Use the complete machine-readable documentation without installing files.

bash
https://docs.scalarware.com/llms-full.txt

Install the media skill

Installs into Claude Code and Codex on macOS, Linux, WSL, or a rented Scalarware GPU.

bash
curl -fsSL https://scalarware.com/skills/scalarware-media/install.sh | bash
Same API underneathThe skill does not create a second execution system. It teaches the agent how to validate inputs and call the authenticated Scalarware endpoints documented here.
04 · DISCOVERY

Media model catalog

Returns only Scalarware-supported media models. Each object includes its exact JSON input schema, current price tiers, billing metric, and pricing guard.

GET/catalog/search?modality=image|video&q={query}live
bash
curl "https://scalarware.com/api/v1/catalog/search?modality=video&q=wan"
LANGUAGE INFERENCE

OpenAI-compatible language models

List normalized live routes, then call a model using the familiar chat-completions schema. Scalarware keeps route selection private and supports streamed responses.

GET/modelslive
POST/chat/completionslive
bash
curl "https://scalarware.com/api/v1/chat/completions" \
  -H "Authorization: Bearer $SCALARWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org/GLM-5",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": false
  }'
GPU MARKET

Discover live GPU offers

Returns normalized, supplier-neutral GPU capacity. Re-query immediately before requesting a deployment because availability and hourly rates can move.

GET/compute/offerslive
bash
curl "https://scalarware.com/api/v1/compute/offers" \
  -H "Accept: application/json"
PRIVATE GPU DEPLOYMENTS

Quote, launch, inspect, destroy

Deployment mutations use the signed-in workspace session. A quote reserves a specific eligible offer for five minutes; launch requires the customer's SSH public key and an explicit confirmation.

GET/templateslive
POST/deployments/quotelive
GET/deploymentslive
POST/deploymentslive
GET/deployments/{id}live
DELETE/deployments/{id}live
bash
curl "https://scalarware.com/api/v1/deployments/quote" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"ltx-2.5","runtime_hours":4}'
Customer-direct accessScalarware injects the customer's SSH key and returns a direct tunnel command. Model ports remain private and the instance is automatically destroyed at the selected runtime cap.
WORKSPACE API

Keys, wallet, and usage

These endpoints use the signed-in workspace session. API key tokens are shown once at creation.

GET/keyslive
POST/keyslive
DELETE/keys/{id}live
GET/walletlive
GET/usage?limit=50live
05 · IMAGE API

Generate or edit an image

POST/images/generationslive
bash
curl "https://scalarware.com/api/v1/images/generations" \
  -H "Authorization: Bearer $SCALARWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "input": {"prompt": "A minimal campaign poster", "quality": "medium", "number_of_images": 1},
    "wait_seconds": 10,
    "cancel_after_seconds": 300
  }'
FieldRequiredDescription
modelyesExact ID from the image catalogue.
inputyesModel-specific object validated against input_schema.
wait_secondsnoWait briefly before returning an asynchronous job.
cancel_after_secondsnoMaximum permitted upstream execution window.
06 · VIDEO API

Generate or transform video

POST/videos/generationslive
bash
curl "https://scalarware.com/api/v1/videos/generations" \
  -H "Authorization: Bearer $SCALARWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/wan-3",
    "input": {"prompt": "A cinematic aerial shot over the coast", "duration": 5, "resolution": "1080p", "aspect_ratio": "16:9"},
    "cancel_after_seconds": 1800
  }'

For image-to-video, use the model’s URI input field with an HTTPS file URL. Kling Motion Control requires both an image and a reference video.

07 · ASYNC JOBS

Poll, cancel, and download

Image and video jobs share one lifecycle. Every operation requires the same Scalarware key that created the job.

GET/media/jobs/{id}live
DELETE/media/jobs/{id}live
GET/media/jobs/{id}/output/{index}live
bash
curl "https://scalarware.com/api/v1/media/jobs/$JOB_ID" \
  -H "Authorization: Bearer $SCALARWARE_API_KEY"
response
{
  "id": "media_...",
  "status": "succeeded",
  "output": [{"index": 0, "url": "/api/v1/media/jobs/media_.../output/0"}],
  "price": {"currency": "USD", "estimated_microusd": 500000, "billed_microusd": 500000}
}
08 · BILLING

Public-rate billing

Before a job starts, Scalarware calculates the maximum supported cost and reserves it from the wallet. After completion, the final cost is settled from output images or video seconds and unused credit is released.

QuoteReserve maximumRunSettle actualRelease remainder
Prices can changeScalarware verifies configured rates against the current public pricing source before spending. A mismatch blocks creation with pricing_refresh_required.
09 · SUPPORTED MODELS

Image models

These are the only image models currently accepted by POST /images/generations. Required inputs are marked with an asterisk.

image model

Nano Banana 2

google/nano-banana-2

Fast image generation and conversational multi-image editing.

$0.067 1K$0.10 2K$0.15 4K
InputTypeRules
prompt*string—
resolutionstring1K · 2K · 4K · default: 1K
image model

GPT Image 2

openai/gpt-image-2

Image generation and editing with instruction and text rendering.

$0.012 Low$0.047 Medium$0.13 High / auto
InputTypeRules
prompt*string—
qualitystringlow · medium · high · auto · default: auto
image model

Seedream 5 Lite

bytedance/seedream-5-lite

Image generation with built-in reasoning and editing.

$0.035 Per image
InputTypeRules
prompt*string—
image model

Grok Imagine Image

xai/grok-imagine-image

Image generation and editing with Grok Imagine.

$0.020 Per image
InputTypeRules
prompt*string—

Video models

These are the only video models currently accepted by POST /videos/generations.

video model

Wan 3

alibaba/wan-3

Text- and image-to-video with cinematic motion.

$0.025 480p / second$0.050 720p / second$0.10 1080p / second
InputTypeRules
prompt*string—
durationinteger2–30 · default: 5
resolutionstring480p · 720p · 1080p · default: 1080p
video model

P-Video

prunaai/p-video

Fast video generation with draft mode.

$0.005 720p draft / second$0.040 1080p / second
InputTypeRules
prompt*string—
video model

Grok Imagine Video 1.5

xai/grok-imagine-video-1.5

Image-to-video with synchronized audio.

$0.080 Per second
InputTypeRules
prompt*string—
image*file URL—
video model

Grok Imagine Video

xai/grok-imagine-video

Text-, image-to-video, and video editing.

$0.050 Per second
InputTypeRules
prompt*string—
video model

Kling 3 Omni Video

kwaivgi/kling-v3-omni-video

Multimodal video generation with references and audio.

$0.17 Standard / second$0.22 Pro / second$0.42 4K / second
InputTypeRules
prompt*string—
video model

Kling 3 Motion Control

kwaivgi/kling-v3-motion-control

Transfer reference motion to a character image.

$0.070 Standard / second$0.12 Pro / second
InputTypeRules
image*file URL—
video*file URL—
10 · ERRORS

Errors

Scalarware returns stable error envelopes and does not forward raw provider responses.

response
{
  "error": {
    "code": "pricing_refresh_required",
    "message": "Current public pricing could not be verified. No prediction was created."
  }
}
400Invalid request or unsupported model
401Missing or invalid Scalarware key
402Insufficient wallet credit
404Job or output not found
409Idempotency or job-state conflict
429Rate or budget limit reached
502 / 503Execution route unavailable