An organization model starts from a platform model and adds a system prompt, starter suggestions, knowledge bases and an avatar. Members pick it like any other model. An instruction per model, on the other hand, is added to every conversation of the members who use that base model.
All routes are under https://. Scopes: rules:read to read, rules:write to write. Creating, updating or restoring a model, and setting an instruction, require a managed organization: otherwise 409 .
Model catalogLink to the Model catalog section
GET / · rules:read
The public platform models that a rule can allow, sorted by name.
{
"items": [
{ "id": "anthropic/claude-haiku-4.5", "name": "Claude Haiku 4.5", "owned_by": "openai", "eu_hosted": false, "capabilities": { "vision": true, "file_upload": true, "web_search": true } },
{ "id": "mistralai/mistral-large-2512", "name": "Mistral Large 3", "owned_by": "openai", "eu_hosted": true, "capabilities": null }
],
"total": 2
}owned_by gives the type of connection that serves the model, not its publisher. eu_hosted says whether the model counts as hosted in the European Union for the models.eu_only rule. 503 : the model list is temporarily unavailable.
The organization model objectLink to the The organization model object section
{
"id": "6f1c2e8a-3b4d-4f5a-9e7c-1d2b3a4c5e6f",
"model_id": "orgm-6f1c2e8a3b4d4f5a",
"name": "Assistant RH",
"description": "Répond aux questions du personnel sur les congés.",
"base_model_id": "mistralai/mistral-large-2512",
"base_model_name": "Mistral Large 3",
"base_status": "ok",
"avatar": { "character": "chic", "background": "moon" },
"avatar_image": "/api/v1/agents/avatar/chic/moon?v=1",
"sharing": { "all": false, "group_ids": ["<group id>"], "role_keys": ["manager"], "label_ids": [] },
"archived": false,
"has_prompt": true,
"prompt_length": 1840,
"starters_count": 3,
"knowledge_count": 1,
"created_by": "0d9a2f44-1c3b-4e7a-8b6f-55e2c1d0a9b8",
"created_at": 1762339200,
"updated_at": 1762425600
}| Field | Description |
|---|---|
model_id | The ID members choose. |
base_status | ok, unavailable (the base model is no longer offered), not_allowed (the rules refuse it) or null. |
sharing | Who can use it, in addition to the owner and the admins. |
Reading, creating and updating a model also return system_prompt, starters, knowledge (id, name, missing) and capabilities.
List modelsLink to the List models section
GET / · rules:read
| Parameter | Description |
|---|---|
status | active (default), archived or all. |
q | Part of the name. |
page, limit | Pagination. |
The response also includes max_models (200), managed and limits (allowed lengths).
Create a modelLink to the Create a model section
POST / · rules:write
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1 to 80 characters, unique among active models. |
base_model_id | string | yes | A platform model that the rules allow. |
description | string | no | Up to 1,000 characters. |
system_prompt | string | no | Up to 20,000 characters. |
starters | list | no | Starter suggestions: the first 6 are kept, 200 characters each. |
knowledge | list | no | Up to 20 knowledge bases, from the workspace or shared with it. |
capabilities | object | no | vision, file_upload, web_search, image_generation, code_interpreter, citations, usage: true or false. |
avatar | object | no | character and background, two names of avatar illustrations. |
sharing | object | no | all (everyone), group_ids (up to 200), role_keys (up to 50), label_ids (up to 200). |
curl https://chat.realmoon.ai/api/v1/orgs/$ORG_ID/models/custom \
-H "Authorization: Bearer $MOONAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: modele-assistant-rh" \
-d '{
"name": "Assistant RH",
"base_model_id": "mistralai/mistral-large-2512",
"system_prompt": "Tu réponds aux questions du personnel sur les congés, avec le règlement intérieur.",
"starters": ["Combien de jours de congés me reste-t-il ?"],
"sharing": {"all": true}
}'import os
import requests
r = requests.post(
f"https://chat.realmoon.ai/api/v1/orgs/{os.environ['ORG_ID']}/models/custom",
headers={
"Authorization": f"Bearer {os.environ['MOONAI_ADMIN_KEY']}",
"Idempotency-Key": "modele-assistant-rh",
},
json={
"name": "Assistant RH",
"base_model_id": "mistralai/mistral-large-2512",
"system_prompt": "Tu réponds aux questions du personnel sur les congés, avec le règlement intérieur.",
"starters": ["Combien de jours de congés me reste-t-il ?"],
"sharing": {"all": True},
},
timeout=30,
)
r.raise_for_status()
print(r.json()["model_id"])const r = await fetch(`https://chat.realmoon.ai/api/v1/orgs/${process.env.ORG_ID}/models/custom`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MOONAI_ADMIN_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'modele-assistant-rh',
},
body: JSON.stringify({
name: 'Assistant RH',
base_model_id: 'mistralai/mistral-large-2512',
system_prompt: 'Tu réponds aux questions du personnel sur les congés, avec le règlement intérieur.',
starters: ['Combien de jours de congés me reste-t-il ?'],
sharing: { all: true },
}),
});
if (!r.ok) throw new Error(await r.text());
console.log((await r.json()).model_id);| Status | code | Cause |
|---|---|---|
| 400 | invalid_request | Empty name, base model unavailable or refused by the rules, more than 200 models, unknown avatar, invalid role or ID. |
| 403 | forbidden | Knowledge base not shared with the workspace. |
| 404 | not_found | Knowledge base, group, role or label not found. |
| 409 | invalid_request | An organization model already has this name. |
| 409 | org_not_managed | The organization is not managed. |
GET / (rules:read) lists the knowledge bases you can attach: {"items": , up to 200.
Read, update, archive, deleteLink to the Read, update, archive, delete section
| Method and path | Scope | Purpose |
|---|---|---|
GET / | rules:read | The model, including its system prompt. |
PATCH / | rules:write | Update the fields you send. null clears description, system_prompt, capabilities and avatar. |
POST / | rules:write | Archive: members no longer see it. |
POST / | rules:write | Restore an archived model (409 if an active model has the same name). |
DELETE / | rules:write | Delete permanently; returns {"ok": true}. |
Per-model instructionsLink to the Per-model instructions section
An instruction is added to the conversations of the members who use that base model, whichever organization model uses it.
GET / · rules:read
{
"items": [{ "base_model_id": "anthropic/claude-haiku-4.5", "base_model_name": "Claude Haiku 4.5", "text": "Ne rédigez jamais de contrat.", "length": 29, "updated_by": "0d9a2f44-1c3b-4e7a-8b6f-55e2c1d0a9b8", "updated_at": 1762339200, "available": true }],
"total": 1,
"max_models": 200,
"text_max": 8000,
"managed": true
}PUT / · rules:write
| Field | Type | Required | Description |
|---|---|---|---|
base_model_id | string | yes | The base model. |
text | string | no | Up to 8,000 characters; empty removes the instruction. |
With a text, the response is the instruction; without one, {"ok": (or false if there was none). Up to 200 models can have an instruction.
DELETE / · rules:write
Returns {"ok": true}, or 404 if there was no instruction.
See alsoLink to the See also section
- Rules
- Models and resources, in the admin console
- Resources