pub struct UsageCompletionsResult {
pub api_key_id: Option<String>,
pub batch: Option<bool>,
pub input_audio_tokens: Option<i32>,
pub input_cached_tokens: Option<i32>,
pub input_tokens: i32,
pub model: Option<String>,
pub num_model_requests: i32,
pub object: String,
pub output_audio_tokens: Option<i32>,
pub output_tokens: i32,
pub project_id: Option<String>,
pub user_id: Option<String>,
}
Fields§
§api_key_id: Option<String>
When group_by=api_key_id
, this field provides the API key ID of the grouped usage result.
batch: Option<bool>
When group_by=batch
, this field tells whether the grouped usage result is batch or not.
input_audio_tokens: Option<i32>
The aggregated number of audio input tokens used, including cached tokens.
input_cached_tokens: Option<i32>
The aggregated number of text input tokens that has been cached from previous requests. For customers subscribe to scale tier, this includes scale tier tokens.
input_tokens: i32
The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
model: Option<String>
When group_by=model
, this field provides the model name of the grouped usage result.
num_model_requests: i32
The count of requests made to the model.
object: String
§output_audio_tokens: Option<i32>
The aggregated number of audio output tokens used.
output_tokens: i32
The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
project_id: Option<String>
When group_by=project_id
, this field provides the project ID of the grouped usage result.
user_id: Option<String>
When group_by=user_id
, this field provides the user ID of the grouped usage result.