Smart Add is the fastest way to grow your knowledge graph. Describe a book, film, article, or any other content item in plain text and BaBel+ will classify it, extract structured metadata, and automatically connect it to semantically related nodes already in your graph — all in a single HTTP request. No form filling, no manual tagging, no relation wiring.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DrDigett/Babel/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request
Body parameters
Free-text description of the content you want to add. The server trims leading/trailing whitespace and enforces a hard maximum of 10 000 characters. Write naturally — the model handles the rest.
Optional node type override. Must be one of:
libro, pelicula, articulo, video, curso, videojuego. When provided, the model is explicitly instructed to use this type and will not attempt to infer it from the text. Mirrors the Auto / type selector dropdown in the QuickAdd UI component.Example request
Response
201 Created
Returns the persisted node and every relation that was successfully resolved against the database. Relation targets are matched case-insensitively against existing node titles; only matches that are actually found in the database appear in therelations array.
The fully persisted node record, including its generated UUID and timestamps.
Array of relation records inserted into the database. Empty if no existing nodes matched the model’s suggestions.
Example response
Error responses
| Status | Condition |
|---|---|
400 Bad Request | text is missing, empty, or not a string. Body: { "error": "text is required" } |
400 Bad Request | text exceeds 10 000 characters. Body: { "error": "text too long (max 10000)" } |
500 Internal Server Error | The Groq API call fails (network error, bad API key, rate limit). |
500 Internal Server Error | The model returns a response that cannot be parsed as valid JSON. |
typeHint behavior
WhentypeHint is provided the server prepends the following instruction to the model prompt before all other classification rules:
“IMPORTANTE: El usuario seleccionó manualmente el tipo <typeHint>. DEBES usar exactamente ese type, no intentes inferirlo.”
This hard override ensures the model respects your intent even when the text is ambiguous. For example, a short-form essay could be classified as either articulo or libro — passing typeHint: "articulo" resolves the ambiguity deterministically.
Idempotency
UI integration
TheQuickAdd React component in the client uses this endpoint directly. It renders a type selector (populated from the shared NODE_TYPES constant) and a free-text input. On submit it calls api.ai.smartAdd(text, typeHint), displays a terminal-style confirmation block with the created node title and the list of connected relations, and calls onAdded() to refresh the graph. If a listId prop is passed, the new node is also appended to that list automatically.
Access QuickAdd from the sidebar panel or the quick-add button on the graph canvas.