Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update for Usage API #375

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 41 additions & 7 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5601,7 +5601,7 @@ paths:
"end_time": 1730505600,
"results": [
{
"object": "orgainzation.usage.audio_speeches.result",
"object": "organization.usage.audio_speeches.result",
"characters": 45,
"num_model_requests": 1,
"project_id": null,
Expand Down Expand Up @@ -12901,10 +12901,12 @@ components:
description: Lowercase ISO-4217 currency e.g. "usd"
line_item:
type: string
nullable: true
description: When `group_by=line_item`, this field provides the line item of the
grouped costs result.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped costs result.
required:
Expand Down Expand Up @@ -23206,18 +23208,22 @@ components:
description: The count of requests made to the model.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
required:
Expand Down Expand Up @@ -23253,18 +23259,22 @@ components:
description: The count of requests made to the model.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
required:
Expand Down Expand Up @@ -23297,6 +23307,7 @@ components:
description: The number of code interpreter sessions.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
required:
Expand All @@ -23320,35 +23331,43 @@ components:
- organization.usage.completions.result
input_tokens:
type: integer
description: The number of input tokens used.
description: The aggregated number of input tokens used. For customers subscribe
to scale tier, this includes scale tier tokens.
input_cached_tokens:
type: integer
description: The number of input tokens that has been cached from previous
requests.
description: The aggregated number of input tokens that has been cached from
previous requests. For customers subscribe to scale tier, this
includes scale tier tokens.
output_tokens:
type: integer
description: The number of output tokens used.
description: The aggregated number of output tokens used. For customers
subscribe to scale tier, this includes scale tier tokens.
num_model_requests:
type: integer
description: The count of requests made to the model.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
batch:
type: boolean
nullable: true
description: When `group_by=batch`, this field tells whether the grouped usage
result is batch or not.
required:
Expand Down Expand Up @@ -23381,24 +23400,28 @@ components:
- organization.usage.embeddings.result
input_tokens:
type: integer
description: The number of input tokens used.
description: The aggregated number of input tokens used.
num_model_requests:
type: integer
description: The count of requests made to the model.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
required:
Expand Down Expand Up @@ -23433,27 +23456,33 @@ components:
description: The count of requests made to the model.
source:
type: string
nullable: true
description: When `group_by=source`, this field provides the source of the
grouped usage result, possible values are `image.generation`,
`image.edit`, `image.variation`.
size:
type: string
nullable: true
description: When `group_by=size`, this field provides the image size of the
grouped usage result.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
required:
Expand Down Expand Up @@ -23484,24 +23513,28 @@ components:
- organization.usage.moderations.result
input_tokens:
type: integer
description: The number of input tokens used.
description: The aggregated number of input tokens used.
num_model_requests:
type: integer
description: The count of requests made to the model.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
user_id:
type: string
nullable: true
description: When `group_by=user_id`, this field provides the user ID of the
grouped usage result.
api_key_id:
type: string
nullable: true
description: When `group_by=api_key_id`, this field provides the API key ID of
the grouped usage result.
model:
type: string
nullable: true
description: When `group_by=model`, this field provides the model name of the
grouped usage result.
required:
Expand Down Expand Up @@ -23582,6 +23615,7 @@ components:
description: The vector stores usage in bytes.
project_id:
type: string
nullable: true
description: When `group_by=project_id`, this field provides the project ID of
the grouped usage result.
required:
Expand Down
Loading