Altimate AI AI_SERVICES API
The AI_SERVICES API from Altimate AI — 5 operation(s) for ai_services.
The AI_SERVICES API from Altimate AI — 5 operation(s) for ai_services.
openapi: 3.1.0
info:
title: Fast ACCOUNT_COSTS AI_SERVICES API
version: 0.1.0
tags:
- name: AI_SERVICES
paths:
/ai_services/summary:
get:
tags:
- AI_SERVICES
summary: Get Ai Services Summary
description: List all AI services with aggregated costs.
operationId: get_ai_services_summary_ai_services_summary_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
title: Start Date
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
title: End Date
- name: instance_id
in: query
required: false
schema:
type: string
default: all
title: Instance Id
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sort By
- name: sort_order
in: query
required: false
schema:
type: string
default: desc
title: Sort Order
- name: navigationSource
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Navigationsource
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AIServicesSummaryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/ai_services/{service_type}/graph:
get:
tags:
- AI_SERVICES
summary: Get Ai Service Graph
description: Get cost graph data for a specific AI service.
operationId: get_ai_service_graph_ai_services__service_type__graph_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: service_type
in: path
required: true
schema:
$ref: '#/components/schemas/AIServiceType'
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
title: Start Date
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
title: End Date
- name: aggregation_level
in: query
required: false
schema:
$ref: '#/components/schemas/SummaryAggregationType'
default: day
- name: instance_id
in: query
required: false
schema:
type: string
default: all
title: Instance Id
- name: username
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Username
- name: model_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Model Name
- name: function_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Function Name
- name: operation_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Operation Name
- name: database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Database Name
- name: schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Schema Name
- name: service_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Service Name
- name: consumption_type
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Consumption Type
- name: user_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: User Name
- name: agent_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Name
- name: agent_database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Database Name
- name: agent_schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Schema Name
- name: snowflake_intelligence_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Snowflake Intelligence Name
- name: warehouse_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Warehouse Name
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AIServiceGraphResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/ai_services/{service_type}/usage:
get:
tags:
- AI_SERVICES
summary: Get Ai Service Usage
description: Get usage table data for a specific AI service.
operationId: get_ai_service_usage_ai_services__service_type__usage_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: service_type
in: path
required: true
schema:
$ref: '#/components/schemas/AIServiceType'
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
title: Start Date
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
title: End Date
- name: instance_id
in: query
required: false
schema:
type: string
default: all
title: Instance Id
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: Page number (1-indexed)
default: 1
title: Page
description: Page number (1-indexed)
- name: size
in: query
required: false
schema:
type: integer
maximum: 1000
minimum: 1
description: Items per page
default: 50
title: Size
description: Items per page
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sort By
- name: sort_order
in: query
required: false
schema:
type: string
default: desc
title: Sort Order
- name: username
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Username
- name: model_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Model Name
- name: function_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Function Name
- name: operation_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Operation Name
- name: database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Database Name
- name: schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Schema Name
- name: service_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Service Name
- name: consumption_type
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Consumption Type
- name: user_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: User Name
- name: agent_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Name
- name: agent_database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Database Name
- name: agent_schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Schema Name
- name: snowflake_intelligence_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Snowflake Intelligence Name
- name: warehouse_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Warehouse Name
- name: cost_filter
in: query
required: false
schema:
anyOf:
- type: number
- type: 'null'
description: Numeric cost filter value
title: Cost Filter
description: Numeric cost filter value
- name: cost_filter_mode
in: query
required: false
schema:
type: string
description: 'Cost filter mode: gt (greater than) or lt (less than)'
default: gt
title: Cost Filter Mode
description: 'Cost filter mode: gt (greater than) or lt (less than)'
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AIServiceUsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/ai_services/{service_type}/filter_values:
get:
tags:
- AI_SERVICES
summary: Get Ai Service Filter Values
description: Get distinct values for a filterable column.
operationId: get_ai_service_filter_values_ai_services__service_type__filter_values_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: service_type
in: path
required: true
schema:
$ref: '#/components/schemas/AIServiceType'
- name: column
in: query
required: true
schema:
type: string
description: Column name to get distinct values for
title: Column
description: Column name to get distinct values for
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
title: Start Date
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
title: End Date
- name: instance_id
in: query
required: false
schema:
type: string
default: all
title: Instance Id
- name: prefix
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Prefix search for values
title: Prefix
description: Prefix search for values
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
default: 1
title: Page
- name: size
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
default: 50
title: Size
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AIServiceFilterValuesResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/ai_services/{service_type}/breakdown:
get:
tags:
- AI_SERVICES
summary: Get Ai Service Breakdown
description: Get cost breakdown by dimension for a specific AI service.
operationId: get_ai_service_breakdown_ai_services__service_type__breakdown_get
security:
- HTTPBearer: []
- HTTPBearer: []
parameters:
- name: service_type
in: path
required: true
schema:
$ref: '#/components/schemas/AIServiceType'
- name: start_date
in: query
required: true
schema:
type: string
format: date-time
title: Start Date
- name: end_date
in: query
required: false
schema:
type: string
format: date-time
title: End Date
- name: aggregation_level
in: query
required: false
schema:
$ref: '#/components/schemas/SummaryAggregationType'
default: day
- name: dimension
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Dimension
- name: instance_id
in: query
required: false
schema:
type: string
default: all
title: Instance Id
- name: username
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Username
- name: model_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Model Name
- name: function_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Function Name
- name: operation_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Operation Name
- name: database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Database Name
- name: schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Schema Name
- name: service_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Service Name
- name: consumption_type
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Consumption Type
- name: user_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: User Name
- name: agent_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Name
- name: agent_database_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Database Name
- name: agent_schema_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Agent Schema Name
- name: snowflake_intelligence_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Snowflake Intelligence Name
- name: warehouse_name
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
title: Warehouse Name
- name: x-tenant
in: header
required: true
schema:
type: string
title: X-Tenant
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AIServiceBreakdownResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
AIServiceSummaryItem:
properties:
service_type:
type: string
title: Service Type
service_name:
type: string
title: Service Name
total_cost:
type: number
title: Total Cost
total_credits:
type: number
title: Total Credits
record_count:
type: integer
title: Record Count
percentage_of_total:
type: number
title: Percentage Of Total
type: object
required:
- service_type
- service_name
- total_cost
- total_credits
- record_count
- percentage_of_total
title: AIServiceSummaryItem
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
AIServicesSummaryResponse:
properties:
services:
items:
$ref: '#/components/schemas/AIServiceSummaryItem'
type: array
title: Services
total_cost:
type: number
title: Total Cost
currency:
type: string
title: Currency
type: object
required:
- services
- total_cost
- currency
title: AIServicesSummaryResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
AIServiceGraphPoint:
properties:
date:
type: string
format: date-time
title: Date
cost:
type: number
title: Cost
credits:
type: number
title: Credits
record_count:
type: integer
title: Record Count
type: object
required:
- date
- cost
- credits
- record_count
title: AIServiceGraphPoint
AIServiceFilterValuesResponse:
properties:
column:
type: string
title: Column
values:
items:
type: string
type: array
title: Values
total:
type: integer
title: Total
type: object
required:
- column
- values
- total
title: AIServiceFilterValuesResponse
AIServiceGraphResponse:
properties:
service_type:
type: string
title: Service Type
service_name:
type: string
title: Service Name
graph:
items:
$ref: '#/components/schemas/AIServiceGraphPoint'
type: array
title: Graph
total_cost:
type: number
title: Total Cost
total_credits:
type: number
title: Total Credits
currency:
type: string
title: Currency
type: object
required:
- service_type
- service_name
- graph
- total_cost
- total_credits
- currency
title: AIServiceGraphResponse
ColumnDefinition:
properties:
key:
type: string
title: Key
label:
type: string
title: Label
sortable:
type: boolean
title: Sortable
data_type:
type: string
title: Data Type
link_type:
anyOf:
- type: string
- type: 'null'
title: Link Type
filterable:
type: boolean
title: Filterable
default: false
type: object
required:
- key
- label
- sortable
- data_type
title: ColumnDefinition
app__schemas__ai_services_detail__PaginationInfo:
properties:
page:
type: integer
title: Page
pages:
type: integer
title: Pages
size:
type: integer
title: Size
total:
type: integer
title: Total
type: object
required:
- page
- pages
- size
- total
title: PaginationInfo
AIServiceBreakdownPoint:
properties:
date:
type: string
format: date-time
title: Date
dimension_value:
type: string
title: Dimension Value
cost:
type: number
title: Cost
credits:
type: number
title: Credits
type: object
required:
- date
- dimension_value
- cost
- credits
title: AIServiceBreakdownPoint
AIServiceType:
type: string
enum:
- cortex_analyst
- cortex_document_processing
- cortex_fine_tuning
- cortex_functions
- cortex_search
- cortex_code_cli
- cortex_code_snowsight
- cortex_agent
- snowflake_intelligence
- cortex_code_desktop
- reader_ai_services
- reader_ai_inference
- reader_cortex_code_snowsight
- ai_inference
- ai_services_other
title: AIServiceType
SummaryAggregationType:
type: string
enum:
- day
- week
- month
title: SummaryAggregationType
AIServiceBreakdownResponse:
properties:
service_type:
type: string
title: Service Type
dimension:
type: string
title: Dimension
available_dimensions:
items:
type: string
type: array
title: Available Dimensions
data:
items:
$ref: '#/components/schemas/AIServiceBreakdownPoint'
type: array
title: Data
pivoted_data:
items:
additionalProperties: true
type: object
type: array
title: Pivoted Data
dimension_keys:
items:
type: string
type: array
title: Dimension Keys
currency:
type: string
title: Currency
type: object
required:
- service_type
- dimension
- available_dimensions
- data
- currency
title: AIServiceBreakdownResponse
AIServiceUsageResponse:
properties:
service_type:
type: string
title: Service Type
data:
items:
additionalProperties: true
type: object
type: array
title: Data
pagination:
$ref: '#/components/schemas/app__schemas__ai_services_detail__PaginationInfo'
columns:
items:
$ref: '#/components/schemas/ColumnDefinition'
type: array
title: Columns
type: object
required:
- service_type
- data
- pagination
- columns
title: AIServiceUsageResponse
securitySchemes:
HTTPBearer:
type: http
scheme: bearer