Melious
API Reference

API reference

Every Melious endpoint, grouped by API shape.

Two API shapes, one base URL, one API key. The OpenAI-compatible endpoints live under /v1/… with the shapes you'd expect from the OpenAI SDK. The Anthropic-compatible endpoints — /v1/messages and /v1/messages/count_tokens — accept the shapes the Anthropic SDK sends.

Base URL

https://api.melious.ai

Send either Authorization: Bearer <KEY> or x-api-key: <KEY> — both work on every endpoint. See Authentication.

Endpoints

OpenAI-compatible

MethodPathWhat it does
POST/v1/chat/completionsChat, with tools, vision, structured output, streaming
POST/v1/embeddingsVector embeddings from text
POST/v1/rerankReorder documents by relevance to a query
POST/v1/images/generationsGenerate images from text
POST/v1/audio/speechText to speech
POST/v1/audio/transcriptionsSpeech to text
GET/v1/modelsList models
GET/v1/models/{id}Retrieve one model

Anthropic-compatible

MethodPathWhat it does
POST/v1/messagesChat in the Messages API shape
POST/v1/messages/count_tokensPreflight token count

Batch

MethodPathWhat it does
POST/v1/batchesCreate an asynchronous batch job
GET/v1/batchesList batches
GET/v1/batches/{id}Retrieve a batch
POST/v1/batches/{id}/cancelCancel a batch
POST/v1/filesUpload a batch input file
GET/v1/filesList uploaded files
GET/v1/files/{id}Retrieve file metadata
GET/v1/files/{id}/contentDownload raw file content
DELETE/v1/files/{id}Delete a file

Tools and MCP endpoints (/v1/tools, /v1/mcp, /v1/documents/convert) have their own section — see Tools.

Every response carries

Two Melious-specific objects ride on every inference response alongside the OpenAI/Anthropic shape:

{
  "environment_impact": {
    "energy_kwh": 0.00015,
    "carbon_g_co2": 0.06,
    "water_liters": 0.0002,
    "renewable_percent": 85,
    "pue": 1.18,
    "provider_id": "ovhcloud",
    "location": "FR"
  },
  "billing_cost": {
    "energy": "0.0008",
    "credits": "0.0",
    "paid_with": "energy"
  }
}

OpenAI and Anthropic SDKs ignore unknown fields, so nothing breaks — but the data is there when you want it. See Environmental impact and Pricing.

Errors

All error responses use the same shape:

{
  "error": {
    "code": "INFERENCE_3207",
    "message": "Input exceeds the model's context window",
    "details": { "context_length": 131072, "input_tokens": 164228 }
  }
}

Match on code — it's stable. Full list in Errors.

On this page