Skip to main content
Bifrost has no built-in Eden AI provider, and it adds /v1 to the base URL of an OpenAI-type provider, which Eden AI does not serve. This page adds Eden AI as a custom provider with the request paths set explicitly.

Overview

Bifrost is an open-source LLM gateway (Go) that adds routing, fallbacks, load balancing and governance across providers. Eden AI exposes an OpenAI-compatible /v3/chat/completions endpoint, so you add it as a Custom Provider with base_provider_type: openai and path overrides. There is no build and no fork: you route to models from OpenAI, Anthropic, Google, Mistral and more behind one key.

Prerequisites

  • Docker, or Node.js to run npx
  • An Eden AI API key from app.edenai.run

Setup

1. Write the config

Bifrost reads config.json from its app directory at startup, so create it first. With Docker the app directory is the folder you mount, so save it as data/config.json. With npx it is ~/.config/bifrost unless you pass -app-dir, as in the command below. The request_path_overrides matter: without them Bifrost calls https://api.edenai.run/v3/v1/chat/completions, which does not exist.

2. Export your key and start Bifrost

The config reads env.EDEN_AI_API_KEY from Bifrost’s environment. Export it, then start Bifrost. Docker needs -e EDEN_AI_API_KEY to pass it into the container:
You can also add the provider at runtime with POST /api/providers or from the Bifrost web UI under Model Providers, with no restart needed.

3. Send a request

Model naming

Call any Eden AI model through Bifrost as edenai/<provider>/<model>. The edenai/ prefix selects the Bifrost provider you configured, and the rest is Eden AI’s own provider/model id, sent unchanged. For example:
  • edenai/openai/gpt-latest
  • edenai/anthropic/claude-sonnet-latest
  • edenai/vertex/gemini-flash-latest
See List LLM Models for the catalog.

Routing and fallbacks

Fallbacks, retries and weighted key selection are Bifrost features, not Eden AI’s. See Bifrost’s retries and fallbacks and key management docs.
  • Fallbacks: pass a fallbacks array of provider/model strings in the request body. The fallback provider must be configured in Bifrost too. Fallbacks are tried in order if the first model fails.
  • Weighted keys: give a provider several entries in keys, each with a weight, and Bifrost picks among them by weight.
Eden AI has its own server-side fallbacks and routing, described in Provider routing. The two are independent.

Troubleshooting

404 Not Found from the provider

The request_path_overrides are missing. Bifrost then calls /v3/v1/chat/completions. Add the overrides shown above.

The model goes to another provider

Keep the edenai/ prefix. A model id such as openai/gpt-latest without it is routed to Bifrost’s own openai provider, not to Eden AI.

Next Steps