import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_routing_strategy(slug="summarize-profile-router")
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRoutingStrategy({
client,
throwOnError: true,
query: {
slug: 'summarize-profile-router',
},
});
curl "https://app.weflayr.com/api/routing-strategy/?slug=summarize-profile-router" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": null,
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"previous_versions": null,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}
Routing strategies
Get routing strategy
Get one routing strategy by its live version, with its previous versions on request.
GET
/
api
/
routing-strategy
/
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_routing_strategy(slug="summarize-profile-router")
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRoutingStrategy({
client,
throwOnError: true,
query: {
slug: 'summarize-profile-router',
},
});
curl "https://app.weflayr.com/api/routing-strategy/?slug=summarize-profile-router" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": null,
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"previous_versions": null,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}
Archived strategies are returned too. To restore an older version, save its document again with Set routing strategy, passing the live version as
The response also carries
expected_version.
Parameters
string
required
The strategy’s slug.
boolean
default:"false"
Include the versions older than the live one, newest first, each with the document it was saved from. Defaults to false.
blockers (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_routing_strategy(slug="summarize-profile-router")
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getRoutingStrategy({
client,
throwOnError: true,
query: {
slug: 'summarize-profile-router',
},
});
curl "https://app.weflayr.com/api/routing-strategy/?slug=summarize-profile-router" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": null,
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"previous_versions": null,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}