-
Notifications
You must be signed in to change notification settings - Fork 1
docs(data-governance): add EU endpoint page #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f613194
docs(data-governance): add EU endpoint page
tristantelleb 1f34fd4
Merge branch 'main' into docs/eu-endpoint
tristantelleb fddde46
docs(eu-endpoint): drop auth header from discovery curl samples
tristantelleb 4f889a5
fix(nav): restore docs.json structure lost in rebase auto-merge
tristantelleb 64e1e66
docs(eu-endpoint): correct the 451 response shape
tristantelleb db81e4d
docs(eu-endpoint): add Python and JS samples to discovery section
tristantelleb fed755c
docs(eu-endpoint): cross-link from directly-related pages
tristantelleb 9f14250
Merge branch 'main' into docs/eu-endpoint
tristantelleb 9b65e8b
chore: bump dateModified for changed docs
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,204 @@ | ||
| --- | ||
| sidebarTitle: "EU Endpoint" | ||
| title: "EU Endpoint" | ||
| icon: "earth-europe" | ||
| --- | ||
|
|
||
| Eden AI exposes a regional endpoint that routes your requests exclusively through providers and models cleared for European processing. Use it when your workload requires data residency in the EU or when your compliance posture forbids fallback to providers outside the region. | ||
|
|
||
| ## Base URLs | ||
|
|
||
| | Region | Base URL | | ||
| |---|---| | ||
| | Global (default) | `https://api.edenai.run` | | ||
| | EU | `https://api.eu.edenai.run` | | ||
|
|
||
| Everything else — your API key, authentication header, request bodies, response shapes — is identical. You only swap the host. | ||
|
|
||
| <Info> | ||
| Your API key works on both endpoints. There is no separate EU key to issue. | ||
| </Info> | ||
|
|
||
| ## Calling the EU endpoint | ||
|
|
||
| <CodeGroup> | ||
| ```bash cURL | ||
| curl -X POST https://api.eu.edenai.run/v3/chat/completions \ | ||
| -H "Authorization: Bearer YOUR_API_KEY" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{ | ||
| "model": "mistral/mistral-large-latest", | ||
| "messages": [{"role": "user", "content": [{"type": "text", "text": "Bonjour"}]}] | ||
| }' | ||
| ``` | ||
|
|
||
| ```python Python | ||
| import requests | ||
|
|
||
| response = requests.post( | ||
| "https://api.eu.edenai.run/v3/chat/completions", | ||
| headers={ | ||
| "Authorization": "Bearer YOUR_API_KEY", | ||
| "Content-Type": "application/json", | ||
| }, | ||
| json={ | ||
| "model": "mistral/mistral-large-latest", | ||
| "messages": [{"role": "user", "content": [{"type": "text", "text": "Bonjour"}]}], | ||
| }, | ||
| ) | ||
|
|
||
| print(response.status_code) | ||
| print(response.json()) | ||
| ``` | ||
|
|
||
| ```javascript JavaScript | ||
| const response = await fetch("https://api.eu.edenai.run/v3/chat/completions", { | ||
| method: "POST", | ||
| headers: { | ||
| "Authorization": "Bearer YOUR_API_KEY", | ||
| "Content-Type": "application/json", | ||
| }, | ||
| body: JSON.stringify({ | ||
| model: "mistral/mistral-large-latest", | ||
| messages: [{ role: "user", content: [{ type: "text", text: "Bonjour" }] }], | ||
| }), | ||
| }); | ||
|
|
||
| console.log(response.status); | ||
| console.log(await response.json()); | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| ## Discovering EU-available models | ||
|
|
||
| When you hit the discovery endpoints on `api.eu.edenai.run`, the response is automatically filtered to providers and models that are available in the EU. | ||
|
|
||
| <Info> | ||
| Discovery endpoints (`/v3/models`, `/v3/info`) are public — no API key needed to browse availability. | ||
| </Info> | ||
|
|
||
| <Tabs> | ||
| <Tab title="LLMs"> | ||
| <CodeGroup> | ||
| ```bash cURL | ||
| curl https://api.eu.edenai.run/v3/models | ||
| ``` | ||
|
|
||
| ```python Python | ||
| import requests | ||
|
|
||
| response = requests.get("https://api.eu.edenai.run/v3/models") | ||
| for model in response.json()["data"]: | ||
| print(model["id"], [r["code"] for r in model.get("regions", [])]) | ||
| ``` | ||
|
|
||
| ```javascript JavaScript | ||
| const response = await fetch("https://api.eu.edenai.run/v3/models"); | ||
| const { data } = await response.json(); | ||
| data.forEach((m) => console.log(m.id, (m.regions || []).map((r) => r.code))); | ||
| ``` | ||
| </CodeGroup> | ||
| </Tab> | ||
|
|
||
| <Tab title="Expert Models"> | ||
| <CodeGroup> | ||
| ```bash cURL | ||
| curl https://api.eu.edenai.run/v3/info | ||
| ``` | ||
|
|
||
| ```python Python | ||
| import requests | ||
|
|
||
| response = requests.get("https://api.eu.edenai.run/v3/info") | ||
| for feature in response.json()["features"]: | ||
| for subfeature in feature["subfeatures"]: | ||
| for model in subfeature["models"]: | ||
| print(model["model"], [r["code"] for r in model.get("regions", [])]) | ||
| ``` | ||
|
|
||
| ```javascript JavaScript | ||
| const response = await fetch("https://api.eu.edenai.run/v3/info"); | ||
| const { features } = await response.json(); | ||
| features.forEach((f) => | ||
| f.subfeatures.forEach((sf) => | ||
| sf.models.forEach((m) => | ||
| console.log(m.model, (m.regions || []).map((r) => r.code)) | ||
| ) | ||
| ) | ||
| ); | ||
| ``` | ||
| </CodeGroup> | ||
| </Tab> | ||
| </Tabs> | ||
|
|
||
| Each model entry carries a `regions` array so you can see at a glance which regions cover it: | ||
|
|
||
| ```json | ||
| { | ||
| "id": "mistral/mistral-large-latest", | ||
| "object": "model", | ||
| "owned_by": "mistral", | ||
| "regions": [{ "code": "eu", "name": "Europe" }], | ||
| "capabilities": { "pdf": true, "reasoning": false, "web_search": false, "tool_calling": true } | ||
| } | ||
| ``` | ||
|
|
||
| ## Error: provider not available in the EU | ||
|
|
||
| If you call the EU endpoint with a model or provider that has not been cleared for European processing, Eden AI rejects the request before any provider is contacted. | ||
|
|
||
| **HTTP 451 — Unavailable For Legal Reasons** | ||
|
|
||
| LLM endpoints (`/v3/chat/completions`, `/v3/embeddings`, …) return the error in OpenAI-compatible shape: | ||
|
|
||
| ```json | ||
| { | ||
| "error": { | ||
| "message": "Provider(s)/model(s) google/gemini-3.5-flash are not available on the EU endpoint.", | ||
| "type": "request_forbidden", | ||
| "param": null, | ||
| "code": "region_not_allowed" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Universal AI and expert-model endpoints (`/v3/universal-ai`) return the same status with the FastAPI envelope: | ||
|
|
||
| ```json | ||
| { | ||
| "detail": { | ||
| "error": "Provider or model not available in this region", | ||
| "message": "Provider(s)/model(s) <provider/model> are not available on the EU endpoint." | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| In both cases the gate runs ahead of input validation and file fetching, so a rejected request never touches the upstream provider, never spends credits, and never leaves the EU boundary. Detect the rejection programmatically via the HTTP 451 status, or via `code: "region_not_allowed"` on LLM responses. | ||
|
|
||
| <Tip> | ||
| The same check applies to every provider you list in the request — including `fallbacks` and any provider you pass via `model`. A single non-EU entry in the list will reject the whole call. | ||
| </Tip> | ||
|
|
||
| ## Behavior notes | ||
|
|
||
| - **Caching is region-scoped.** Cached responses on the global endpoint and the EU endpoint never share state. | ||
| - **Sandbox works the same way.** Calls authenticated with `sandbox_api_token` honor the same regional filtering — point your sandbox traffic at `api.eu.edenai.run` to mirror the production routing. | ||
| - **Fallback respects the region.** When a fallback list is provided, every entry must be EU-eligible. Non-EU fallbacks trigger a 451 the same way a non-EU primary does. | ||
| - **No silent downgrade.** There is no automatic re-route from the EU endpoint to the global endpoint. If no EU-eligible provider exists for your request, the call fails — it does not leak out of the region. | ||
|
|
||
| ## Next Steps | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="LLM Models" icon="brain" href="/v3/llms/listing-models"> | ||
| Browse available LLM models and their regions | ||
| </Card> | ||
| <Card title="Expert Model Providers" icon="microchip" href="/v3/expert-models/listing-models"> | ||
| Discover providers per feature in the EU | ||
| </Card> | ||
| <Card title="Servers Location" icon="location-dot" href="/v3/data-governance/servers-location"> | ||
| Where Eden AI and its providers host data | ||
| </Card> | ||
| <Card title="Data Retention" icon="clock-rotate-left" href="/v3/data-governance/data-retention"> | ||
| How long Eden AI keeps your data | ||
| </Card> | ||
| </CardGroup> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.