Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

File search calls

$ openai admin:organization:usage file-search-calls
GET
/organization/usage/file_search_calls

Get file search calls usage details for the organization.

Parameters
--start-time: number

Start time (Unix seconds) of the query time range, inclusive.

--api-key-id: optional array of string

Return only usage for these API keys.

--bucket-width: optional "1m" or "1h" or "1d"

Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.

--end-time: optional number

End time (Unix seconds) of the query time range, exclusive.

--group-by: optional array of "project_id" or "user_id" or "api_key_id" or "vector_store_id"

Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, vector_store_id or any combination of them.

--limit: optional number

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
--page: optional string

A cursor for use in pagination. Corresponding to the next_page field from the previous response.

--project-id: optional array of string

Return only usage for these projects.

--user-id: optional array of string

Return only usage for these users.

--vector-store-id: optional array of string

Return only usage for these vector stores.

Returns
AdminOrganizationUsageFileSearchCallsResponse: object { data, has_more, next_page, object }
data: array of object { end_time, object, results, start_time }
has_more: boolean
next_page: string
object: "page"

File search calls

openai admin:organization:usage file-search-calls \
  --admin-api-key 'My Admin API Key' \
  --start-time 0
{
    "object": "page",
    "data": [
        {
            "object": "bucket",
            "start_time": 1730419200,
            "end_time": 1730505600,
            "results": [
                {
                    "object": "organization.usage.file_searches.result",
                    "num_requests": 2,
                    "project_id": null,
                    "user_id": null,
                    "api_key_id": null,
                    "vector_store_id": null
                }
            ]
        }
    ],
    "has_more": false,
    "next_page": null
}
Returns Examples
{
    "object": "page",
    "data": [
        {
            "object": "bucket",
            "start_time": 1730419200,
            "end_time": 1730505600,
            "results": [
                {
                    "object": "organization.usage.file_searches.result",
                    "num_requests": 2,
                    "project_id": null,
                    "user_id": null,
                    "api_key_id": null,
                    "vector_store_id": null
                }
            ]
        }
    ],
    "has_more": false,
    "next_page": null
}