Endpoints
Complete list of SnackPrompt AI Engine API endpoints.
Authentication
All requests require authentication via the x-api-key header:
x-api-key: YOUR_API_KEYTo get your API Key, see the authentication documentation.
Summary
/v1/kb/elemental
POST
Ingest data into Knowledge Base
/v1/kb/elemental/{id}
DELETE
Remove data by ID
/v1/kb/delete
POST
Remove data by filters
/v1/kb/search
POST
Semantic search
/v1/kb/chat
POST
Chat with complete response
/v1/kb/chat/stream
POST
Chat with SSE streaming
/health
GET
Basic health check
/health/detailed
GET
Detailed health check
Ingestion
Ingest Elemental
Ingests an elemental (table/document) into the Knowledge Base. Runs in background.
Request Body:
elemental_id
string
Yes
ID of elemental to ingest
trace_id
string
No
ID for tracking
Response: 202 Accepted
Example:
Removal
Remove by ID
Removes all data from a specific elemental.
URL Parameters:
elemental_id
string
ID of elemental to remove
Response: 200 OK
Example:
Remove by Filters
Removes data using specific filters.
Request Body:
Important: The
tenant_idis required.
Response: 200 OK
Example:
Search
Semantic Search
Performs semantic search on indexed data.
Request Body:
query
string
Yes
Search text
filters
object
Yes
Filters (tenant_id required)
limit
number
No
Maximum results (default: 10)
Response: 200 OK
Example:
Chat
Complete Chat
RAG chat that returns the complete response at once.
Request Body:
Response: 200 OK
Example:
Streaming Chat
RAG chat via Server-Sent Events (SSE) for real-time responses.
Request Body: Same as /v1/kb/chat
Response: text/event-stream
Events:
message
Content chunk
error
Error during streaming
[DONE]
End of stream
Response Headers:
Example:
Observability
Health Check
Checks if the service is running.
Response: 200 OK
Detailed Health Check
Checks service status and its dependencies.
Response: 200 OK
Common Errors
400
Bad Request
Missing tenant_id or invalid parameters
404
Not Found
Resource not found
500
Internal Error
Internal server error
For details, see Error Codes.
Last updated
Was this helpful?