The AI endpoints wrap Groq’sDocumentation 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.
llama-3.1-8b-instant model for content classification. Both endpoints accept a free-text description of any content (book, film, article, course, video, or video game) and return a structured node object alongside suggested relations to nodes that already exist in your library. The key difference between the two endpoints is persistence: classify is read-only and never writes to the database, while smart-add classifies and immediately persists both the node and any matched relations in a single call.
POST /api/ai/classify
Classify free text and receive a suggested node with relation recommendations — without writing anything to the database. Use this endpoint to preview what the AI would create before committing.Request body
Free-text description of the content to classify. The model extracts title, type, author, year, tags, and a short summary from this input. Maximum 10,000 characters.
If provided, the model is instructed to use exactly this node type instead of inferring it. Must be one of:
libro, pelicula, articulo, video, curso, videojuego.Response
Returns200 OK with a JSON object containing the classified node and suggested relations.
The AI-classified node structure.
Suggested directed edges to nodes that already exist in the library.
POST /api/ai/smart-add
Classify free text and immediately persist the resulting node and relations to the database in a single call. Relations are only created when the suggestedtargetTitle exactly matches an existing node’s title (case-insensitive comparison). Suggestions pointing to non-existent nodes are silently skipped.
Request body
Same asPOST /api/ai/classify:
Free-text description of the content to classify and save. Maximum 10,000 characters.
Optional node type override. One of:
libro, pelicula, articulo, video, curso, videojuego.Response
Returns201 Created with the persisted node and the relations that were successfully created.
The persisted node object written to the database, including its generated UUID,
createdAt, updatedAt, and all database fields (e.g., localFile). Note that tags is serialized as a JSON string (e.g., "[\"marxismo\",\"economía\"]") or null — not an array.Array of
CreatedRelation objects for each relation that was matched and written to the database.Error responses
| Status | Condition |
|---|---|
400 | text is missing, empty, or exceeds 10,000 characters |
500 | The Groq API returned an error or the model response could not be parsed as valid JSON |