Endpoints Overview
All available API endpoints at a glance
Base URL
https://api.tarqaai.com — paths below are relative to it, e.g. https://api.tarqaai.com/v1/chat/completions. For local development the base is http://localhost:3001/api/v1 (host and /api prefix differ; the rest is identical).
Chat & Inference
POST
/v1/chat/completionsPrimaryOpenAI-compatible chat completions — supports system messages, multi-turn, streaming
POST
/v1/ask?model=model_nameSimple single-turn ask endpoint — minimal request format
GET
/v1/modelsThe authoritative list of model IDs you can pass as "model". Always resolve model IDs from here rather than hard-coding — examples in these docs may lag.
RAG System
POST
/v1/context/conversations/createCreate a RAG conversation (knowledge base container)
POST
/v1/rag/indexIndex documents into vector DB for semantic search
POST
/v1/rag/searchSemantic search across indexed documents with relevance scoring
POST
/v1/rag/chatChat with AI using indexed documents as context
GET
/v1/rag/stats/:conversationIdGet vector collection statistics for a conversation
API Keys & Analytics
GET
/v1/keysList API keys for the current workspace. Pass ?teamId=<id> for a team workspace; omit it for personal.
POST
/v1/keysCreate a key. Body: key_name (string), expires_in_days (number, optional), team_id (string, optional — binds the key to that team; omit for a personal key). The plaintext key is returned once.
DELETE
/v1/keys/:idRevoke an API key by ID — takes effect within ~5 minutes
GET
/v1/keys/:id/analyticsAnalyticsGet real-time analytics for a specific API key
Webhooks
GET
/v1/webhooksList configured webhook endpoints
POST
/v1/webhooksRegister a webhook. Body: name, url, events[]. Returns the signing secret once. See the Webhooks page.
POST
/v1/webhooks/:id/testSend a webhook.test delivery to the endpoint
GET
/v1/webhooks/:id/deliveriesRecent delivery attempts for a webhook
System
GET
/api/healthHealth check — for uptime monitoring and load balancer probes
