DocsOpen Moon AI
Browse the docs

Organization models

List the models your rules allow, create organization models with a system prompt and knowledge bases, and set instructions per base model.

On this page

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://chat.realmoon.ai/api/v1/orgs/{org_id}. 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 org_not_managed.

Model catalogLink to the Model catalog section

GET /models/catalog · rules:read

The public platform models that a rule can allow, sorted by name.

JSON
{
  "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 models_unavailable: the model list is temporarily unavailable.

The organization model objectLink to the The organization model object section

JSON
{
  "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
}
FieldDescription
model_idThe ID members choose.
base_statusok, unavailable (the base model is no longer offered), not_allowed (the rules refuse it) or null.
sharingWho 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 /models/custom · rules:read

ParameterDescription
statusactive (default), archived or all.
qPart of the name.
page, limitPagination.

The response also includes max_models (200), managed and limits (allowed lengths).

Create a modelLink to the Create a model section

POST /models/custom · rules:write

FieldTypeRequiredDescription
namestringyes1 to 80 characters, unique among active models.
base_model_idstringyesA platform model that the rules allow.
descriptionstringnoUp to 1,000 characters.
system_promptstringnoUp to 20,000 characters.
starterslistnoStarter suggestions: the first 6 are kept, 200 characters each.
knowledgelistnoUp to 20 knowledge bases, from the workspace or shared with it.
capabilitiesobjectnovision, file_upload, web_search, image_generation, code_interpreter, citations, usage: true or false.
avatarobjectnocharacter and background, two names of avatar illustrations.
sharingobjectnoall (everyone), group_ids (up to 200), role_keys (up to 50), label_ids (up to 200).
cURL
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}
  }'
Python
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"])
JavaScript
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);
StatuscodeCause
400invalid_requestEmpty name, base model unavailable or refused by the rules, more than 200 models, unknown avatar, invalid role or ID.
403forbiddenKnowledge base not shared with the workspace.
404not_foundKnowledge base, group, role or label not found.
409invalid_requestAn organization model already has this name.
409org_not_managedThe organization is not managed.

GET /models/knowledge-candidates?q= (rules:read) lists the knowledge bases you can attach: {"items": [{"id", "name"}], "total"}, up to 200.

Read, update, archive, deleteLink to the Read, update, archive, delete section

Method and pathScopePurpose
GET /models/custom/{org_model_id}rules:readThe model, including its system prompt.
PATCH /models/custom/{org_model_id}rules:writeUpdate the fields you send. null clears description, system_prompt, capabilities and avatar.
POST /models/custom/{org_model_id}/archiverules:writeArchive: members no longer see it.
POST /models/custom/{org_model_id}/restorerules:writeRestore an archived model (409 if an active model has the same name).
DELETE /models/custom/{org_model_id}rules:writeDelete 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 /models/instructions · rules:read

JSON
{
  "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 /models/instructions · rules:write

FieldTypeRequiredDescription
base_model_idstringyesThe base model.
textstringnoUp to 8,000 characters; empty removes the instruction.

With a text, the response is the instruction; without one, {"ok": true, "removed": true} (or false if there was none). Up to 200 models can have an instruction.

DELETE /models/instructions?model_id=<id> · rules:write

Returns {"ok": true}, or 404 if there was no instruction.

See alsoLink to the See also section

Moon AI

Moon AI in action

0:00

Explore

Screenshots of chat.realmoon.ai taken on October 29, 2026, with fictional data.

Moon AI

Your preferences

Visits counted without cookies.

Our server counts visits without cookies or trackers. Your theme and your answer about ad measurement are remembered on this device.

Ad measurement

With your consent, our ad networks’ trackers (Google) measure our ads, from the visit to the sign-up and then to the first subscription and its amount, and may show you our ads. Your answer is valid for 13 months; you can change it here at any time.

No answer saved on this device.

After you decline, no tag is loaded anymore and the site deletes the cookies they had set on realmoon.ai. Those on the ad networks’ own domains are managed with them or in your browser.

The Moon AI app has its own privacy settings.