API and developers

Integrate EasyRag into your applications

A documented REST API (OpenAPI), API keys, JSON responses with sources and real-time streaming.

curl -X POST https://api.example.com/api/v1/chatbots/3f2a…c91e/chat/complete \
  -H "Authorization: Bearer er_••••••••" \
  -H "Content-Type: application/json" \
  -d '{"message": "What is the withdrawal period?"}'

{
  "response": "You have 14 days… [1]",
  "sessionId": "…",
  "conversationId": "…",
  "sources": [{ "filename": "Terms-of-sale.pdf", "snippet": "…" }],
  "usage": { "totalTokens": … }
}
Sample API call (fictitious host, IDs and content; response structure matches the API).

The problem

Why it matters

An assistant often needs to be integrated into a business application, an existing portal or an automation pipeline, beyond the widget.

Technical teams need a stable, documented and secure interface.

In practice

  1. Create a keyAPI key prefixed with er_, stored as a hash, with optional expiration.
  2. Call the assistantA POST request returns the answer, the cited sources and token usage.
  3. ExploreInteractive OpenAPI documentation (Swagger) and a Postman collection.

Capabilities

What you can do

Each capability is shown with its actual availability.

  • Documented /api/v1 REST API (OpenAPI / Swagger)Available
  • Complete answer in a single call (chat/complete)Text or JSON answer, sources, session and conversation IDs, usage.Available
  • Streaming responses (Server-Sent Events)Available
  • API keys with expirationAvailable
  • Full management through the APIAssistants, knowledge bases, documents, tools… according to the key owner’s permissions.Available
  • n8n (template provided) and Power AutomateVia the API, configured in the automation tool.Requires setup
  • Make, ZapierNo native integration; possible through a generic HTTP call.Not available
  • Keys with restricted scopesUnder consideration

Benefits

What you gain

Integrates anywhere

Any application that can send an HTTP request can query an assistant.

Sources included

API responses carry their citations, for verifiable display.

Automatable

Assistant creation and configuration can be scripted for your deployments.

Requirements and limitations

Next step

Annotated request and response examples.