Developer API · v1

CS2 Inspect links in. Images out.

Render weapons, knives and gloves in real CS2. Receive high-quality WebP images directly or by signed webhook. Jobs are durable — a disconnected client does not cancel the render.

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

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 WebP.

  1. Create a job. POST the inspect link with your API key.
  2. We render it. The item is captured and encoded once as WebP.
  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 WebP
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.webp

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 requiredA valid CS2 certificate inspect link.
modefrontfront, back or both.
outputfixed1920×2620 WebP at quality 100, composed from a 3840×2160 Vulkan render.
responsewebhookdirect waits up to 900 seconds. webhook returns HTTP 202.
webhookRequired 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_keyUse 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 1920×2620 WebP at quality 100 with an embedded sRGB profile and 72-dpi metadata. Its source render is always 3840×2160 and the reconstructed item is never enlarged beyond its source pixels.

Results

Direct mode

Every successful mode returns the raw WebP as image/webp. 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.

Webhook mode

The create call returns HTTP 202 with the job id. Later, the same raw image/webp body 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 WebP 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 WebP 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(rawWebpBody).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/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 fixed 1920×2620 output. Without a background the canvas remains transparent.

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. Every render uses a 3840x2160 Vulkan source and returns exactly one 1920x2620 WebP at quality 100. Delivery: response=direct or response=webhook.
The output size and quality are fixed and are not request options. The reconstructed item is never enlarged beyond its source pixels. Webhook jobs return HTTP 202 and later POST the same raw image bytes.
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