client.firearms.getMedia()
Metadata for one asset, by kind or by row id. Builder.
getMedia(id: string, selector: MediaKind | number | string, params?: GetFirearmMediaParams): Promise<APIResponse<FirearmMedia>>- stringheaderrequired
Your API key.
Authorization: Bearer <key>is accepted in its place.
- stringrequired
Resource slug ID
- Accepts
- a lowercase slug: letters, digits and hyphens
- Example
- unknownrequired
Which asset: a kind, which resolves to the primary asset of that kind, or the numeric
idof one row from/v1/firearms/{id}/media. Addressing by kind means never having to list first just to learn an id.- Accepts
- or a numeric id
- Example
- stringdefault
rawBytes, an inline data URI, or metadata only
- Accepts
- Example
- stringdefault
fullPre-rendered derivative; falls back to the original when absent
- Accepts
- Example
- integerdefault
0Silhouettes only: inject a stroke so line art reads on any background
- Range
- 0 – 20
- Example
- stringdefault
blackSilhouettes only: stroke colour. Any CSS colour the browser understands; quotes, angle brackets, ampersands and backslashes are refused, because the value is written into an SVG attribute
- Max length
- 64
- Example
- MediaItem
One asset belonging to a firearm. Every kind, whether silhouette, render, photo, schematic or 3D model, is returned in this same shape, and
urlis always absolute and directly fetchable. - integer | null
Null for assets stored as a column rather than a row (the 3D model).
- MediaKind
What kind of asset a media row is.
- string | null
Media type of the bytes, e.g.
image/png. - integer | null
Pixel width, where it is known.
- integer | null
Pixel height, where it is known.
- string | null
Alt text, where one has been written. Null otherwise, so do not render an empty string.
- string
Absolute, directly fetchable URL.
- object
Per-size URLs. Absent on assets we link rather than host.
- string
URL of the asset at full size.
- string
URL of the mid-size rendition, for a detail page.
- string
URL of the thumbnail rendition, for a list or grid.
- object
Attribution required to reuse the asset. Populated wherever the catalogue records it.
- string | null
Where the record came from: a curated entry, an inference, or an import.
- string | null
Who made the asset, where it is credited.
- string | null
Page the asset or document was taken from.
- string | null
Licence the asset is held under, where one is recorded.
- 400
VALIDATION_ERROR - 401
UNAUTHORIZED - 403
FORBIDDEN - 404
NOT_FOUND - 429
RATE_LIMITED - 500
INTERNAL_ERROR
- Minimum tier
- Builder+
- Monthly quota
- 25,000/mo
- Rate limit
- 60/min
- Daily cap
- 2,000
Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.