Ask Elium Answer a question
Get an AI answer from your knowledge base through the API, with the stories and files it was built from.
Answer uses AI to answer a question from your knowledge base. The API exposes it on me, so you can build it into your own tools.
Ask a question and read the answer with its sources:
query askAnswer {
me {
answer {
answer(query: "What is a space in Elium?") {
text
sources {
... on Story {
slug
version {
title
}
}
... on AnswerAssetSource {
asset {
__typename
... on FileAsset {
filename
}
}
}
}
}
}
}
}
A source is either a Story or an AnswerAssetSource (a file attached to a story), so each type needs its own fragment.
The response:
{
"data": {
"me": {
"answer": {
"answer": {
"text": "<p>A <strong>space</strong> in Elium is a virtual place where content is shared, with different degrees of access and visibility set by the administrator. It groups content on similar themes and is the main place for sharing knowledge within the platform.</p>",
"sources": [
{
"slug": 26043,
"version": {
"title": "How to structure your Elium platform?"
}
},
{
"asset": {
"__typename": "FileAsset",
"filename": "product documentation export.pdf"
}
}
]
}
}
}
}
}
text is formatted text, in HTML or Markdown, so render it rather than printing it as it is. The lang argument sets the language of the answer. The model argument selects an AI model, with a value of the AiModel enum; only the models enabled on the platform are accepted.
A Smart Assistant answers from a chosen set of content, with its own instructions. To ask one a question instead, see Ask a Smart Assistant a question. To let an AI assistant such as ChatGPT or Claude query Elium directly, use MCP.