Get started
Miriel turns every kind of data into one memory that people and AI agents can ask questions of, with sources cited. Two calls carry the whole platform: learn() puts anything in, query() gets an answer out. This page takes you from an API key to a first cited answer in about five minutes, then points you at the surface that fits what you are building.
Everything below talks to the same account and the same memory, so you can mix them: learn from a script, query from Claude, and watch it all in the workspace.
Prefer not to write code at all? The Miriel workspace is the same platform as an app: chat with cited answers, connected sources, and apps built by describing them.
Five steps, each with curl, Python and JavaScript. Pick a language once and every example on the site follows.
In the workspace, open Settings → Developers. Your key is a UUID; Reveal or Copy it from the API keys card. Export it, along with the API origin, so the examples below run as written:
export MIRIEL_API_KEY="00000000-0000-0000-0000-000000000000" # yours, from Settings → Developers
export MIRIEL_API="https://api.miriel.ai"The REST API needs nothing but an HTTP client. If you would rather call functions, install one of the official libraries:
# nothing to install — every example has a curl tab
curl -s "$MIRIEL_API/api/v2/health" # no auth neededlearn takes inline text, URLs (pages are crawled to recursion_depth, git repos and RTSP streams are recognized) and files. Every item lands in one or more projects — default if you do not say.
curl -s -X POST "$MIRIEL_API/api/v2/learn" \
-H "x-access-token: $MIRIEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project": ["default"],
"input": [
{"value": "Our pricing decision: usage-based, with a free tier up to 1,000 queries a month."},
{"value": "https://miriel.ai/docs"}
]
}'The response carries job_ids. Ingestion is asynchronous: short text is searchable within seconds, a long video or a large crawl takes longer.
In an interactive app you rarely need to wait. In a script that learns and immediately queries, poll the jobs you just created:
curl -s -X POST "$MIRIEL_API/api/v2/get_job_status" \
-H "x-access-token: $MIRIEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"job_ids": ["<job-id>"]}'
# → {"jobs": {"<job-id>": "completed"}}curl -s -X POST "$MIRIEL_API/api/v2/query/" \
-H "x-access-token: $MIRIEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What did we decide about pricing?",
"project": ["default"],
"num_results": 5
}'You get back an LLM answer synthesized from your data (results.llm_result) and the ranked passages it was built from (results.vector_db_results), each with its source. Leave project out to search every project; pass a list, or "*", to be explicit.
{
"results": {
"query_id": "…", // stored — fetch it again with GET /api/v2/query/<query_id>
"status": "complete",
"llm_result": "We chose usage-based pricing with a free tier of 1,000 queries a month.",
"vector_db_results": [ /* ranked passages with source and metadata */ ],
"timings": { /* per-stage timings */ }
// …graph results, token counts, conversation_history when conversation_mode is on
}
}| Concept | What it is |
|---|---|
| Resource | One thing Miriel has learned — a document, page, message, recording, file. It is chunked, embedded, and its entities are extracted into the knowledge graph. |
| Project | A namespace for resources, and the scope of a query. The workspace calls these tags. "*" means all of them. |
| Job | The asynchronous work behind a learn call. Poll it, cancel it, or read its stage-by-stage timeline. |
| Query | A question plus retrieval (vector + graph) plus an optional LLM answer. Every query is stored and can be fetched, re-formatted or published later. |
| Metadata | Your own key/values on a resource — filter on them at query time with metadata_query. |
| Knowledge graph | Entities and relationships extracted during ingest. It contributes to answers and can be walked directly. |
| Source | A connected provider (Google Drive, Slack, GitHub, …) that backfills history and keeps syncing, so you never re-learn by hand. |
| MCP server | A hosted endpoint that exposes your memory as tools to AI assistants. |
What happens to your data
- Everything travels over TLS; vectors and their metadata are encrypted before they enter the index, and search runs against the encrypted index.
- Access is managed per credential — the API key, per-resource grants (
grant_ids) and project scoping decide what a caller can read. - Removing a resource (
/api/v2/remove_resource) removes it from retrieval; the workspace's Danger zone can forget everything.
If an assistant is writing your integration, give it the reference instead of letting it guess:
- llms-miriel.md — the whole API condensed into one file. Drop it into
CLAUDE.md, a Cursor rule, or project knowledge. It is also served, unauthenticated, atGET https://api.miriel.ai/api/v2/developer/docs/llms-miriel. - Connect the assistant over MCP: its
miriel_capabilitiestool answers "how do I…?" questions from Miriel's own documentation, with no LLM in the loop. - The full developer docs are listed, as raw Markdown, at
GET https://api.miriel.ai/api/v2/developer/docs— no key required.