curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"draft": {
"graph": {},
"layout": {},
"revision": 123,
"validation": "<array>"
},
"route": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"invocation_model": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted_at": "2023-11-07T05:31:56Z",
"draft_graph": {},
"draft_layout": {},
"draft_validation": "<array>"
},
"version_count": 123,
"active_version": {
"created_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123
},
"latest_version_number": 123
},
"meta": {
"deployed_version": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"note": "<string>",
"route_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"graph": {},
"layout": {},
"validation": "<array>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Create a dynamic route
curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"draft": {
"graph": {},
"layout": {},
"revision": 123,
"validation": "<array>"
},
"route": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"invocation_model": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted_at": "2023-11-07T05:31:56Z",
"draft_graph": {},
"draft_layout": {},
"draft_validation": "<array>"
},
"version_count": 123,
"active_version": {
"created_at": "2023-11-07T05:31:56Z",
"note": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123
},
"latest_version_number": 123
},
"meta": {
"deployed_version": {
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"draft_revision": 123,
"note": "<string>",
"route_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_number": 123,
"graph": {},
"layout": {},
"validation": "<array>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
Management API authentication. Pass an op-mak-… management token as a Bearer token. Runtime op-… API keys are rejected with 403 — they belong on the data-plane endpoints. Mint a management key from the platform UI under Settings → API keys.
Body
Route name; callers invoke the route as dynamic/. Lowercase letters and digits plus '.' '_' '-'; up to 128 characters; unique per organization.
When true the draft is validated and deployed as version 1 in the same call; the response then carries deployed_version in meta.
Free-text description shown in the platform.
Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology.
Show child attributes
Show child attributes
{
"elements": [
{
"id": "START",
"outputs": { "next": { "elementId": "model_default" } },
"type": "start"
},
{
"id": "model_default",
"outputs": {
"fallback": { "elementId": "END" },
"success": { "elementId": "END" }
},
"properties": {
"label": "Default model",
"model": "cerebras/gpt-oss-120b"
},
"type": "model"
},
{ "id": "END", "outputs": {}, "type": "end" }
]
}
Editor canvas positions keyed by element id. Opaque to the gateway; omit when authoring from code.
Release note recorded on the deployed version. Only read when deploy is true.