Class UsageCompletionsParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class UsageCompletionsParams implements Params
Get completions usage details for the organization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUsageCompletionsParams.BuilderA builder for UsageCompletionsParams.
public final classUsageCompletionsParams.BucketWidthWidth of each time bucket in response. Currently
1m,1hand1dare supported, default to1d.public final classUsageCompletionsParams.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 usage for these API keys. final Optional<Boolean>batch()If true, return batch jobs only.final Optional<UsageCompletionsParams.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<UsageCompletionsParams.GroupBy>>groupBy()Group the usage data by the specified fields. final Optional<Long>limit()Specifies the number of buckets to return. final Optional<List<String>>models()Return only usage for these models. final Optional<String>page()A cursor for use in pagination. final Optional<List<String>>projectIds()Return only usage for these projects. final Optional<List<String>>userIds()Return only usage for these users. final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final UsageCompletionsParams.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 UsageCompletionsParams.Builderbuilder()Returns a mutable builder for constructing an instance of UsageCompletionsParams. -
-
Method Detail
-
batch
final Optional<Boolean> batch()
If
true, return batch jobs only. Iffalse, return non-batch jobs only. By default, return both.
-
bucketWidth
final Optional<UsageCompletionsParams.BucketWidth> bucketWidth()
Width of each time bucket in response. Currently
1m,1hand1dare supported, default to1d.
-
groupBy
final Optional<List<UsageCompletionsParams.GroupBy>> groupBy()
Group the usage data by the specified fields. Support fields include
project_id,user_id,api_key_id,model,batch,service_tieror any combination of them.
-
limit
final Optional<Long> limit()
Specifies the number of buckets to return.
bucket_width=1d: default: 7, max: 31bucket_width=1h: default: 24, max: 168bucket_width=1m: default: 60, max: 1440
-
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 usage 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 UsageCompletionsParams.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 UsageCompletionsParams.Builder builder()
Returns a mutable builder for constructing an instance of UsageCompletionsParams.
The following fields are required:
.startTime()
-
-
-
-