API Reference

Ask Sage API

Build custom applications with programmatic access to Ask Sage's powerful AI models

Ask Sage API
Table of Contents
  1. API Documentation
  2. Creating an API Key
  3. Getting Started

Instance-Specific Base URL: The endpoints and configuration shown reflect the instance at chat.asksage.ai. The api. prefix and path suffix stay the same across deployments — only the instance segment in the middle changes based on which Ask Sage instance you are logging into. Always use the instance approved by your organization and applicable regulatory requirements, and match the base URL in your configuration to the instance you authenticate against.


API Documentation


Creating an API Key

Generate Your API Key

Follow these steps to generate your API key:

  1. Navigate to Settings in the Ask Sage platform
  2. Switch to the API Keys tab
  3. Enter a name for your key and, under Access, keep Full access or pick one or more scopes to restrict what it can access
  4. Click + Create Key to generate your new API key

Restricting Access with Scopes

New keys start with Full access selected, which can call every Ask Sage API. Selecting one or more scope chips under Access limits the key to only the endpoints covered by those scopes. The line under the chips confirms what the key will be able to call:

API Keys tab with a key named open-webui and the Passthrough access chip selected, showing This key is limited to Passthrough
Scope Grants access to
query Core chat and completion endpoints, such as /query and /query_with_file
mcp MCP server management endpoints (add, list, update, delete)
passthrough Ask Sage’s OpenAI/Anthropic-compatible passthrough proxy, used when configuring Ask Sage as a custom model provider in third-party tools
agent_builder Triggering Agent Builder workflows programmatically via POST /execute-agent
Security Notice: Keep your API key secure and never share it publicly. Treat it like a password, rotate keys regularly, and prefer a scoped key over a full-access key whenever your integration only needs a subset of the API.
Inactive keys are retired: an API key that isn't used for 30 days is revoked automatically, and all of an account's keys are revoked if the account is deactivated for inactivity. You get email reminders 7 days and 1 day before a key is revoked. Exchanging a revoked, expired, or unknown key for a token (/get-token-with-api-key) returns "API key has been revoked or expired." See API Keys for details.

Getting Started


Back to top

Copyright © 2026 Ask Sage Inc. All Rights Reserved. Ask Sage is a BigBear.ai company.