Skip to main content
GET
Key Orchestrator Graph
The orchestrator graph is a runnable per-key flow: Entry → Classifier / Router → Model → Guardrail. When enabled, every request to the key runs the path you drew — routing, model selection, per-node skills, and guardrails all applied. It takes precedence over the model plan and applies on both the native and OpenAI-compatible endpoints. This is the REST surface behind the dashboard’s Orchestrator canvas and the MCP configuration tools.

Authentication

Requires an API key with billing scope; the caller must own the key.

Path Parameters

string
required
The API key UUID.

Get the graph

GET /api/v1/keys/{id}/orchestrator-graph
string
The API key UUID.
object | null
The saved graph ({ version, enabled, nodes, edges }) or null when none is set.

Replace the graph

PUT /api/v1/keys/{id}/orchestrator-graph
boolean
required
When true, the orchestrator runs this graph. An enabled graph must have an entry node and at least one model node with an engine, or the request is rejected.
object[]
required
Up to 100 nodes. Each: { id, type, position?, config? }. type is one of entry, classifier, router, model, guardrail, description, output. A model node’s config.upstreamId is its engine; a guardrail node’s config.guardrailPolicyId is its policy (before the model = screens input, after = screens output).
object[]
required
Each: { id, source, target, modes?, when?, default? }. Classifier branches use modes (the mode that takes the edge); Router branches use when (keywords); default is the fallback edge.

Example