Ask Sage Usage API

Token usage tracking

Operations 5

GET /count-monthly-tokens Get monthly token usage #
POST /count-monthly-tokens Get monthly token usage #
GET /count-monthly-teach-tokens Get monthly teaching token usage #
POST /count-monthly-teach-tokens Get monthly teaching token usage #
POST /count-monthly-tokens-left-with-org Get remaining monthly tokens with organization #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ask-sage-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ask-sage-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ask Sage Server Usage API
  description: Ask Sage is an AI-powered platform providing intelligent completions, knowledge management, and workflow automation.
  version: '2.0'
  contact:
    name: Ask Sage Support
    email: support@asksage.ai
    url: https://asksage.ai
servers:
- url: '{baseUrl}/server'
  description: Ask Sage Server API
  variables:
    baseUrl:
      default: https://api.asksage.ai
      description: API base URL. Use https://api.asksage.ai for production, or your self-hosted instance URL.
security:
- ApiKeyAuth: []
tags:
- name: Usage
  description: Token usage tracking
paths:
  /count-monthly-tokens:
    get:
      summary: Get monthly token usage
      description: Returns the count of tokens used this month
      tags:
      - Usage
      responses:
        '200':
          description: Token count
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: integer
                  status:
                    type: integer
      operationId: getCountMonthlyTokens
      x-operation-id-source: derived
    post:
      summary: Get monthly token usage
      description: Returns the count of tokens used this month for specific app
      tags:
      - Usage
      responses:
        '200':
          description: Token count
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: integer
                  status:
                    type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                app_name:
                  type: string
                  default: asksage
                  description: Application name to filter token count
      operationId: postCountMonthlyTokens
      x-operation-id-source: derived
  /count-monthly-teach-tokens:
    get:
      summary: Get monthly teaching token usage
      description: Returns the count of teaching/training tokens used this month
      tags:
      - Usage
      responses:
        '200':
          description: Teaching token count
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: integer
                  status:
                    type: integer
      operationId: getCountMonthlyTeachTokens
      x-operation-id-source: derived
    post:
      summary: Get monthly teaching token usage
      description: Returns the count of teaching/training tokens used this month
      tags:
      - Usage
      responses:
        '200':
          description: Teaching token count
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: integer
                  status:
                    type: integer
      operationId: postCountMonthlyTeachTokens
      x-operation-id-source: derived
  /count-monthly-tokens-left-with-org:
    post:
      summary: Get remaining monthly tokens with organization
      description: Returns the number of tokens remaining for the month, accounting for both user and organization limits
      tags:
      - Usage
      responses:
        '200':
          description: Remaining tokens
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: integer
                    description: Number of tokens remaining
                  status:
                    type: integer
      operationId: postCountMonthlyTokensLeftWithOrg
      x-operation-id-source: derived
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-tokens
      description: JWT authentication token. Obtain a token by calling the User API endpoint `/user/get-token-with-api-key` with your email and API key.