Endpoints Overview
All available API endpoints at a glance.
Every endpoint below lives under your base URL, so /v1/chat/completions means https://api.tarqaai.com/api/v1/chat/completions. All of them need an API key.
Base URL
In production that's https://api.tarqaai.com, e.g. https://api.tarqaai.com/v1/chat/completions. For local development it's http://localhost:3001/api (different host and an /api prefix; everything else is identical).
Chat & inference
POST
/v1/chat/completionsThe main endpoint. OpenAI-compatible chat: system messages, multi-turn, streaming and tool calling. See Chat API.
POST
/v1/ask?model=model_nameA minimal single-turn endpoint: one question in, one answer out.
GET
/v1/modelsThe authoritative list of model IDs you can pass as
model. Read IDs from here instead of hard-coding them, since examples in these docs can lag behind.RAG (your own documents)
POST
/v1/context/conversations/createCreate a RAG conversation, the container for a knowledge base.
POST
/v1/rag/indexIndex documents so they can be searched.
POST
/v1/rag/searchSemantic search across indexed documents, with relevance scores.
POST
/v1/rag/chatChat with the AI using your indexed documents as context.
GET
/v1/rag/stats/:conversationIdIndex statistics for a conversation.
API keys & analytics
GET
/v1/keysList the API keys in the current workspace. Add
?teamId=<id> for a team workspace; leave it out 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, leave out for a personal key). The key itself is returned once.DELETE
/v1/keys/:idRevoke a key. Takes effect within about 5 minutes.
GET
/v1/keys/:id/analyticsReal-time analytics for one key. See API Key Analytics.
Webhooks
GET
/v1/webhooksList your webhook endpoints.
POST
/v1/webhooksPOST
/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 monitors and load-balancer probes.