---
title: "Get moderations usage details for the organization."
method: GET
path: "/organization/usage/moderations"
tags: ["Usage"]
---

# Get moderations usage details for the organization.

`GET /organization/usage/moderations`

## Query parameters

- `start_time` integer, required
- `end_time` integer
- `bucket_width` '1m' | '1h' | '1d'
- `project_ids` string[]
- `user_ids` string[]
- `api_key_ids` string[]
- `models` string[]
- `group_by` string[]
- `limit` integer
- `page` string

## Response `200`

Usage data retrieved successfully.

- UsageResponse
  - `object` 'page', required
  - `data` UsageTimeBucket[], required
    - `object` 'bucket', required
    - `start_time` integer, required
    - `end_time` integer, required
    - `results` union[], required
      - union
        - UsageCompletionsResult — The aggregated completions usage details of the specific time bucket.
          - `object` 'organization.usage.completions.result', required
          - `input_tokens` integer, required — The aggregated number of text input tokens used, including cached tokens. For customers subscribe to scale tier, this includes scale tier tokens.
          - `input_cached_tokens` integer — 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.
          - `output_tokens` integer, required — The aggregated number of text output tokens used. For customers subscribe to scale tier, this includes scale tier tokens.
          - `input_audio_tokens` integer — The aggregated number of audio input tokens used, including cached tokens.
          - `output_audio_tokens` integer — The aggregated number of audio output tokens used.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
          - `batch` boolean, nullable — When `group_by=batch`, this field tells whether the grouped usage result is batch or not.
          - `service_tier` string, nullable — When `group_by=service_tier`, this field provides the service tier of the grouped usage result.
        - UsageEmbeddingsResult — The aggregated embeddings usage details of the specific time bucket.
          - `object` 'organization.usage.embeddings.result', required
          - `input_tokens` integer, required — The aggregated number of input tokens used.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
        - UsageModerationsResult — The aggregated moderations usage details of the specific time bucket.
          - `object` 'organization.usage.moderations.result', required
          - `input_tokens` integer, required — The aggregated number of input tokens used.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
        - UsageImagesResult — The aggregated images usage details of the specific time bucket.
          - `object` 'organization.usage.images.result', required
          - `images` integer, required — The number of images processed.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `source` string, nullable — When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.
          - `size` string, nullable — When `group_by=size`, this field provides the image size of the grouped usage result.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
        - UsageAudioSpeechesResult — The aggregated audio speeches usage details of the specific time bucket.
          - `object` 'organization.usage.audio_speeches.result', required
          - `characters` integer, required — The number of characters processed.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
        - UsageAudioTranscriptionsResult — The aggregated audio transcriptions usage details of the specific time bucket.
          - `object` 'organization.usage.audio_transcriptions.result', required
          - `seconds` integer, required — The number of seconds processed.
          - `num_model_requests` integer, required — The count of requests made to the model.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
          - `user_id` string, nullable — When `group_by=user_id`, this field provides the user ID of the grouped usage result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.
          - `model` string, nullable — When `group_by=model`, this field provides the model name of the grouped usage result.
        - UsageVectorStoresResult — The aggregated vector stores usage details of the specific time bucket.
          - `object` 'organization.usage.vector_stores.result', required
          - `usage_bytes` integer, required — The vector stores usage in bytes.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
        - UsageCodeInterpreterSessionsResult — The aggregated code interpreter sessions usage details of the specific time bucket.
          - `object` 'organization.usage.code_interpreter_sessions.result', required
          - `num_sessions` integer, required — The number of code interpreter sessions.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped usage result.
        - CostsResult — The aggregated costs details of the specific time bucket.
          - `object` 'organization.costs.result', required
          - `amount` object — The monetary value in its associated currency.
            - `value` number — The numeric value of the cost.
            - `currency` string — Lowercase ISO-4217 currency e.g. "usd"
          - `line_item` string, nullable — When `group_by=line_item`, this field provides the line item of the grouped costs result.
          - `project_id` string, nullable — When `group_by=project_id`, this field provides the project ID of the grouped costs result.
          - `api_key_id` string, nullable — When `group_by=api_key_id`, this field provides the API Key ID of the grouped costs result.
          - `quantity` number, nullable — When `group_by=line_item`, this field provides the quantity of the grouped costs result.
  - `has_more` boolean, required
  - `next_page` string, nullable, required

---

[API](https://skmtc.net/openai/apis/openai-api-3.md) · [All operations](https://skmtc.net/openai/apis/openai-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api-3/versions/74cbcf73838f/schema)
