Get silhouette line art
Returns the scalable line-art silhouette for a firearm, sized to its real-world dimensions.
Requires Builder tier or higher.
Request
- Base URL: https://api.gunspec.io
- URL: https://api.gunspec.io/v1/firearms/{id}/silhouette
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Path parameters
Resource slug ID
Query parameters
An SVG file (raw; svg is accepted as the same thing, the name SDK 0.1.x used), an inline data URI, or the SVG source as JSON
Inject a stroke so the line art reads on any background. 0 leaves it unstroked; anything above 20 is clamped to 20
Colour of that stroke. Any CSS colour the browser understands: a name, a hex value, rgb(), oklch(), color-mix(). Quotes, angle brackets, ampersands and backslashes are refused, because the value is written into an SVG attribute
Response
The SVG file when format=raw, or the JSON envelope when format is datauri or json
Example response
{
"success": true,
"data": {
"id": "ak-47",
"name": "AK-47",
"slug": "ak-47",
"format": "datauri",
"mimeType": "image/svg+xml",
"dataUri": "data:image/svg+xml;base64,PHN2ZyB4bWxu...",
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.