curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {},
"metadata": {},
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"request_id": "<string>",
"version_number": 123
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate"
payload = {
"input": {},
"metadata": {},
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"request_id": "<string>",
"version_number": 123
}
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({
input: {},
metadata: {},
overrides: {
classifier_cases: {},
conditional_cases: {},
model_outcomes: {},
percentage_buckets: {}
},
request_id: '<string>',
version_number: 123
})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"path": [
{
"node_id": "<string>",
"node_type": "<string>",
"model": "<string>",
"node_label": "<string>",
"outcome": "<string>",
"output": "<string>",
"ranked_models": [
"<string>"
],
"target_node_id": "<string>"
}
],
"status": "<string>",
"result": {}
},
"meta": {
"target": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"error": "<string>",
"required_scope": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Simulate a request through the route
Walks the draft (or, with version_number, a deployed version) for one request and returns the path it takes, node by node, and the model that would answer. No provider is called: a model node’s outcome comes from overrides.model_outcomes, a classifier’s pick from overrides.classifier_cases. meta.target says which graph was walked. Requires the dynamic_routes:write scope.
curl --request POST \
--url https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {},
"metadata": {},
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"request_id": "<string>",
"version_number": 123
}
'import requests
url = "https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate"
payload = {
"input": {},
"metadata": {},
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"request_id": "<string>",
"version_number": 123
}
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({
input: {},
metadata: {},
overrides: {
classifier_cases: {},
conditional_cases: {},
model_outcomes: {},
percentage_buckets: {}
},
request_id: '<string>',
version_number: 123
})
};
fetch('https://api.opper.ai/management/v1/dynamic-routes/{name}/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"overrides": {
"classifier_cases": {},
"conditional_cases": {},
"model_outcomes": {},
"percentage_buckets": {}
},
"path": [
{
"node_id": "<string>",
"node_type": "<string>",
"model": "<string>",
"node_label": "<string>",
"outcome": "<string>",
"output": "<string>",
"ranked_models": [
"<string>"
],
"target_node_id": "<string>"
}
],
"status": "<string>",
"result": {}
},
"meta": {
"target": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"allowed_plans": [
"<string>"
],
"current_plan": "<string>",
"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.
Path Parameters
Route name
Body
The request body a conditional or classifier node reads; in the shape of the compat endpoint you call the route from (for chat completions: messages).
Request metadata a conditional node can test (tags; headers; the caller's project).
Forced outcomes per node id: which conditional case matches; which percentage bucket is drawn; whether a model succeeds or fails; which classifier case is picked.
Show child attributes
Show child attributes
Seeds the percentage-split draw so a run is reproducible.
Simulate a deployed version instead of the draft.