CS2 Inspect links in. Images out.
Render weapons, knives and gloves in real CS2. Receive high-quality AVIF images directly or by signed webhook. Jobs are durable — a disconnected client does not cancel the render.
How it works
Send an inspect link. A GPU worker renders the item in CS2, removes the background and returns the finished image. Every successful job produces exactly one AVIF image.
- Create a job. POST the inspect link with your API key.
- We render it. The item is captured and encoded once as AVIF.
- Receive the result. Wait for a direct response or accept a signed webhook.
Quick start
Use direct mode for the shortest integration: the connection waits up to 900 seconds and answers with the raw image bytes.
curl --max-time 910 -X POST https://api.cs2screen.com/v1/jobs \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "steam://run/730//+csgo_econ_action_preview%20YOUR_CERTIFICATE",
"mode": "front",
"response": "direct"
}' --output item.avifWebhook mode returns HTTP 202 immediately and delivers the same bytes to your endpoint later.
curl -X POST https://api.cs2screen.com/v1/jobs \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "steam://run/730//+csgo_econ_action_preview%20YOUR_CERTIFICATE",
"webhook": "https://example.com/webhooks/cs2screen",
"idempotency_key": "order-12345",
"mode": "both"
}'Request fields
| Field | Default | Use |
|---|---|---|
| url required | — | A valid CS2 certificate inspect link. |
| mode | front | front, back or both. |
| width | 1920 | 256–2048 pixels; height scales with the 1920×1635 canvas. Float details need at least 960 pixels. The source remains a 3840×2160 Vulkan render. |
| view | — | transparent produces one front or back item without background or overlays. |
| response | webhook | direct waits up to 900 seconds. webhook returns HTTP 202. |
| webhook | — | Required for webhook mode; optional in direct mode. Must be a public HTTPS URL. |
| id | generated UUID | Your optional job UUID. It is returned in every response and webhook. |
| idempotency_key | — | Use an order ID to safely retry the same request without creating another job. |
| returnType | image | Optional compatibility field. The only supported value is image. |
Results
Direct mode
Every successful mode returns the raw image as image/avif (or image/webp for older results and fallbacks — check the Content-Type). The body contains only image bytes; job, image and item data travel in X-CS2-* response headers. If the 900-second direct wait expires, the API returns HTTP 202 with a result_url and the job continues in the background.
Every job provides an image_url in JSON responses; immediate Direct images include X-CS2-Image-URL. The link needs no API key, expires three hours after the image is stored and should only be shared with intended viewers.
Webhook mode
The create call returns HTTP 202 with the job id. Later, the same raw image body (image/avif, or image/webp as a fallback) and the same metadata headers are POSTed to your endpoint. Delivery is at-least-once with up to eight attempts — deduplicate with event_id and return any HTTP 2xx quickly.
| Header | Value |
|---|---|
| X-CS2-Job-ID | Job UUID. |
| X-CS2-Mode / X-CS2-View | front, back or both. |
| X-CS2-SHA256 | SHA-256 of the exact image body. |
| X-CS2-Width / X-CS2-Height | Final image dimensions. |
| X-CS2-Float-Value | Decoded float when present. |
| X-CS2-Metadata | Base64url JSON containing image metadata and decoded item information, including stickers and keychains. |
Webhook security
Hash the exact raw image request body. The signed message is timestamp + "." + metadataHeader + "." + bodySha256. Successful image deliveries are marked X-CS2-Signature-Version: image-v1; failed jobs use an application/json error webhook marked json-v1.
import crypto from "node:crypto";
const bodySha256 = crypto.createHash("sha256").update(rawImageBody).digest("hex");
const expected = "sha256=" + crypto
.createHmac("sha256", WEBHOOK_SECRET)
.update(`${timestamp}.${metadataHeader}.${bodySha256}`, "utf8")
.digest("hex");
const supplied = signature || "";
const valid = expected.length === supplied.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(supplied));Check a job
GET /v1/jobs/{id} returns the queue, render and delivery state. A rendered image is not necessarily delivered yet, so check render_status and delivery_status separately. GET /v1/jobs/{id}/result fetches a direct result later and returns HTTP 202 while the result is still being built. GET /v1/images/{token} serves the Direct image without an API key until its three-hour expiry.
curl https://api.cs2screen.com/v1/jobs/JOB_UUID \ -H 'X-API-Key: YOUR_API_KEY'
Design and media
Design fields — background, logo and watermark — are applied after background removal to the requested canvas size. Without a background the canvas remains transparent. Set view=transparent for one bare front or back item.
Upload static PNG, WebP or JPEG bytes once, then reference the returned media_id in jobs instead of passing URLs on every request.
curl -X POST https://api.cs2screen.com/v1/media \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Content-Type: image/png' \ --data-binary @logo.png
Common responses
| Status | Meaning |
|---|---|
| 200/201 | Result returned or media created. |
| 202 | Job accepted or direct result still pending. |
| 401 | Missing or invalid API key. |
| 409 | Job ID or idempotency conflict. |
| 422 | Invalid request, inspect link, webhook or media. |
| 429 | Rate or queue limit — follow Retry-After. |
| 5xx | Temporary service, render or media failure. |
Integration prompt
Copy this short context into your coding assistant and add your language and framework.
Build a server-side client for the CS2Screen API.
Base URL: https://api.cs2screen.com
Auth header: X-API-Key: <secret>
Create: POST /v1/jobs with a CS2 Inspect link in "url".
Modes: front, back, both. Set view=transparent for one bare front or back item. Every render uses a 3840x2160 Vulkan source and returns exactly one high-quality sRGB AVIF (Content-Type image/avif). Optional width=256..2048 scales the default 1920x1635 canvas proportionally. Derive the file extension from the returned Content-Type and also accept image/webp, which older results and fallbacks may use. Delivery: response=direct or response=webhook.
The image quality is fixed. The reconstructed item is never enlarged beyond its source pixels. Webhook jobs return HTTP 202 and later POST the same raw image bytes. Every job exposes a keyless image_url valid for three hours after storage.
Use idempotency_key for safe retries. Poll GET /v1/jobs/{id} when needed.
Read metadata from X-CS2-Metadata (base64url JSON) or the scalar X-CS2-* headers. For successful webhooks, verify X-CS2-Signature as HMAC-SHA256(secret, timestamp + "." + X-CS2-Metadata + "." + SHA256(raw body)), reject old timestamps and deduplicate X-CS2-Event-ID.
Never expose the API key or webhook secret in browser code. Implement timeouts, Retry-After handling and tests.Ready to integrate?
Get an API key and start rendering CS2 items in your product.