windmill-api 1.796.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
# \AiApi

All URIs are relative to */api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**list_ai_usage**]AiApi.md#list_ai_usage | **GET** /w/{workspace}/ai/usage | list aggregated AI token usage
[**record_ai_usage**]AiApi.md#record_ai_usage | **POST** /w/{workspace}/ai/usage | record AI token usage for the calling user



## list_ai_usage

> models::ListAiUsage200Response list_ai_usage(workspace, days, group_by, scope)
list aggregated AI token usage

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**days** | Option<**i32**> |  |  |
**group_by** | Option<**String**> |  |  |
**scope** | Option<**String**> | workspace-wide usage (admin only) or the calling user's own |  |

### Return type

[**models::ListAiUsage200Response**](listAiUsage_200_response.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## record_ai_usage

> record_ai_usage(workspace, record_ai_usage_request)
record AI token usage for the calling user

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**record_ai_usage_request** | [**RecordAiUsageRequest**]RecordAiUsageRequest.md |  | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)