Skip to content

Commit

Permalink
Merge pull request #375 from openai/dev/jzhou/doc-minor-update-usage-api
Browse files Browse the repository at this point in the history
Minor update for Usage API
  • Loading branch information
jzhou-openai authored Dec 6, 2024
2 parents ab22d64 + 152a060 commit 399a81d
Showing 1 changed file with 41 additions and 7 deletions.
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

0 comments on commit 399a81d

Please sign in to comment.