Canonical docs: wiki/api/README.md — full endpoint list, Caspar gate, OpenAPI
openapi.yaml, and per-topic examples.
HighAsCG maps subset functionality of the underlying CasparCG AMCP protocol into an easy-to-use HTTP REST JSON API. All endpoints are accessible via http://localhost:<PORT>/api.
All server responses include standard headers and use the application/json format.
Channel numbers (WO-868): the examples use the default numbering, where channel 1 is PGM of Screen 1. With Operator GUI first on (Devices → Caspar server page,
casparServer.operator_gui_first), channel 1 is the operator GUI and every other channel moves up by one (PGM Screen 1 = 2). A request withoutchannelstill means PGM Screen 1.
POST /api/playPlay a clip on a channel and layer.
{
"channel": 1,
"layer": 10,
"clip": "AMB",
"loop": true,
"transition": "MIX",
"duration": 50,
"tween": "easeInCubic",
"auto": false,
"parameters": ""
}
curl -X POST -H "Content-Type: application/json" -d '{"clip":"AMB","loop":true,"channel":1,"layer":10}' http://localhost:4200/api/play
fetch('/api/play', { method: 'POST', body: JSON.stringify({ clip: 'AMB', channel: 1, layer: 10, loop: true }) })
POST /api/load, POST /api/loadbgLoads a clip (or loads it into the background) onto a channel and layer. Wait for POST /api/play to trigger if BG.
/api/play.POST /api/pause, POST /api/resume, POST /api/stop, POST /api/clearControls the playback state or clears the layer content entirely.
{ "channel": 1, "layer": 10 }POST /api/print, POST /api/log/level, POST /api/log/categoryControls CasparCG disk writing/logging settings.
print: { "channel": 1 }log/level: { "level": "trace" }log/category: { "category": "calltrace", "enable": true }Mixer commands can be accessed via POST (to mutate) or GET (to query properties).
POST /api/mixer/:commandChanges mixer configurations for a layer.
command can be keyer, blend, chroma, invert, straight_alpha, opacity, brightness, saturation, contrast, levels, fill, clip, anchor, crop, rotation, volume, mastervolume, grid, commit, clear.keyer: per-layer blend mode in Caspar’s mixer — not the same as DeckLink “external keyer” in hardware logs. See reference/amcp-mapping.md (Mixer) for detail.{ "channel": 1, "layer": 10 }opacity):
{
"channel": 1,
"layer": 10,
"opacity": 0.5,
"duration": 25,
"tween": "linear"
}
GET /api/mixer/:command?channel=X&layer=YQueries the value of the mixer property (e.g. GET /api/mixer/opacity?channel=1&layer=10).
{
"ok": true,
"data": "0.5"
}
Controls HTML and Flash templates running in the CG layer.
POST /api/cg/addAdds a template to a specific host layer.
{
"channel": 1,
"layer": 20,
"templateHostLayer": 1,
"template": "my-template",
"playOnLoad": true,
"data": "<templateData><componentData id=\"f0\"><data id=\"text\" value=\"Hello World\"/></componentData></templateData>"
}
POST /api/cg/updateUpdates template parameters.
{ "channel": 1, "layer": 20, "templateHostLayer": 1, "data": "<xml...>" }POST /api/cg/play, POST /api/cg/stop, POST /api/cg/next, POST /api/cg/invokeControls playback of templates, triggers animations, or invokes JS methods.
Stores and retrieves raw strings to CasparCG disk (for memory caching) as well as handles project states.
POST /api/data/store{ "name": "my_dataset", "data": "<dataset>..." }POST /api/data/retrieve, POST /api/data/remove{ "name": "my_dataset" }POST /api/data/listLists datasets stored in CasparCG.
POST /api/project/save, POST /api/project/loadSaves and loads a full HighAsCG project payload into a Caspar dataset (casparcg_web_project).
Extracts core statuses and telemetry from CasparCG.
GET /api/stateReturns the merged state tree of the HighAsCG app + Caspar variables and channels.
GET /api/server, GET /api/server/queues, GET /api/server/threads, GET /api/server/glGets information about the underlying CasparCG running server.
GET /api/fonts, GET /api/help/:commandReturns all fonts available and documentation on commands.
GET /api/channels/:id, GET /api/channels/:id/delayFetches parsed XML info arrays of what is loaded inside a channel (INFO X).
GET /api/thumbnailsLists all available thumbnails.
GET /api/thumbnail/:filenameReturns a binary PNG response of the requested media thumbnail.
POST /api/thumbnails/generate, POST /api/thumbnails/generate-allCommands Caspar to regenerate base64 thumb streams.
{ "filename": "AMB" }POST /api/restart, POST /api/killRestarts the underlying AMCP connections and internal structures, or sends KILL to shut off the CasparCG instance entirely.
{}POST /api/diag, POST /api/gl/gcShow diagnostic screens or trigger OpenGL Garbage Collection.
{}POST /api/rawArbitrary AMCP payload dispatching.
{ "cmd": "PLAY 1-1 AMB LOOP" }GET /api/system/operator-first, POST /api/system/operator-first“Operator GUI first” (WO-868): Caspar channel 1 = the operator GUI, its monitor leftmost, every other channel up by one.
{ enabled, refusals, warnings, channels: { before, after } }{ "enable": true, "dryRun": true }. dryRun (default true) only plans: channel table, remap, the
stores it would rewrite, the X layout before/after, refusals and warnings. "dryRun": false backs up to
~/.highascg/backup/wo868-<time>/, renumbers projects / state / settings, sets the flag and runs the full apply
(Caspar restart). "force": true overrides only the on-air refusal.