Ask Sage API

Ask Sage API

Comprehensive guide to Ask Sage API endpoints


📑 Table of contents
  1. Overview
  2. User API Endpoints
    1. Documentation
    2. Available Endpoints
  3. Server API Endpoints
    1. Documentation
    2. Available Endpoints

Overview

The Ask Sage API is a modern RESTful API providing comprehensive access to the Ask Sage platform. Our API architecture is divided into two specialized components, each designed for specific functionalities. There are the Server API and the User API. Each API has its own base URL, purpose, and set of endpoints.

The Server API focuses on core AI operations, model queries, and server management, while the User API handles user management, authentication, and dataset operations. This separation ensures optimized performance and security for different types of interactions with the Ask Sage platform.


User API Endpoints

Purpose: User management, authentication, and dataset operations

Base URL: api.asksage.ai/user/

Documentation

📖 Swagger Documentation:

View User API Documentation →

Available Endpoints

Endpoint Description
POST /get-token-with-api-key Get an access token with API Key and email
POST /get-user-logins Get your last logins (limited to 5 by default)
POST /get-user-logs Get your last prompts
POST /add-dataset Add a new dataset
POST /delete-datasets Delete a dataset
POST /get-chats Get all chat sessions for user
POST /get-chat-session Get specific chat session
POST /delete-chat-session Delete chat session
POST /deassign-dataset Remove dataset from user
POST /update-permission-dataset Update dataset permissions
POST /get-datasets-with-permissions Get user datasets with permissions
POST /get-user-api-keys Get user API keys
POST /user-api-key Create new API key
DELETE /user-api-key Delete API key

Server API Endpoints

Purpose: Core AI operations, model queries, and server management

Base URL: api.asksage.ai/server/

Documentation

📖 Swagger Documentation:

View Server API Documentation →

Available Endpoints

Endpoint Description
POST /get-models Returns a list of available models
POST /query Main endpoint for generating completions
POST /query_with_file Query with file for generating completions
POST /query-plugin Query with plugin for generating completions
POST /execute-plugin Execute a plugin with provided content
POST /follow_up_questions Generate follow-up questions
POST /tokenizer Get tokens of string value
POST /get-personas Get available personas
POST /get-datasets Returns a list of available datasets
POST /get-plugins Returns a list of available plugins
POST /train Train the model based on user input
POST /file Convert supported file to plain text
POST /execute-plugin-with-file Execute plugin with file input
POST /get-deep-agent Get streaming updates from deep agent
POST /add-mcp-server Add new MCP server for user
PUT /update-mcp-server Update existing MCP server configuration
GET /list-mcp-servers Get list of all MCP servers for user
POST /list-mcp-servers Get list of all MCP servers for user
GET /list-mcp-whitelisted-servers Get list of whitelisted MCP servers
GET /list-mcp-tools Get list of available MCP tools
DELETE /delete-mcp-server Soft delete MCP server
DELETE /dataset Delete specific dataset
POST /delete-filename-from-dataset Remove specific file from dataset
POST /get-all-files-ingested Returns list of all ingested files
POST /copy-files-dataset Copy files from one dataset to another
POST /vote-down Mark response as unhelpful or incorrect
GET /count-monthly-tokens Returns count of tokens used this month
POST /count-monthly-tokens Returns token count for specific app
GET /count-monthly-teach-tokens Returns training tokens used this month
POST /train-with-file Train model using file content
POST /train-with-array Train model using array of content
GET /get-secrets Returns list of stored secrets (keys only)
POST /get-text-to-speech Generate audio from text using TTS

⚠️ Important Note

Base URLs may vary depending on your environment. For assistance, please contact us at support@asksage.ai


Table of contents


Back to top

Copyright © 2025 Ask Sage Inc. All Rights Reserved.