Skip to content
smallPict
Inizia Gratis

Guida all'ambiente Sandbox

Sviluppo locale, test automatizzati e pipeline CI/CD con quota illimitata e gratuita.

L'ambiente Sandbox di SmallPict consente di riprodurre fedelmente la pipeline di produzione senza alcun addebito o consumo del saldo mensile.


Chiavi API per Sandbox

Utilizza una chiave con prefisso sp_test_:

Shell
# Chiave di produzione (consuma quota mensile)sp_live_9a8b7c6d5e4f...
# Chiave Sandbox (gratuita, nessun consumo)sp_test_1a2b3c4d5e6f...

End-to-End Image Processing & Edge CDN Flow

Sub-50ms image optimization lifecycle from client upload to global edge delivery.

  1. 01

    Client Application

    WordPress / SDK / API

    Uploads raw image binary with HMAC-SHA256 signature and UUID v4 idempotency key.

    Origin Request

  2. 02

    smallPict Edge CDN

    Global Edge PoPs

    Checks global edge cache. On cache HIT, delivers AVIF/WebP in <20ms worldwide.

    Cache & Delivery

  3. 03

    SmallPict API Gateway

    Authentication & Quotas

    Validates HMAC credentials, verifies quota limits, and scopes access to customer_id.

    Auth & Scoping

  4. 04

    Optimization Engine

    High-Speed Native Encoder

    Multi-threaded quantization transcode to AVIF & WebP with no visible quality loss and much smaller files.

    Transcoding

  5. 05

    Secure Storage & Sync

    Encrypted Cloud Storage

    Stores optimized output, invalidates outdated cache tags, and warms the edge cache.

    Persistent Sync

Zero Data Interception: End-to-end HMAC validation & SHA256 integrity check

Engine: smallPict


Esempio in Node.js / TypeScript

TypeScript
import { SmallPictClient } from "@smallpict/sdk";
const client = new SmallPictClient({  apiKey: process.env.SMALLPICT_TEST_KEY || "sp_test_sandbox_secret_key"});
async function runIntegrationTest() {  const result = await client.optimize({    file: "./test-fixtures/large-banner.jpg",    format: "avif",    quality: 80  });
  console.log("Stato test:", result.status); // "completed"  console.log("Risparmio ottenuto:", result.savingsPercentage); // ~85%  console.log("URL generato nel sandbox:", result.url);}
runIntegrationTest();

Regole del Sandbox

  1. Nessun addebito di quota: Le risposte includono l'intestazione X-Sandbox-Mode: true.
  2. Conservazione di 24 ore: I file di test vengono rimossi in automatico dopo 24 ore.
  3. Limite di frequenza: Fino a 60 richieste al minuto per singolo indirizzo IP.