Skip to main content
GET
Get media library stats
Returns aggregate counts and storage statistics for generated media owned by the authenticated account. It accepts the same core filters as media listing, without pagination.

Authorization

string
required
Bearer API key. Format: Bearer gx_your_api_key.

Query parameters

Request

Response

number
Total matching media items.
number
Matching image count.
number
Matching video count.
number
Matching audio count.
number
Matching file count.
number
Matching favorite item count.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

type
enum<string>[]

Optional media type filter. Repeat for multiple values.

Available options:
image,
video,
audio,
file
fileSubtype
enum<string>[]

Optional file subtype filter. Repeat for multiple values.

Available options:
pdf,
word,
spreadsheet,
presentation,
code
sourceFilter
enum<string>

generated or uploaded.

Available options:
generated,
uploaded
folderId
string

Folder ID, empty for no filter, or literal null for uncategorized media.

isFavorite

Use canonical true for favorite-only stats. false and legacy non-true strings disable the filter. Canonical true/false input.

Response

Media-library counts.

total
number
required
images
number
required
videos
number
required
audio
number
required
files
number
required
favorites
number
required