NAME

OpenAPI::Client::OpenAI::Path::organization-usage-images - Documentation for the /organization/usage/images path.

DESCRIPTION

This document describes the API endpoint at /organization/usage/images.

PATHS

GET /organization/usage/images

Get images usage details for the organization.

Operation ID

usage-images

$client->usage-images( ... );

Parameters

  • start_time (in query) (Required) - Start time (Unix seconds) of the query time range, inclusive.

    Type: integer

  • end_time (in query) (Optional) - End time (Unix seconds) of the query time range, exclusive.

    Type: integer

  • bucket_width (in query) (Optional) - Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.

    Type: string

    Allowed values: 1m, 1h, 1d

    Default: 1d

  • sources (in query) (Optional) - Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.

    Type: array

  • sizes (in query) (Optional) - Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.

    Type: array

  • project_ids (in query) (Optional) - Return only usage for these projects.

    Type: array

  • user_ids (in query) (Optional) - Return only usage for these users.

    Type: array

  • api_key_ids (in query) (Optional) - Return only usage for these API keys.

    Type: array

  • models (in query) (Optional) - Return only usage for these models.

    Type: array

  • group_by (in query) (Optional) - Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.

    Type: array

  • limit (in query) (Optional) - Specifies the number of buckets to return. - `bucket_width=1d`: default: 7, max: 31 - `bucket_width=1h`: default: 24, max: 168 - `bucket_width=1m`: default: 60, max: 1440

    Type: integer

  • page (in query) (Optional) - A cursor for use in pagination. Corresponding to the `next_page` field from the previous response.

    Type: string

Responses

Status Code: 200

Usage data retrieved successfully.

Content Types:

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.