Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@
"v3/integrations/openai-sdk-python",
"v3/integrations/openai-sdk-typescript",
"v3/integrations/langchain",
"v3/integrations/pydantic-ai"
"v3/integrations/pydantic-ai",
"v3/integrations/aisuite"
]
},
{
Expand Down
11 changes: 11 additions & 0 deletions integration-logo/aisuite-icondoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions v3/integrations/aisuite.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: "aisuite"
icon: "/integration-logo/aisuite-icondoc.svg"
description: "Use aisuite with Eden AI to call 500+ AI models through one unified, OpenAI-style interface."

Check warning on line 4 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L4

Did you really mean 'aisuite'?
---

import { TechArticleSchema } from "/snippets/TechArticleSchema.mdx";

<TechArticleSchema
title={"aisuite"}
description={"Use aisuite with Eden AI to call 500+ AI models through one unified, OpenAI-style interface."}

Check warning on line 11 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L11

Did you really mean 'aisuite'?
path="v3/integrations/aisuite"
articleSection="AI Frameworks"
about={"LLM Framework Integration"}
proficiencyLevel="Intermediate"
keywords={["Eden AI", "AI API", "aisuite", "Python", "Andrew Ng"]}

Check warning on line 16 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L16

Did you really mean 'aisuite'?
datePublished="2026-07-17T00:00:00Z"
dateModified="2026-07-17T00:00:00Z"
/>

Use aisuite with Eden AI to call 500+ AI models through one unified, OpenAI-style interface.

## Overview

[aisuite](https://github.com/andrewyng/aisuite) is a lightweight Python library (from Andrew Ng's team) that gives you a single, OpenAI-style Chat Completions interface across many providers — swap providers by changing one string. **Eden AI is a built-in aisuite provider**, so you reach models from OpenAI, Anthropic, Google, Mistral, Cohere, Meta and more behind one key, with EU-based, GDPR-aligned inference.

Check warning on line 25 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L25

Did you really mean 'aisuite'?

Check warning on line 25 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L25

Did you really mean 'Ng's'?

You select a model with the `provider:model_id` syntax. For Eden AI, the provider is `edenai` and the model id follows Eden AI's `provider/model` scheme — for example `edenai:anthropic/claude-sonnet-5`.

## Installation

Eden AI is OpenAI-compatible, so aisuite talks to it through the `openai` SDK — install both:

Check warning on line 31 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L31

Did you really mean 'aisuite'?

<CodeGroup>
```bash pip
pip install aisuite openai
```

```bash poetry
poetry add aisuite openai
```
</CodeGroup>

## Quick Start

Set your key, then point aisuite at Eden AI by prefixing any model with `edenai:`:

Check warning on line 45 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L45

Did you really mean 'aisuite'?

<CodeGroup>
```bash .env
EDENAI_API_KEY=your_api_key_here

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use standard token type placeholders.

As per coding guidelines, code examples must distinguish token types by using api_token for production keys (or sandbox_api_token for testing), rather than custom placeholders like your_api_key_here or YOUR_EDENAI_API_KEY.

  • v3/integrations/aisuite.mdx#L49-L49: Replace your_api_key_here with api_token.
  • v3/integrations/aisuite.mdx#L124-L124: Replace YOUR_EDENAI_API_KEY with api_token.
  • v3/integrations/aisuite.mdx#L138-L138: Replace your_api_key_here with api_token.
📍 Affects 1 file
  • v3/integrations/aisuite.mdx#L49-L49 (this comment)
  • v3/integrations/aisuite.mdx#L124-L124
  • v3/integrations/aisuite.mdx#L138-L138
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@v3/integrations/aisuite.mdx` at line 49, Replace the nonstandard token
placeholders in v3/integrations/aisuite.mdx at lines 49, 124, and 138: use
api_token for EDENAI_API_KEY in all three examples, including replacing both
your_api_key_here and YOUR_EDENAI_API_KEY.

Source: Coding guidelines

```

{/* skip-test */}
```python Python
import aisuite as ai

client = ai.Client()

response = client.chat.completions.create(
model="edenai:anthropic/claude-sonnet-5", # edenai:<provider>/<model>
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello! How are you?"},
],
)

print(response.choices[0].message.content)
```
</CodeGroup>

The `edenai` provider automatically uses the Eden AI base URL (`https://api.edenai.run/v3`) and reads your key from the `EDENAI_API_KEY` environment variable.

## Switching models

aisuite's core benefit: change providers by changing one string. Every Eden AI model is reachable the same way — no per-provider SDKs, no code changes:

Check warning on line 74 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L74

Did you really mean 'aisuite's'?

Check warning on line 74 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L74

Did you really mean 'SDKs'?

<CodeGroup>
{/* skip-test */}
```python Python
import aisuite as ai

client = ai.Client()
messages = [{"role": "user", "content": "Write a haiku about the sea."}]

for model in [
"edenai:openai/gpt-5.5",

Check warning on line 85 in v3/integrations/aisuite.mdx

View check run for this annotation

Mintlify / Mintlify Validation (edenai) - vale-spellcheck

v3/integrations/aisuite.mdx#L85

Did you really mean 'openai'?
"edenai:anthropic/claude-sonnet-5",
"edenai:mistral/mistral-large-2512",
]:
response = client.chat.completions.create(model=model, messages=messages)
print(model, "->", response.choices[0].message.content)
```
</CodeGroup>

## Available Models

Use the `edenai:<provider>/<model>` format for any Eden AI model:

**OpenAI**
- `edenai:openai/gpt-5.5`
- `edenai:openai/gpt-5-mini`

**Anthropic**
- `edenai:anthropic/claude-sonnet-5`
- `edenai:anthropic/claude-opus-4-8`
- `edenai:anthropic/claude-haiku-4-5`

**Google**
- `edenai:google/gemini-2.5-pro`
- `edenai:google/gemini-3.5-flash`

**Mistral**
- `edenai:mistral/mistral-large-2512`
- `edenai:mistral/mistral-small-2603`

## Passing configuration explicitly

Prefer not to use environment variables? Pass the key through the aisuite client config instead:

<CodeGroup>
{/* skip-test */}
```python Python
import aisuite as ai

client = ai.Client({"edenai": {"api_key": "YOUR_EDENAI_API_KEY"}})

response = client.chat.completions.create(
model="edenai:mistral/mistral-large-2512",
messages=[{"role": "user", "content": "Say hello in French."}],
)
print(response.choices[0].message.content)
```
</CodeGroup>

## Environment Variables

<CodeGroup>
```bash .env
EDENAI_API_KEY=your_api_key_here
```
</CodeGroup>

## Next Steps

- [Chat Completions](/v3/llms/chat-completions) - Core LLM endpoint
- [List LLM Models](/v3/llms/listing-models) - Browse available providers and models
- [OpenAI SDK (Python)](/v3/integrations/openai-sdk-python) - Direct SDK usage
Loading