Skip to main content
Use Eden AI with Haystack (deepset) to build LLM and RAG pipelines on 500+ AI models through one EU-hosted API key.

Overview

Haystack is deepset’s open-source Python framework for building production LLM applications, RAG pipelines and agents. Eden AI ships as an official Haystack integration (the edenai-haystack package), so your pipelines reach models from OpenAI, Anthropic, Google, Mistral and 500+ more behind one key, with EU-based, GDPR-aligned inference. The integration provides three components:
  • EdenAIChatGenerator for chat completion
  • EdenAITextEmbedder to embed a query string
  • EdenAIDocumentEmbedder to embed documents for indexing
Models use Eden AI’s provider/model naming convention, for example anthropic/claude-sonnet-4-5 or mistral/mistral-large-latest.

Installation

Quick Start

Set your key, then generate a chat response with the EdenAIChatGenerator:
The generator reads your key from the EDENAI_API_KEY environment variable by default.

Switching models

Change providers by changing the model string. Every Eden AI model is reachable the same way:

Streaming

Pass a streaming_callback to stream tokens as they are generated:

Embeddings and RAG

Use EdenAITextEmbedder to embed a query and EdenAIDocumentEmbedder to embed documents, so you can build a fully sovereign RAG stack (retrieval and generation) on EU-hosted models:

Available Models

Use the provider/model format for any Eden AI model: Chat
  • openai/gpt-4o-mini
  • anthropic/claude-sonnet-4-5
  • mistral/mistral-large-latest
  • google/gemini-2.5-flash
Embeddings
  • openai/text-embedding-3-small
  • mistral/mistral-embed
Browse the full list in the Eden AI models catalog.

Environment Variables

Next Steps