mcpField
E
eurouter-integration

eurouter-integration

github.com/eurouterDevelopment5178 installsUpdated 36w ago
Repository

About eurouter-integration

A developer skill for integrating EUrouter, an OpenAI-compatible API that routes requests across providers. It focuses on EU data-residency and GDPR-related routing controls, migration, and API usage.

Key features

  1. 01OpenAI-compatible API migration
  2. 02EU residency and provider controls
  3. 03Model and provider fallback
  4. 04Reusable routing rules
  5. 05Model discovery and API guidance

Use cases

  1. 01Migrating an app from the OpenAI API
  2. 02Constraining requests to EU providers or regions
  3. 03Configuring repeatable routing preferences

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/eurouter/eurouter-skill --skill eurouter-integration

After installing, type/eurouter-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
code-examples-curl.md
code-examples-node.md
code-examples-python.md
endpoints.md
provider-preferences.md
routing-rules.md

Details

From the project README

EUrouter Integration Guide

You are helping a developer integrate EUrouter into their application. EUrouter is a drop-in replacement for the OpenAI API, purpose-built for EU customers requiring GDPR compliance. It routes AI requests to 10 providers through a single OpenAI-compatible API at https://api.eurouter.ai.

Supported providers: OpenAI, Anthropic, Mistral, Scaleway (FR), GreenPT, Microsoft Foundry, Nebius, IONOS (DE), OVHcloud (FR), AWS Bedrock.

When helping developers, always load the relevant reference files from the references/ directory in this skill folder based on what they need. Do not load all references at once.


Authentication

EUrouter uses API keys in the format eur_<publicId>.<secret>.

Send the key via either header:

  • Authorization: Bearer eur_...
  • x-api-key: eur_...

For organization-scoped requests, add: x-org-id: <uuid>

Keys are created via POST /api/v1/keys and the full key is shown only once at creation. It cannot be retrieved later.


Drop-in Migration from OpenAI

EUrouter is designed as a drop-in replacement. Only two things change:

Python (openai SDK):

from openai import OpenAI

# Before (OpenAI direct)
# client = OpenAI(api_key="sk-...")

# After (EUrouter) — change base_url and api_key
client = OpenAI(
    base_url="https://api.eurouter.ai/api/v1",
    api_key="eur_YOUR_KEY_HERE"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)

Node.js (openai SDK):

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.eurouter.ai/api/v1",
  apiKey: "eur_YOUR_KEY_HERE",
});

const response = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Hello!" }],
});

Important: All existing OpenAI model names work as-is (e.g., gpt-4o, claude-3-5-sonnet, mistral-large-3). No model name changes needed when migrating.


Core Endpoints

All endpoints are prefixed with /api. Base URL: https://api.eurouter.ai

EndpointMethodAuthDescription
/api/v1/chat/completionsPOSTYesChat completions (streaming, tools, vision, audio, reasoning)
/api/v1/completionsPOSTYesLegacy text completions
/api/v1/embeddingsPOSTYesText embeddings
/api/v1/responsesPOSTYesOpenAI Responses API compatible
/api/v1/modelsGETNoList/filter model catalog
/api/v1/providersGETNoList available providers
/api/v1/creditsGETYesCheck credit balance (EUR)
/api/v1/keysCRUDYesManage API keys
/api/v1/routing-rulesCRUDYesManage named routing configs
/healthGETNoHealth check

For full endpoint schemas, load references/endpoints.md.


EU/GDPR Compliance

This is EUrouter's key differentiator. Add a provider object to any generation request to enforce compliance:

{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello"}],
  "provider": {
    "data_residency": "eu",
    "eu_owned": true,
    "data_collection": "deny",
    "max_retention_days": 0
  }
}
FieldTypeDescription
data_residencystringRegion code — "eu", "de", "fr", etc. Only endpoints in that region
eu_ownedbooleanOnly EU-headquartered providers (Scaleway, IONOS, OVHcloud, GreenPT, Mistral)
data_collection"allow" | "deny""deny" excludes providers that use data for training
max_retention_daysnumberMax data retention. 0 = zero-data-retention only

Ready-to-use compliance profiles:

// Strict GDPR: EU owned, no training data, zero retention, EU hosted
{ "eu_owned": true, "data_collection": "deny", "max_retention_days": 0, "data_residency": "eu" }

// EU hosted, cheapest price
{ "data_residency": "eu", "sort": "price" }

// Specific EU providers only
{ "only": ["scaleway", "ionos", "ovhcloud"] }

For all provider preference fields, load references/provider-preferences.md.


Model Fallback

Pass a models array to try multiple models in order. If all providers for the first model fail, EUrouter tries the next:

{
  "models": ["claude-3-5-sonnet", "gpt-4o", "mistral-large-3"],
  "messages": [{"role": "user", "content": "Hello"}],
  "provider": { "data_residency": "eu" }
}

Note: Model fallback is NOT supported for embeddings (vector dimensions differ between models). Only provider fallback (same model, different provider endpoint) works for embeddings.


Routing Rules

Create reusable routing configurations to avoid repeating provider preferences on every request:

// Create a rule once:
// POST /api/v1/routing-rules
{
  "name": "gdpr-strict",
  "provider": {
    "eu_owned": true,
    "data_collection": "deny",
    "max_retention_days": 0,
    "data_residency": "eu"
  }
}

// Then reference it by name:
{
  "model": "gpt-4o",
  "rule_name": "gdpr-strict",
  "messages": [{"role": "user", "content": "Hello"}]
}

You can also reference by UUID with rule_id. Per-request provider preferences merge with the rule — request-level values take precedence.

Dry-run testing: Use POST /api/v1/routing-rules/dry-run to preview which providers satisfy a routing config without making a real request.

For full routing rules API, load references/routing-rules.md.


Model Discovery

GET /api/v1/models
GET /api/v1/models?provider=scaleway
GET /api/v1/models?supported_parameters=tools,vision
GET /api/v1/models?category=embedding

Prices are returned as strings in the model's pricing object with a currency field. Credits are in EUR.


Response Headers

Every generation endpoint returns routing transparency headers:

HeaderDescription
x-provider-idInternal provider UUID
x-provider-slugProvider name (e.g., openai, scaleway)
x-routing-strategyStrategy used for routing
x-model-usedActual model slug used
x-model-variantVariant suffix if applicable (:free, :nitro)
x-fallback-countNumber of provider fallbacks (only present if > 0)
x-model-fallback-countNumber of model fallbacks (only present if > 0)

Streaming

Set "stream": true for SSE streaming. Format is OpenAI-compatible:

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"},"index":0,"finish_reason":null}]}

data: [DONE]

For usage stats in the final chunk, add "stream_options": { "include_usage": true }.


Error Format

All errors follow:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Model not found"
  },
  "requestId": "uuid"
}

Key error codes: UNAUTHORIZED (401), FORBIDDEN (403), NOT_FOUND (404), BAD_REQUEST (400), INSUFFICIENT_QUOTA (402), SERVICE_UNAVAILABLE (503).


Reference Files

Load these based on the developer's specific need:

NeedFile
Full endpoint request/response schemasreferences/endpoints.md
All provider routing preference fieldsreferences/provider-preferences.md
Routing rules CRUD + dry-run APIreferences/routing-rules.md
Python code examples (openai SDK)references/code-examples-python.md
Node.js/TypeScript code examplesreferences/code-examples-node.md
curl examplesreferences/code-examples-curl.md

Comments

Markdown supported