Routing Rules
Routing rule management endpoints
List routing rules
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Query Parameters
Include disabled rules (default: false)
Filter by scope type
"all" | "user" | "org" | "api_key"Response Body
application/json
curl -X GET "https://api.eurouter.ai/api/v1/routing-rules"{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"user_id": "string",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
"model": "string",
"models": [
"string"
],
"provider": {
"order": [
"string"
],
"ignore": [
"string"
],
"only": [
"string"
],
"allow_fallbacks": true,
"sort": "price",
"require_parameters": true,
"quantizations": [
"int4"
],
"data_collection": "allow",
"data_residency": "string",
"max_retention_days": 9007199254740991,
"eu_owned": true
},
"enabled": true,
"created_at": "string",
"updated_at": "string"
}
]
}Create routing rule
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
Display name for the rule (1-255 characters)
1 <= length <= 255Optional description (max 1000 characters)
length <= 1000Scope of the rule (defaults to user)
"user" | "org" | "api_key"Organization ID if org-scoped
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidAPI key ID if key-scoped
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidPrimary model (e.g., "anthropic/claude-3-opus")
Fallback model chain
Provider routing preferences
Whether the rule is active (default: true)
trueResponse Body
application/json
curl -X POST "https://api.eurouter.ai/api/v1/routing-rules" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"user_id": "string",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
"model": "string",
"models": [
"string"
],
"provider": {
"order": [
"string"
],
"ignore": [
"string"
],
"only": [
"string"
],
"allow_fallbacks": true,
"sort": "price",
"require_parameters": true,
"quantizations": [
"int4"
],
"data_collection": "allow",
"data_residency": "string",
"max_retention_days": 9007199254740991,
"eu_owned": true
},
"enabled": true,
"created_at": "string",
"updated_at": "string"
}
}Dry-run routing test
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Request Body
application/json
Rule ID to test
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidRule name to test
Single model to simulate routing for
Array of models to evaluate (fallback chain)
Override rule preferences for what-if testing
Response Body
application/json
curl -X POST "https://api.eurouter.ai/api/v1/routing-rules/dry-run" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"rule_applied": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
},
"effective_preferences": {
"order": [
"string"
],
"ignore": [
"string"
],
"only": [
"string"
],
"allow_fallbacks": true,
"sort": "price",
"require_parameters": true,
"quantizations": [
"int4"
],
"data_collection": "allow",
"data_residency": "string",
"max_retention_days": 9007199254740991,
"eu_owned": true
},
"results": [
{
"model": "string",
"provider_count": 9007199254740991,
"providers": [
"string"
]
}
],
"summary": {
"total_models": 9007199254740991,
"models_with_providers": 9007199254740991
}
}
}Get EU residency data
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Response Body
application/json
curl -X GET "https://api.eurouter.ai/api/v1/routing-rules/eu-residency"{
"data": {
"eu_countries": [
{
"code": "string",
"name": "string"
}
],
"eea_countries": [
{
"code": "string",
"name": "string"
}
],
"eu_adequate_countries": [
{
"code": "string",
"name": "string"
}
]
}
}Get routing rule
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
Routing rule UUID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidResponse Body
application/json
curl -X GET "https://api.eurouter.ai/api/v1/routing-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"user_id": "string",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
"model": "string",
"models": [
"string"
],
"provider": {
"order": [
"string"
],
"ignore": [
"string"
],
"only": [
"string"
],
"allow_fallbacks": true,
"sort": "price",
"require_parameters": true,
"quantizations": [
"int4"
],
"data_collection": "allow",
"data_residency": "string",
"max_retention_days": 9007199254740991,
"eu_owned": true
},
"enabled": true,
"created_at": "string",
"updated_at": "string"
}
}Update routing rule
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
Routing rule UUID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidRequest Body
application/json
New display name
1 <= length <= 255New description (null to remove)
length <= 1000Primary model (null to remove)
Fallback model chain (null to remove)
Provider preferences (null to remove)
Whether the rule is active
Response Body
application/json
curl -X PATCH "https://api.eurouter.ai/api/v1/routing-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"user_id": "string",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
"model": "string",
"models": [
"string"
],
"provider": {
"order": [
"string"
],
"ignore": [
"string"
],
"only": [
"string"
],
"allow_fallbacks": true,
"sort": "price",
"require_parameters": true,
"quantizations": [
"int4"
],
"data_collection": "allow",
"data_residency": "string",
"max_retention_days": 9007199254740991,
"eu_owned": true
},
"enabled": true,
"created_at": "string",
"updated_at": "string"
}
}Delete routing rule
Authorization
bearerAuth API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
Routing rule UUID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidResponse Body
application/json
curl -X DELETE "https://api.eurouter.ai/api/v1/routing-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"data": {
"success": true
}
}