client.firearms.getImageAsset()
One image as a base64 data URI. Builder. Ask for a variant. A data URI is capped at 256 KB and a catalogue original is routinely five times that, so the default request fails on exactly the images most worth embedding. thumb and display are generated derivatives and always fit; original is for the cases where you know the file is small. For the full-size bytes use downloadMedia, which redirects to the CDN and has no such cap.
getImageAsset(id: string, imageId: number | string, params?: ImageAssetParams): Promise<APIResponse<ImageAsset>>- stringHeadererforderlich
Ihr API-Schlüssel.
Authorization: Bearer <key>wird ebenfalls akzeptiert.
- stringerforderlich
Resource slug ID
- Akzeptiert
- a lowercase slug: letters, digits and hyphens
- Beispiel
- stringerforderlich
Image row id from /v1/firearms/{id}/images
- Beispiel
- stringstandard
rawraw file, or a base64 data URI
- Akzeptiert
- Beispiel
- stringstandard
originalPre-rendered derivative; falls back to the original when absent
- Akzeptiert
- Beispiel
- object
The response payload.
- string
Slug of the firearm the image belongs to.
- integer
Numeric id of the image within that firearm image set.
- string
Size rendered:
original,displayorthumb. - string
Encoding of the returned image.
datauriis the only format this route emits. - string
Media type of the encoded bytes.
- string
The image inlined as an RFC 2397 data URI, ready to use as an
<img src>with no second request.
- 400
VALIDATION_ERROR - 401
UNAUTHORIZED - 403
FORBIDDEN - 404
NOT_FOUND - 429
RATE_LIMITED - 500
INTERNAL_ERROR
- Mindeststufe
- Builder+
- Monatskontingent
- 25,000/mo
- Anfragerate
- 60/min
- Tageslimit
- 2,000
Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.