Quickstart
Get a key: sign in with an email address and start the
10-day free trial or pick a plan. Add each origin your page runs on to the key,
http://localhost:5173 included
(Keys and origins).
Paste this tag into a page to show a CS2 item. It works in every browser.
<img src="https://inspekt.gg/api/still?id=ak47_cu_ak47_cobra_gen&wear=0.1662&seed=55&view=front&w=640&h=400&key=cs2pk_your_key_here"
referrerpolicy="strict-origin">
Replace cs2pk_your_key_here with your key. For an inspect link, replace
id=…&wear=…&seed=… with inspect=<the
link>. See Render API for every parameter.
Keep referrerpolicy="strict-origin" on every <img> and on every
<iframe> you write yourself.
Test a still from a page on an allowed origin. Opened in the address bar, it gets
403 origin_required.
Render API or embed
| Render API | Embed | |
|---|---|---|
| Output | One webp image of the item | The live 3D viewer, in an iframe |
| Integration | One <img> tag | A script tag and an element |
| Needs WebGPU | No | Yes, in the visitor's browser |
| Counts as | One render | One embed load |
Start with stills, then add the embed to the pages that need 3D. The listing grid demo shows both, with the code for each card.
Embed in four steps
-
Copy an inspect link
Use a link with the item as hex after
csgo_econ_action_preview: one copied from an item inside CS2, or a "gen" link, generated from the item's values, like this one:inspect linksteam://rungame/730/76561202255233023/+csgo_econ_action_preview 001807209A0228043004388F85D7F30340950512E67D72Send the whole link, URL-encoded or not, or the hex alone.
A Steam Community Market or Steam inventory link, ending in
M…A…D…orS…A…D…, carries no item data. The Render API answers it with400. The embed shows thebad-inspectcard.To name an item by catalog id instead, pass
swithwearandseed. The embed'ssand the still'sidtake the same catalog id. -
Add the loader script, once per page
html<script src="https://inspekt.gg/cs2embed.js"></script> -
Mount the viewer on an element with a size
Height is required.
html<div id="viewer" style="width:640px;height:400px"></div> <script> var viewer = CS2Embed.mount(document.getElementById('viewer'), { inspect: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview 001807209A0228043004388F85D7F30340950512E67D72', key: 'cs2pk_your_key_here', autorotate: true, }); viewer.on('loaded', function (e) { console.log('rendered', e.id, 'in', e.ms, 'ms'); }); </script>See Embed parameters for every option and postMessage API for the handle's methods and events.
-
Reload and check
The frame shows a still of your item, then the live 3D view. A new still can take up to 95 seconds, and the 3D view can arrive first.
Before you ship
- The first request for a new still waits up to 95 seconds while it renders.
Pre-warm the URL from your server, or send
wait=0for a placeholder at once; see Caching and the placeholder. - A refusal carries a code. See Error codes.