sk-mel-<KEY> API key, and every inference response carries Meliai-specific fields for routing metadata, environmental impact, and billing cost alongside the standard response body.
Base URL
/v1) is part of each path.
API Shapes
OpenAI-Compatible Endpoints
Anthropic-Compatible Endpoints
Batch & Files Endpoints
Universal Response Fields
Every inference response — regardless of API shape — includes two Meliai-specific top-level objects alongside the standard payload. Useenvironment_impact to track the carbon and energy footprint of each call, and billing_cost to reconcile usage against your account balance.
object
Environmental footprint of the inference request.
object
Cost breakdown for this request.
Authentication
All requests require anAuthorization: Bearer sk-mel-<KEY> or x-api-key: sk-mel-<KEY> header. See the Authentication page for setup instructions, SDK examples, and key management.
Errors
All error responses share a consistent JSON shape keyed on a stablecode field. See the Errors page for the full list of HTTP status codes, named error codes, and a recommended retry strategy.