The Mesa de Ayuda IA FastAPI backend exposes a versioned REST API underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/geremyjampiersalasgarcia-eng/Caso_Practico_Semillero_IA/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1. Every request and response body uses JSON. You can explore and test all endpoints interactively through the Swagger UI automatically generated by FastAPI at http://localhost:8000/docs. The API requires no authentication in the current development configuration — simply send well-formed JSON requests to the relevant path.
Base URL
http://127.0.0.1:8000/api/v1 as its API_BASE_URL constant (see frontend/lib/api.ts).
Content Type
AllPOST requests must include the following HTTP header:
GET and DELETE requests do not require a body or content-type header.
Endpoint Summary
| Method | Path | Description |
|---|---|---|
POST | /chat/ | Send a question to the LangGraph multi-agent orchestrator |
GET | /conversations/ | List recent conversation sessions |
GET | /conversations/{conversation_id} | Retrieve full message history for a conversation |
DELETE | /conversations/{conversation_id} | Permanently delete a conversation and its messages |
GET | /health/ | Service health check (database and LLM connectivity) |
POST | /documents/ingest | Trigger background document ingestion into a ChromaDB collection |
GET | /metrics/costs | Aggregated Gemini token cost metrics, grouped by intent |
Error Responses
FastAPI returns structured error responses for all failure cases. The most common HTTP error codes you will encounter are:| Status | Meaning |
|---|---|
400 Bad Request | Invalid input — e.g., question exceeds 2 000 characters or matches an injection pattern, or the target ingestion directory does not exist |
404 Not Found | The requested resource (conversation, document) does not exist |
422 Unprocessable Entity | Request body failed Pydantic schema validation (missing required fields, wrong type, etc.) |
500 Internal Server Error | Unexpected server-side error |
422) from FastAPI looks like this:
400) looks like this:
404) looks like this:
Endpoint Pages
POST /chat
Send a natural language question — with optional image and confirmation flag — to the multi-agent orchestrator.
GET/DELETE /conversations
List, retrieve, and delete conversation sessions stored in PostgreSQL.
POST /documents/ingest
Trigger background document ingestion into a named ChromaDB collection.
GET /metrics/costs
Retrieve Gemini API cost metrics aggregated by intent over a configurable time window.
GET /health
Check the connectivity status of PostgreSQL and the Gemini LLM client.
Swagger UI
Interactive API explorer automatically generated by FastAPI.
The Swagger UI at http://localhost:8000/docs lets you send real requests directly from the browser. It reflects the exact Pydantic schemas used in production and is the fastest way to explore request/response shapes without writing any code.