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
  4. Open Source Community

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, optionally, select one or more scopes to restrict what it can access
  4. Click + Create Key to generate your new API key

Restricting Access with Scopes

A key created with no scopes selected has full access to the Ask Sage API. Selecting one or more scopes limits the key to only the endpoints covered by those scopes:

Scopes dropdown open in the API Keys tab, showing agent_builder, mcp, passthrough, plugins, and query options
Scope Grants access to
query Core chat and completion endpoints, such as /query and /query_with_file
plugins Plugin discovery and execution endpoints, such as /get-plugins and /execute-plugin
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.

Getting Started


Open Source Community

Join Our GitHub Community

Explore code samples, tutorials, and community contributions. We welcome your feedback and contributions!

Ask Sage GitHub Repository
Stay Updated: The repository is continuously updated with new examples, best practices, and community resources. Star the repo to stay informed!

Back to top

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