Developer API · v1

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.

https://api.cs2screen.comfront · back · bothAVIF

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.

  1. Create a job. POST the inspect link with your API key.
  2. We render it. The item is captured and encoded once as AVIF.
  3. Receive the result. Wait for a direct response or accept a signed webhook.
All /v1 endpoints authenticate with the X-API-Key header. Keep API keys on your server — never in browser code, mobile apps or public repositories.

Quick start

Use direct mode for the shortest integration: the connection waits up to 900 seconds and answers with the raw image bytes.

POST/v1/jobs · direct response, saves one AVIF
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.avif

Webhook mode returns HTTP 202 immediately and delivers the same bytes to your endpoint later.

POST/v1/jobs · webhook response, returns 202
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

FieldDefaultUse
url required—A valid CS2 certificate inspect link.
modefrontfront, back or both.
width1920256–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.
responsewebhookdirect waits up to 900 seconds. webhook returns HTTP 202.
webhook—Required for webhook mode; optional in direct mode. Must be a public HTTPS URL.
idgenerated UUIDYour 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.
returnTypeimageOptional compatibility field. The only supported value is image.
Output: every successful job produces exactly one high-quality AVIF in sRGB, 1920×1635 by default — smaller and faster to deliver than the equivalent WebP. Its source render is always 3840×2160 and the reconstructed item is never enlarged beyond its source pixels. Name and serve files by the returned Content-Type rather than assuming a format: results created before the switch to AVIF, and rare fallbacks, are image/webp.

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.

HeaderValue
X-CS2-Job-IDJob UUID.
X-CS2-Mode / X-CS2-Viewfront, back or both.
X-CS2-SHA256SHA-256 of the exact image body.
X-CS2-Width / X-CS2-HeightFinal image dimensions.
X-CS2-Float-ValueDecoded float when present.
X-CS2-MetadataBase64url 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.

Node.js · verify X-CS2-Signature
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));
Also compare your body hash with X-CS2-SHA256, reject old timestamps and store X-CS2-Event-ID with a unique constraint before returning HTTP 2xx.

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.

GET/v1/jobs/{id} · job status
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.

POST/v1/media · upload a reusable logo
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

StatusMeaning
200/201Result returned or media created.
202Job accepted or direct result still pending.
401Missing or invalid API key.
409Job ID or idempotency conflict.
422Invalid request, inspect link, webhook or media.
429Rate or queue limit — follow Retry-After.
5xxTemporary service, render or media failure.

Integration prompt

Copy this short context into your coding assistant and add your language and framework.

AI integration context
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.

Get API access