Skip to main content

Overview

The Model Playground provides three API surfaces for working with model inference:

POST /api/v1/mlmodels/{uuid}/run

Run a model interactively. Used by the in-app playground and directly from the SDK. Sync path (200): Direct provider call (Google GenAI, OpenAI, or a custom HTTP endpoint). Async path (202): Used when a cloud-node workload is required (e.g. im2mesh, audio). Returns a workload_uuid to poll.
Edge-only models (is_edge_compatible && !is_cloud_compatible) are rejected with 400 from this endpoint. Use the Python SDK (cw.models.load(entry).predict(...)) or the cyberwave model bind CLI instead.

Request body — MLModelRunSchema

At least one of prompt, image_base64, or image_url must be provided for most model types.

Core inputs

Extended perception envelope (optional)

These fields let runners build richer spatial context without a second API revision:

MLModelFrameSchema

Response — 200 OK (sync)

MLModelRunResultSchema

Response — 202 Accepted (async / cloud-node)

Poll GET /api/v1/cloud-node-workloads/{workload_uuid} until status == "completed". The result payload lands in workload.command_params.result.

Response codes


Output formats

The output_format field in the run result tells you how to interpret output:

Example: VLM text response

Example: Spatial reasoner — points

Points are [y, x] normalized to 0-1000, where [0, 0] is the top-left corner.

Example: Detections (structured_task = "detect_objects")


POST /api/v1/mlmodels/{uuid}/evaluate

Start an asynchronous benchmark evaluation. Returns 202 Accepted immediately with a poll URL.

Request body — MLModelEvaluateSchema

Response — 202 Accepted

Poll GET /api/v1/cloud-node-workloads/{uuid} until status == "completed". Results are in workload.command_params.result — aggregate pass rate and per-case breakdown. To list available benchmark suites: GET /api/v1/mlmodels/benchmark-suites (public, no auth).

GET /api/v1/mlmodels/{uuid}/weights

Get a signed download URL for the model’s checkpoint weights (tar archive containing config.json + adapter files from training).

Response — 200 OK

The signed URL is valid for 2 hours.

Response codes


GET /api/v1/mlmodels/structured-actions

Return the canonical catalog of structured_task values understood by the playground. No authentication required. Consumed by the frontend and Python SDK.

Python SDK

Two patterns map to this API: 1 — Playground handle (POST /api/v1/mlmodels/{uuid}/run with full request control):
2 — Unified load() + predict() (routes cloud slugs through the playground-backed inference path where applicable; edge weights run locally):
For edge-only weights, load().predict() runs on-device; playground(...).run() is for the HTTP playground contract (prompts, structured tasks, async workloads).

cURL examples

Text-only VLM run

Vision run with image URL

Spatial reasoning run (points)


Model Catalog API

Browse and manage model records

Python SDK — ML Models

SDK reference for catalog + runtime

Structured Actions

All available structured task IDs

Edge Workers

Run edge models on hardware