Models
GET /v1/models — list and retrieve available models with capabilities
The live catalog of models. Always dynamic — we don't keep a static list in these docs because it drifts the moment we add a model.
Auth: Bearer token or x-api-key. Requires scope inference.models. Responses are cached for 5 minutes — safe to poll.
List models
GET /v1/modelsReturns every model available to your key's plan. Add ?include_meta=true for Melious-specific capability metadata.
curl https://api.melious.ai/v1/models \
-H "Authorization: Bearer sk-mel-<YOUR_API_KEY>"{
"object": "list",
"data": [
{ "id": "glm-4.7", "object": "model", "created": 1699999999, "owned_by": "zai" },
{ "id": "deepseek-v3.2", "object": "model", "created": 1699999999, "owned_by": "deepseek" }
]
}curl "https://api.melious.ai/v1/models?include_meta=true" \
-H "Authorization: Bearer sk-mel-<YOUR_API_KEY>"{
"object": "list",
"data": [
{
"id": "glm-4.7",
"object": "model",
"created": 1699999999,
"owned_by": "zai",
"_meta": {
"type": "chat",
"input_modalities": ["text"],
"output_modalities": ["text"],
"capabilities": {
"streaming": true,
"function_calling": true,
"vision": false,
"structured_output": true,
"json_schema": true,
"reasoning": false
},
"context_length": 131072
}
}
]
}_meta.type
One of chat, embeddings, audio, image, rerank. Tells you which endpoint to hit.
_meta.capabilities
Boolean flags you can branch on when picking a model programmatically. Common keys: streaming, function_calling, vision, structured_output, json_schema, audio_input, reasoning. Absence of a key means "not applicable" for that model type (e.g. embedding models don't have vision).
_meta.context_length
Max context tokens for chat and embedding models. Absent for image/audio models. Exceeding it returns INFERENCE_3207.
Retrieve one model
GET /v1/models/{id}Returns a single model object in the same shape. include_meta=true works here too.
curl "https://api.melious.ai/v1/models/glm-4.7?include_meta=true" \
-H "Authorization: Bearer sk-mel-<YOUR_API_KEY>"Finding models programmatically
A common pattern: filter on capabilities before picking.
from openai import OpenAI
client = OpenAI(api_key="sk-mel-<YOUR_API_KEY>", base_url="https://api.melious.ai/v1")
# OpenAI SDK doesn't expose ?include_meta, so hit the raw endpoint
import httpx
models = httpx.get(
"https://api.melious.ai/v1/models",
params={"include_meta": "true"},
headers={"Authorization": "Bearer sk-mel-<YOUR_API_KEY>"},
).json()
# Pick the largest-context chat model that supports tools
candidates = [
m for m in models["data"]
if m["_meta"]["type"] == "chat"
and m["_meta"]["capabilities"].get("function_calling")
]
best = max(candidates, key=lambda m: m["_meta"]["context_length"])
print(best["id"], best["_meta"]["context_length"])Plan benefits affect what shows up. If your key's plan doesn't include advanced models, they won't appear in the list — no need to filter them out on your side.
What's not here
Pricing isn't in this response. Rates live on melious.ai/pricing and the hub. Every inference response includes the exact cost in billing_cost — that's the authoritative per-request figure.
Errors
INFERENCE_3001— unknown model ID on the single-retrieve endpoint.AUTH_1015— missinginference.modelsscope.
Related
Human-readable catalog: melious.ai/hub • Model stance and families: Models concept • Routing by capability: Routing.