University of Amsterdam Budget & Spend Tracking API

The Budget & Spend Tracking API from University of Amsterdam — 12 operation(s) for budget & spend tracking.

Operations 12

GET /user/daily/activity Get User Daily Activity #
GET /user/daily/activity/aggregated Get User Daily Activity Aggregated #
GET /management/v1/spend_logs/end_users List Spend Log End Users #
GET /spend/tags View Spend Tags #
GET /global/spend/report Get Global Spend Report #
GET /global/spend/tags Global View Spend Tags #
POST /spend/calculate Calculate Spend #
GET /spend/logs/v2 Ui View Spend Logs #
GET /spend/logs View Spend Logs #
POST /global/spend/reset Global Spend Reset #
POST /add/allowed_ip Add Allowed Ip #
POST /delete/allowed_ip Delete Allowed Ip #

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-budget-spend-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-budget-spend-tracking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LiteLLM Budget & Spend Tracking API
  description: "Enterprise Edition \n\nProxy Server to call 100+ LLMs in the OpenAI format. [**Customize Swagger Docs**](https://docs.litellm.ai/docs/proxy/enterprise#swagger-docs---custom-routes--branding)\n\n\U0001F449 [```LiteLLM Admin Panel on /ui```](/ui). Create, Edit Keys with SSO. Having issues? Try [```Fallback Login```](/fallback/login)\n\n\U0001F4B8 [```LiteLLM Model Cost Map```](https://models.litellm.ai/).\n\n\U0001F50E [```LiteLLM Model Hub```](/ui/model_hub_table). See available models on the proxy. [**Docs**](https://docs.litellm.ai/docs/proxy/ai_hub)"
  version: 1.95.0
  x-operator: institution
  x-provenance:
    method: probed
    source: https://llmproxy.uva.nl/openapi.json
    retrieved: '2026-08-19'
    note: Document is generated by the LiteLLM proxy software the University of Amsterdam self-hosts; the deployment, the key issuance and the host (llmproxy.uva.nl, UvA Azure) are the institution's. servers[] added by API Evangelist because the served document omits it; nothing else altered.
servers:
- url: https://llmproxy.uva.nl
  description: University of Amsterdam / Amsterdam University of Applied Sciences shared AI gateway
tags:
- name: Budget & Spend Tracking
paths:
  /user/daily/activity:
    get:
      tags:
      - Budget & Spend Tracking
      summary: Get User Daily Activity
      description: '[BETA] This is a beta endpoint. It will change.


        Meant to optimize querying spend data for analytics for a user.


        Returns:

        (by date)

        - spend

        - prompt_tokens

        - completion_tokens

        - cache_read_input_tokens

        - cache_creation_input_tokens

        - total_tokens

        - api_requests

        - breakdown by model, api_key, provider'
      operationId: get_user_daily_activity_user_daily_activity_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Start date in YYYY-MM-DD format
          title: Start Date
        description: Start date in YYYY-MM-DD format
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: End date in YYYY-MM-DD format
          title: End Date
        description: End date in YYYY-MM-DD format
      - name: model
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific model
          title: Model
        description: Filter by specific model
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific API key
          title: Api Key
        description: Filter by specific API key
      - name: user_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific user ID. Admins can filter by any user or omit for global view. Non-admins must provide their own user_id.
          title: User Id
        description: Filter by specific user ID. Admins can filter by any user or omit for global view. Non-admins must provide their own user_id.
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number for pagination
          default: 1
          title: Page
        description: Page number for pagination
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Items per page
          default: 50
          title: Page Size
        description: Items per page
      - name: timezone
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Timezone offset in minutes from UTC (e.g., 480 for PST). Matches JavaScript's Date.getTimezoneOffset() convention.
          title: Timezone
        description: Timezone offset in minutes from UTC (e.g., 480 for PST). Matches JavaScript's Date.getTimezoneOffset() convention.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendAnalyticsPaginatedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /user/daily/activity/aggregated:
    get:
      tags:
      - Budget & Spend Tracking
      summary: Get User Daily Activity Aggregated
      description: 'Aggregated analytics for a user''s daily activity without pagination.

        Returns the same response shape as the paginated endpoint with page metadata set to single-page.'
      operationId: get_user_daily_activity_aggregated_user_daily_activity_aggregated_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Start date in YYYY-MM-DD format
          title: Start Date
        description: Start date in YYYY-MM-DD format
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: End date in YYYY-MM-DD format
          title: End Date
        description: End date in YYYY-MM-DD format
      - name: model
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific model
          title: Model
        description: Filter by specific model
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific API key
          title: Api Key
        description: Filter by specific API key
      - name: user_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by specific user ID. Admins can filter by any user or omit for global view. Non-admins must provide their own user_id.
          title: User Id
        description: Filter by specific user ID. Admins can filter by any user or omit for global view. Non-admins must provide their own user_id.
      - name: timezone
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Timezone offset in minutes from UTC (e.g., 480 for PST). Matches JavaScript's Date.getTimezoneOffset() convention.
          title: Timezone
        description: Timezone offset in minutes from UTC (e.g., 480 for PST). Matches JavaScript's Date.getTimezoneOffset() convention.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendAnalyticsPaginatedResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /management/v1/spend_logs/end_users:
    get:
      tags:
      - Budget & Spend Tracking
      summary: List Spend Log End Users
      description: 'The distinct end users appearing in spend logs over a time window, for the logs

        page filter dropdown.


        Scoped like `/spend/logs/ui`: a proxy admin sees every end user in the window,

        anyone else sees only end users from their own requests or from teams they

        administer (or hold the `/spend/logs` permission on).


        The window is required and the inner scan is capped at SPEND_LOGS_FACET_SCAN_CAP

        rows, so the query cannot degrade into a full-table scan the way

        `/global/all_end_users` does.


        Example curl:

        ```

        curl --location --globoff ''http://0.0.0.0:4000/management/v1/spend_logs/end_users?filter[startTime][gte]=2026-07-23T00:00:00Z&filter[startTime][lte]=2026-07-24T00:00:00Z&page_size=50&q=acme''         --header ''Authorization: Bearer sk-1234''

        ```'
      operationId: list_spend_log_end_users_management_v1_spend_logs_end_users_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: filter[startTime][gte]
        in: query
        required: true
        schema:
          type: string
          format: date-time
          description: Window start (UTC when no offset is given)
          title: Filter[Starttime][Gte]
        description: Window start (UTC when no offset is given)
      - name: filter[startTime][lte]
        in: query
        required: true
        schema:
          type: string
          format: date-time
          description: Window end (UTC when no offset is given)
          title: Filter[Starttime][Lte]
        description: Window end (UTC when no offset is given)
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Case-insensitive partial match on the end user id
          title: Q
        description: Case-insensitive partial match on the end user id
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number
          default: 1
          title: Page
        description: Page number
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Page size
          default: 50
          title: Page Size
        description: Page size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacetListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /spend/tags:
    get:
      tags:
      - Budget & Spend Tracking
      summary: View Spend Tags
      description: 'LiteLLM Enterprise - View Spend Per Request Tag


        Example Request:

        ```

        curl -X GET "http://0.0.0.0:8000/spend/tags" -H "Authorization: Bearer sk-1234"

        ```


        Spend with Start Date and End Date

        ```

        curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234"

        ```'
      operationId: view_spend_tags_spend_tags_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time from which to start viewing key spend
          title: Start Date
        description: Time from which to start viewing key spend
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time till which to view key spend
          title: End Date
        description: Time till which to view key spend
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LiteLLM_SpendLogs'
                title: Response 200 View Spend Tags Spend Tags Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /global/spend/report:
    get:
      tags:
      - Budget & Spend Tracking
      summary: Get Global Spend Report
      description: "Get Daily Spend per Team, based on specific startTime and endTime. Per team, view usage by each key, model\n[\n    {\n        \"group-by-day\": \"2024-05-10\",\n        \"teams\": [\n            {\n                \"team_name\": \"team-1\"\n                \"spend\": 10,\n                \"keys\": [\n                    \"key\": \"1213\",\n                    \"usage\": {\n                        \"model-1\": {\n                                \"cost\": 12.50,\n                                \"input_tokens\": 1000,\n                                \"output_tokens\": 5000,\n                                \"requests\": 100\n                            },\n                            \"audio-modelname1\": {\n                            \"cost\": 25.50,\n                            \"seconds\": 25,\n                            \"requests\": 50\n                    },\n                    }\n                }\n        ]\n    ]\n}"
      operationId: get_global_spend_report_global_spend_report_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time from which to start viewing spend
          title: Start Date
        description: Time from which to start viewing spend
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time till which to view spend
          title: End Date
        description: Time till which to view spend
      - name: group_by
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - team
            - customer
            - api_key
            type: string
          - type: 'null'
          description: Group spend by internal team or customer or api_key
          default: team
          title: Group By
        description: Group spend by internal team or customer or api_key
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: View spend for a specific api_key. Example api_key='sk-1234
          title: Api Key
        description: View spend for a specific api_key. Example api_key='sk-1234
      - name: internal_user_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: View spend for a specific internal_user_id. Example internal_user_id='1234
          title: Internal User Id
        description: View spend for a specific internal_user_id. Example internal_user_id='1234
      - name: team_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: View spend for a specific team_id. Example team_id='1234
          title: Team Id
        description: View spend for a specific team_id. Example team_id='1234
      - name: customer_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: View spend for a specific customer_id. Example customer_id='1234. Can be used in conjunction with team_id as well.
          title: Customer Id
        description: View spend for a specific customer_id. Example customer_id='1234. Can be used in conjunction with team_id as well.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LiteLLM_SpendLogs'
                title: Response 200 Get Global Spend Report Global Spend Report Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /global/spend/tags:
    get:
      tags:
      - Budget & Spend Tracking
      summary: Global View Spend Tags
      description: 'LiteLLM Enterprise - View Spend Per Request Tag. Used by LiteLLM UI


        Example Request:

        ```

        curl -X GET "http://0.0.0.0:4000/spend/tags" -H "Authorization: Bearer sk-1234"

        ```


        Spend with Start Date and End Date

        ```

        curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234"

        ```'
      operationId: global_view_spend_tags_global_spend_tags_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time from which to start viewing key spend
          title: Start Date
        description: Time from which to start viewing key spend
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time till which to view key spend
          title: End Date
        description: Time till which to view key spend
      - name: tags
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: comman separated tags to filter on
          title: Tags
        description: comman separated tags to filter on
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LiteLLM_SpendLogs'
                title: Response 200 Global View Spend Tags Global Spend Tags Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /spend/calculate:
    post:
      tags:
      - Budget & Spend Tracking
      summary: Calculate Spend
      description: "Accepts all the params of completion_cost.\n\nCalculate spend **before** making call:\n\nNote: If you see a spend of $0.0 you need to set custom_pricing for your model: https://docs.litellm.ai/docs/proxy/custom_pricing\n\n```\ncurl --location 'http://localhost:4000/spend/calculate'\n--header 'Authorization: Bearer sk-1234'\n--header 'Content-Type: application/json'\n--data '{\n    \"model\": \"anthropic.claude-v2\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hey, how'''s it going?\"}]\n}'\n```\n\nCalculate spend **after** making call:\n\n```\ncurl --location 'http://localhost:4000/spend/calculate'\n--header 'Authorization: Bearer sk-1234'\n--header 'Content-Type: application/json'\n--data '{\n    \"completion_response\": {\n        \"id\": \"chatcmpl-123\",\n        \"object\": \"chat.completion\",\n        \"created\": 1677652288,\n        \"model\": \"gpt-3.5-turbo-0125\",\n        \"system_fingerprint\": \"fp_44709d6fcb\",\n        \"choices\": [{\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": \"Hello there, how may I assist you today?\"\n            },\n            \"logprobs\": null,\n            \"finish_reason\": \"stop\"\n        }]\n        \"usage\": {\n            \"prompt_tokens\": 9,\n            \"completion_tokens\": 12,\n            \"total_tokens\": 21\n        }\n    }\n}'\n```"
      operationId: calculate_spend_spend_calculate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendCalculateRequest'
        required: true
      responses:
        '200':
          description: The calculated cost
          content:
            application/json:
              schema:
                properties:
                  cost:
                    type: number
                    description: The calculated cost
                    example: 0.0
                type: object
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
  /spend/logs/v2:
    get:
      tags:
      - Budget & Spend Tracking
      summary: Ui View Spend Logs
      description: 'View spend logs with pagination support.

        Available at both `/spend/logs/v2` (public API) and `/spend/logs/ui` (internal UI).


        Returns paginated response with data, total, page, page_size, and total_pages.


        Example:

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs/v2?start_date=2025-11-25%2000:00:00&end_date=2025-11-26%2023:59:59&page=1&page_size=50" -H "Authorization: Bearer sk-1234"

        ```'
      operationId: ui_view_spend_logs_spend_logs_v2_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Get spend logs based on api key
          title: Api Key
        description: Get spend logs based on api key
      - name: user_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Get spend logs based on user_id
          title: User Id
        description: Get spend logs based on user_id
      - name: request_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: request_id to get spend logs for specific request_id
          title: Request Id
        description: request_id to get spend logs for specific request_id
      - name: session_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter spend logs by session_id (partial string match)
          title: Session Id
        description: Filter spend logs by session_id (partial string match)
      - name: team_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter spend logs by team_id
          title: Team Id
        description: Filter spend logs by team_id
      - name: min_spend
        in: query
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          description: Filter logs with spend greater than or equal to this value
          title: Min Spend
        description: Filter logs with spend greater than or equal to this value
      - name: max_spend
        in: query
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          description: Filter logs with spend less than or equal to this value
          title: Max Spend
        description: Filter logs with spend less than or equal to this value
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time from which to start viewing key spend
          title: Start Date
        description: Time from which to start viewing key spend
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time till which to view key spend
          title: End Date
        description: Time till which to view key spend
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number for pagination
          default: 1
          title: Page
        description: Page number for pagination
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Number of items per page
          default: 50
          title: Page Size
        description: Number of items per page
      - name: status_filter
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by status (e.g., success, failure)
          title: Status Filter
        description: Filter logs by status (e.g., success, failure)
      - name: model
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by model
          title: Model
        description: Filter logs by model
      - name: model_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by model ID (litellm model deployment id)
          title: Model Id
        description: Filter logs by model ID (litellm model deployment id)
      - name: model_group
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by model group
          title: Model Group
        description: Filter logs by model group
      - name: key_alias
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by key alias
          title: Key Alias
        description: Filter logs by key alias
      - name: end_user
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by end user
          title: End User
        description: Filter logs by end user
      - name: error_code
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by error code (e.g., '404', '500')
          title: Error Code
        description: Filter logs by error code (e.g., '404', '500')
      - name: error_message
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter logs by error message (partial string match)
          title: Error Message
        description: Filter logs by error message (partial string match)
      - name: sort_by
        in: query
        required: false
        schema:
          type: string
          description: 'Sort logs by field: spend, total_tokens, startTime, endTime, request_duration_ms, model, or ttft_ms'
          default: startTime
          title: Sort By
        description: 'Sort logs by field: spend, total_tokens, startTime, endTime, request_duration_ms, model, or ttft_ms'
      - name: sort_order
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Sort order: asc or desc'
          default: desc
          title: Sort Order
        description: 'Sort order: asc or desc'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response 200 Ui View Spend Logs Spend Logs V2 Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /spend/logs:
    get:
      tags:
      - Budget & Spend Tracking
      summary: View Spend Logs
      description: '[DEPRECATED] This endpoint is not paginated and can cause performance issues.

        Please use `/spend/logs/v2` instead for paginated access to spend logs.


        View all spend logs, if request_id is provided, only logs for that request_id will be returned


        When start_date and end_date are provided:

        - summarize=true (default): Returns aggregated spend data grouped by date (maintains backward compatibility)

        - summarize=false: Returns filtered individual log entries within the date range


        Example Request for all logs

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs" -H "Authorization: Bearer sk-1234"

        ```


        Example Request for specific request_id

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" -H "Authorization: Bearer sk-1234"

        ```


        Example Request for specific api_key

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=sk-test-example-key-123" -H "Authorization: Bearer sk-1234"

        ```


        Example Request for specific user_id

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" -H "Authorization: Bearer sk-1234"

        ```


        Example Request for date range with individual logs (unsummarized)

        ```

        curl -X GET "http://0.0.0.0:8000/spend/logs?start_date=2024-01-01&end_date=2024-01-02&summarize=false" -H "Authorization: Bearer sk-1234"

        ```'
      operationId: view_spend_logs_spend_logs_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: api_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Get spend logs based on api key
          title: Api Key
        description: Get spend logs based on api key
      - name: user_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Get spend logs based on user_id
          title: User Id
        description: Get spend logs based on user_id
      - name: request_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: request_id to get spend logs for specific request_id. If none passed then pass spend logs for all requests
          title: Request Id
        description: request_id to get spend logs for specific request_id. If none passed then pass spend logs for all requests
      - name: start_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time from which to start viewing key spend
          title: Start Date
        description: Time from which to start viewing key spend
      - name: end_date
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Time till which to view key spend
          title: End Date
        description: Time till which to view key spend
      - name: summarize
        in: query
        required: false
        schema:
          type: boolean
          description: When start_date and end_date are provided, summarize=true returns aggregated data by date (legacy behavior), summarize=false returns filtered individual logs
          default: true
          title: Summarize
        description: When start_date and end_date are provided, summarize=true returns aggregated data by date (legacy behavior), summarize=false returns filtered individual logs
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
           

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/university-of-amsterdam/refs/heads/main/openapi/university-of-amsterdam-budget-spend-tracking-api-openapi.yml