Skip to content

API Reference

Authentication

POST /api/v1/auths/signin

Sign in and receive a JWT Token.

Request:

{
  "email": "user@company.com",
  "password": "your-password"
}

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "id": "user-uuid",
  "email": "user@company.com",
  "name": "John IT",
  "role": "user"
}

Chat

POST /api/v1/chat/completions

Send a message and receive an AI response.

Headers:

Authorization: Bearer <token>
Content-Type: application/json

Request:

{
  "model": "models/gemini-2.5-flash",
  "messages": [
    {"role": "user", "content": "Hello"}
  ]
}

Knowledge

GET /api/v1/knowledge

List all Knowledge Bases.

POST /api/v1/knowledge/create

Create a new Knowledge Base.

POST /api/v1/knowledge/{id}/file/add

Add a file to a Knowledge Base.

Users & Groups

GET /api/v1/users

List all users (Admin only).

POST /api/v1/users/add

Add a new user (Admin only).

GET /api/v1/groups

List all groups.

POST /api/v1/groups/create

Create a new group.

Usage

GET /api/v1/users/usage

Get the current user's token usage statistics, broken down by model with input and output tokens tracked separately.