Skip to content

Models

GET /v1/models is the source of truth for which model slugs you may name in a completion's settings.model, and what temperature / top_p ranges each one accepts. Call it once at startup and key any model-picker UI off the response.


GET /v1/models

Return the models available to you, sorted alphabetically by slug.

curl https://api.humx.ai/v1/models \
  -H "Authorization: ApiKey $COMPANIONS_API_KEY"
import os, requests

r = requests.get(
    "https://api.humx.ai/v1/models",
    headers={"Authorization": f"ApiKey {os.environ['COMPANIONS_API_KEY']}"},
)
r.raise_for_status()
data = r.json()
print("default:", data["default_model"])
for m in data["models"]:
    print(m["slug"], m["temperature_min"], "-", m["temperature_max"])
const res = await fetch("https://api.humx.ai/v1/models", {
  headers: { Authorization: `ApiKey ${process.env.COMPANIONS_API_KEY}` },
});
const { default_model, models } = await res.json();
console.log(default_model, models);
interface AllowedModel {
  slug: string;
  display_name: string;
  temperature_min: number;
  temperature_max: number;
  top_p_min: number;
  top_p_max: number;
}
interface ModelsResponse {
  default_model: string | null;
  models: AllowedModel[];
}

const res = await fetch("https://api.humx.ai/v1/models", {
  headers: { Authorization: `ApiKey ${process.env.COMPANIONS_API_KEY!}` },
});
const data = (await res.json()) as ModelsResponse;

Response

200

Field Type Description
default_model string The slug a completion runs on when no settings.model is set.
models array Every model you may select (see fields below).

Each entry in models:

Field Type Description
slug string The value to pass as settings.model.
display_name string Human-readable name for a picker UI.
temperature_min / temperature_max number Accepted temperature range.
top_p_min / top_p_max number Accepted top_p range.
{
  "default_model": "deepseek/deepseek-v4-pro",
  "models": [
    {
      "slug": "deepseek/deepseek-v4-pro",
      "display_name": "DeepSeek V4 Pro",
      "temperature_min": 0.0,
      "temperature_max": 1.5,
      "top_p_min": 0.5,
      "top_p_max": 1.0
    },
    {
      "slug": "moonshotai/kimi-k2.6",
      "display_name": "Kimi K2.6",
      "temperature_min": 0.0,
      "temperature_max": 1.5,
      "top_p_min": 0.5,
      "top_p_max": 1.0
    }
  ]
}

Prevalidate locally

The temperature_* / top_p_* bounds are the exact ranges the completion endpoint enforces. A client that checks against them before sending never round-trips a 422 on range.