EUrouter

Routing Rules

Routing rule management endpoints

List routing rules

GET
/api/v1/routing-rules

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Query Parameters

include_disabled?boolean

Include disabled rules (default: false)

scope?string

Filter by scope type

Value in"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

POST
/api/v1/routing-rules

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

name*string

Display name for the rule (1-255 characters)

Length1 <= length <= 255
description?string|null

Optional description (max 1000 characters)

Lengthlength <= 1000
scope?string

Scope of the rule (defaults to user)

Value in"user" | "org" | "api_key"
org_id?string

Organization ID if org-scoped

Match^([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)$
Formatuuid
api_key_id?string

API key ID if key-scoped

Match^([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)$
Formatuuid
model?string

Primary model (e.g., "anthropic/claude-3-opus")

models?array<string>

Fallback model chain

provider?

Provider routing preferences

enabled?boolean

Whether the rule is active (default: true)

Defaulttrue

Response 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

POST
/api/v1/routing-rules/dry-run

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Request Body

application/json

rule_id?string

Rule ID to test

Match^([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)$
Formatuuid
rule_name?string

Rule name to test

model?string

Single model to simulate routing for

models?array<string>

Array of models to evaluate (fallback chain)

preference_overrides?

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

GET
/api/v1/routing-rules/eu-residency

Authorization

bearerAuth
AuthorizationBearer <token>

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

GET
/api/v1/routing-rules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

id*string

Routing rule UUID

Match^([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)$
Formatuuid

Response 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

PATCH
/api/v1/routing-rules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

id*string

Routing rule UUID

Match^([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)$
Formatuuid

Request Body

application/json

name?string

New display name

Length1 <= length <= 255
description?string|null

New description (null to remove)

Lengthlength <= 1000
model?string|null

Primary model (null to remove)

models?|null

Fallback model chain (null to remove)

provider?|null

Provider preferences (null to remove)

enabled?boolean

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

DELETE
/api/v1/routing-rules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

id*string

Routing rule UUID

Match^([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)$
Formatuuid

Response Body

application/json

curl -X DELETE "https://api.eurouter.ai/api/v1/routing-rules/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "data": {
    "success": true
  }
}