EUrouter

Routing Rules

API reference for Routing Rules

OpenAPI JSON

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" | "workspace" | "api_key"
workspace_id?string

Filter routing rules by workspace ID. Omit to list all accessible rules; when set, account-wide rules (workspace_id null) are also included.

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"
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "description": "string",
      "user_id": "string",
      "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
      "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
      "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": 0,
        "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

TypeScript Definitions

Use the request body type in TypeScript.

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",
    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
    "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": 0,
      "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

TypeScript Definitions

Use the request body type in TypeScript.

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": 0,
      "eu_owned": true
    },
    "results": [
      {
        "model": "string",
        "provider_count": 0,
        "providers": [
          "string"
        ]
      }
    ],
    "summary": {
      "total_models": 0,
      "models_with_providers": 0
    }
  }
}

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",
    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
    "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": 0,
      "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

TypeScript Definitions

Use the request body type in TypeScript.

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",
    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
    "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": 0,
      "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
  }
}

Was this page helpful?

Still stuck? Contact support