Melious API
OpenAI-compatible API for open-source AI inference with multi-provider routing and environmental tracking
Melious API
Welcome to the Melious API documentation. Melious provides a drop-in replacement for the OpenAI API using open-source models, with multi-provider routing, environmental impact tracking, and European data residency.
Why Melious?
OpenAI Compatible
Drop-in replacement for OpenAI SDK. Switch with one line of code.
Multi-Provider Routing
Automatic failover and intelligent routing across 5 European providers.
Environmental Tracking
Real-time CO2, water, and energy consumption metrics per request.
40+ Open-Source Models
Access Llama, Qwen, Mistral, DeepSeek, and more from one API.
Quick Start
Getting Started
Make your first API call in under 5 minutes.
Inference API
Chat completions, embeddings, images, and speech-to-text.
Tools API
Web search, URL scraping, and MCP integrations.
Base URL
https://api.melious.aiAll API endpoints are served over HTTPS.
OpenAI SDK Users: Set base_url="https://api.melious.ai/v1" and you're ready to go!
Authentication
Authenticate using an API key in the Authorization header:
Authorization: Bearer sk-mel-your-api-key-hereCreate and manage API keys at melious.ai/account/api/keys.
OpenAI SDK Compatibility
Melious is fully compatible with the official OpenAI SDKs:
from openai import OpenAI
client = OpenAI(
api_key="sk-mel-your-api-key-here",
base_url="https://api.melious.ai/v1"
)
response = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "Hello!"}]
)API Endpoints
Inference (OpenAI-Compatible)
| Endpoint | Description |
|---|---|
POST /v1/chat/completions | Chat completions with vision and function calling |
POST /v1/embeddings | Generate vector embeddings |
POST /v1/images/generations | Generate images from text |
POST /v1/audio/transcriptions | Speech-to-text transcription |
GET /v1/models | List available models |
Tools
| Endpoint | Description |
|---|---|
GET /v1/tools | List available tools |
POST /v1/tools/{slug}/execute | Execute a tool |
GET /v1/tools/{slug}/schema | Get tool parameters schema |
Unique Features
Multi-Provider Routing
Optimize for different priorities with routing presets:
{
"model": "gpt-oss-120b",
"messages": [...],
"preset": "environment"
}| Preset | Description |
|---|---|
balanced | Default, optimize all metrics |
speed | Lowest latency |
price | Lowest cost |
quality | Highest quality |
environment | Lowest carbon footprint |
Environmental Impact Tracking
Every response includes environmental metrics:
{
"environment_impact": {
"carbon_g_co2": 0.06,
"water_liters": 0.0002,
"energy_kwh": 0.00015,
"renewable_percent": 85,
"pue": 1.18
}
}Provider Filtering
Restrict requests to specific regions:
{
"filters": {
"countries": ["NL", "FR", "DE"],
"max_carbon_intensity": 200
}
}Available Models
| Category | Popular Models |
|---|---|
| Chat | gpt-oss-120b, qwen3-235b-a22b-instruct, deepseek-r1-0528 |
| Vision | mistral-small-3.2-24b-instruct, gemma-3-27b |
| Coding | kimi-k2-thinking, qwen3-coder-480b-a35b-instruct |
| Reasoning | kimi-k2-thinking, deepseek-r1-0528 |
| Role-playing | hermes-4-70b, kimi-k2-instruct |
| Embeddings | qwen3-embedding-8b, bge-m3 |
| Images | flux-schnell, flux-dev |
| Speech-to-Text | whisper-large-v3, whisper-large-v3-turbo |
Privacy-first: All models are open-source and self-hosted on European infrastructure. Your data is never sent to OpenAI, Anthropic, or Google.
Rate Limits
| Tier | Requests/Minute | Requests/Day |
|---|---|---|
| Free | 60 | 5,000 |
| Pro | 300 | 50,000 |
| Enterprise | Custom | Custom |
Support
- API Keys: melious.ai/account/api/keys
- Settings: melious.ai/account/settings/data
- Email: support@melious.ai
Ready? Check out the Getting Started Guide to make your first API call.