Class UsageCostsParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class UsageCostsParams implements Params
Get costs details for the organization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUsageCostsParams.BuilderA builder for UsageCostsParams.
public final classUsageCostsParams.BucketWidthWidth of each time bucket in response. Currently only
1dis supported, default to1d.public final classUsageCostsParams.GroupBy
-
Method Summary
Modifier and Type Method Description final LongstartTime()Start time (Unix seconds) of the query time range, inclusive. final Optional<List<String>>apiKeyIds()Return only costs for these API keys. final Optional<UsageCostsParams.BucketWidth>bucketWidth()Width of each time bucket in response. final Optional<Long>endTime()End time (Unix seconds) of the query time range, exclusive. final Optional<List<UsageCostsParams.GroupBy>>groupBy()Group the costs by the specified fields. final Optional<Long>limit()A limit on the number of buckets to be returned. final Optional<String>page()A cursor for use in pagination. final Optional<List<String>>projectIds()Return only costs for these projects. final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final UsageCostsParams.BuildertoBuilder()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static UsageCostsParams.Builderbuilder()Returns a mutable builder for constructing an instance of UsageCostsParams. -
-
Method Detail
-
bucketWidth
final Optional<UsageCostsParams.BucketWidth> bucketWidth()
Width of each time bucket in response. Currently only
1dis supported, default to1d.
-
groupBy
final Optional<List<UsageCostsParams.GroupBy>> groupBy()
Group the costs by the specified fields. Support fields include
project_id,line_item,api_key_idand any combination of them.
-
limit
final Optional<Long> limit()
A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.
-
page
final Optional<String> page()
A cursor for use in pagination. Corresponding to the
next_pagefield from the previous response.
-
projectIds
final Optional<List<String>> projectIds()
Return only costs for these projects.
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final UsageCostsParams.Builder toBuilder()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static UsageCostsParams.Builder builder()
Returns a mutable builder for constructing an instance of UsageCostsParams.
The following fields are required:
.startTime()
-
-
-
-