University of Amsterdam Cost Tracking API

The Cost Tracking API from University of Amsterdam — 3 operation(s) for cost tracking.

Operations 5

GET /config/cost_discount_config Get Cost Discount Config #
PATCH /config/cost_discount_config Update Cost Discount Config #
GET /config/cost_margin_config Get Cost Margin Config #
PATCH /config/cost_margin_config Update Cost Margin Config #
POST /cost/estimate Estimate Cost #

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/university-of-amsterdam-cost-tracking-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

university-of-amsterdam-cost-tracking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LiteLLM Cost Tracking API
  description: 'Enterprise Edition


    Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs**


    👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login```


    💸 ```LiteLLM Model Cost Map```.


    🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**'
  version: 1.95.0
tags:
- name: Cost Tracking
paths:
  /config/cost_discount_config:
    get:
      tags:
      - Cost Tracking
      summary: Get Cost Discount Config
      description: 'Get current cost discount configuration.


        Returns the cost_discount_config from litellm_settings.'
      operationId: get_cost_discount_config_config_cost_discount_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - APIKeyHeader: []
    patch:
      tags:
      - Cost Tracking
      summary: Update Cost Discount Config
      description: 'Update cost discount configuration.


        Updates the cost_discount_config in litellm_settings.

        Discounts should be between 0 and 1 (e.g., 0.05 = 5% discount).


        Example:

        ```json

        {

        "vertex_ai": 0.05,

        "gemini": 0.05,

        "openai": 0.01

        }

        ```'
      operationId: update_cost_discount_config_config_cost_discount_config_patch
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties:
                type: number
              type: object
              title: Cost Discount Config
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
  /config/cost_margin_config:
    get:
      tags:
      - Cost Tracking
      summary: Get Cost Margin Config
      description: 'Get current cost margin configuration.


        Returns the cost_margin_config from litellm_settings.'
      operationId: get_cost_margin_config_config_cost_margin_config_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - APIKeyHeader: []
    patch:
      tags:
      - Cost Tracking
      summary: Update Cost Margin Config
      description: 'Update cost margin configuration.


        Updates the cost_margin_config in litellm_settings.

        Margins can be:

        - Percentage: {"openai": 0.10} = 10% margin

        - Fixed amount: {"openai": {"fixed_amount": 0.001}} = $0.001 per request

        - Combined: {"vertex_ai": {"percentage": 0.08, "fixed_amount": 0.0005}}

        - Global: {"global": 0.05} = 5% global margin on all providers


        Example:

        ```json

        {

        "global": 0.05,

        "openai": 0.10,

        "anthropic": {"fixed_amount": 0.001},

        "vertex_ai": {"percentage": 0.08, "fixed_amount": 0.0005}

        }

        ```'
      operationId: update_cost_margin_config_config_cost_margin_config_patch
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties:
                anyOf:
                - type: number
                - additionalProperties:
                    type: number
                  type: object
              type: object
              title: Cost Margin Config
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
  /cost/estimate:
    post:
      tags:
      - Cost Tracking
      summary: Estimate Cost
      description: 'Estimate cost for a given model and token counts.


        This endpoint uses the same cost calculation logic as actual requests,

        including any configured margins and discounts.


        Parameters:

        - model: Model name (e.g., "gpt-4", "claude-3-opus")

        - input_tokens: Expected input tokens per request

        - output_tokens: Expected output tokens per request

        - num_requests_per_day: Number of requests per day (optional)

        - num_requests_per_month: Number of requests per month (optional)


        Returns cost breakdown including:

        - Per-request costs (input, output, margin)

        - Daily costs (if num_requests_per_day provided)

        - Monthly costs (if num_requests_per_month provided)


        Example:

        ```json

        {

        "model": "gpt-4",

        "input_tokens": 1000,

        "output_tokens": 500,

        "num_requests_per_day": 100,

        "num_requests_per_month": 3000

        }

        ```'
      operationId: estimate_cost_cost_estimate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostEstimateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostEstimateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CostEstimateRequest:
      properties:
        model:
          type: string
          title: Model
          description: Model name (from /model_group/info)
        input_tokens:
          type: integer
          minimum: 0.0
          title: Input Tokens
          description: Expected input tokens per request
        output_tokens:
          type: integer
          minimum: 0.0
          title: Output Tokens
          description: Expected output tokens per request
        num_requests_per_day:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Num Requests Per Day
          description: Number of requests per day
        num_requests_per_month:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Num Requests Per Month
          description: Number of requests per month
      type: object
      required:
      - model
      - input_tokens
      - output_tokens
      title: CostEstimateRequest
      description: Request body for /cost/estimate endpoint.
    CostEstimateResponse:
      properties:
        model:
          type: string
          title: Model
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          title: Output Tokens
        num_requests_per_day:
          anyOf:
          - type: integer
          - type: 'null'
          title: Num Requests Per Day
        num_requests_per_month:
          anyOf:
          - type: integer
          - type: 'null'
          title: Num Requests Per Month
        cost_per_request:
          type: number
          title: Cost Per Request
          description: Total cost per request (includes margin)
        input_cost_per_request:
          type: number
          title: Input Cost Per Request
          description: Input token cost per request (before margin)
        output_cost_per_request:
          type: number
          title: Output Cost Per Request
          description: Output token cost per request (before margin)
        margin_cost_per_request:
          type: number
          title: Margin Cost Per Request
          description: Margin/fee added per request
          default: 0.0
        daily_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Daily Cost
          description: Total daily cost (includes margin)
        daily_input_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Daily Input Cost
          description: Daily input token cost
        daily_output_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Daily Output Cost
          description: Daily output token cost
        daily_margin_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Daily Margin Cost
          description: Daily margin/fee
        monthly_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Monthly Cost
          description: Total monthly cost (includes margin)
        monthly_input_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Monthly Input Cost
          description: Monthly input token cost
        monthly_output_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Monthly Output Cost
          description: Monthly output token cost
        monthly_margin_cost:
          anyOf:
          - type: number
          - type: 'null'
          title: Monthly Margin Cost
          description: Monthly margin/fee
        input_cost_per_token:
          anyOf:
          - type: number
          - type: 'null'
          title: Input Cost Per Token
        output_cost_per_token:
          anyOf:
          - type: number
          - type: 'null'
          title: Output Cost Per Token
        provider:
          anyOf:
          - type: string
          - type: 'null'
          title: Provider
      type: object
      required:
      - model
      - input_tokens
      - output_tokens
      - cost_per_request
      - input_cost_per_request
      - output_cost_per_request
      title: CostEstimateResponse
      description: Response body for /cost/estimate endpoint.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Bearer token
      in: header
      name: x-litellm-api-key