Skip to content
Developer API

Build AI image enhancement into your product

A REST API for AI enhancement (smooth-skin, upscale, auto-enhance, background removal) with first-class outbound webhooks. Authenticate with an API key and receive signed events when jobs finish.

Authentication

Every request is authenticated with an API key passed in the x-api-key header. Create and manage keys from your dashboard. Keys are shown in full only once — store them securely.

curl https://pickimg.com/api/ai/enhance \
  -H "x-api-key: pk_xxxxxxxx.your_secret_here"

AI enhancement

POST/api/ai/enhanceCreate an enhancement job
GET/api/ai/enhance/:idGet job status & result
GET/api/ai/enhanceList your jobs

Operations: smooth_skin, upscale, auto_enhance, bg_remove. level: low | medium | high.

curl -X POST https://pickimg.com/api/ai/enhance \
  -H "x-api-key: pk_xxxxxxxx.your_secret_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceUrl": "https://cdn.example.com/photo.jpg",
    "operation": "smooth_skin",
    "level": "medium"
  }'

# Response
{ "id": "job_123", "status": "queued", "operation": "smooth_skin" }
// Node.js
const res = await fetch("https://pickimg.com/api/ai/enhance", {
  method: "POST",
  headers: {
    "x-api-key": process.env.PICKIMG_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ sourceUrl, operation: "upscale" }),
});
const job = await res.json();

Webhooks

Register endpoints to receive events when jobs complete. Each delivery is signed so you can verify authenticity.

GET/api/webhooks/eventsList available event types
POST/api/webhooks/endpointsCreate an endpoint
GET/api/webhooks/deliveriesInspect delivery attempts

Events: enhancement.queued, enhancement.completed, enhancement.failed, image.uploaded, quota.exceeded, ping.

Verifying the signature

Deliveries include an X-PickIMG-Signature header formatted as t=<timestamp>,v1=<hmac>, where the HMAC-SHA256 is computed over <timestamp>.<raw-body>.

import crypto from "crypto";

function verify(rawBody, header, secret) {
  const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${t}.${rawBody}`)
    .digest("hex");
  return crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}

Rate limits & quotas

Requests and monthly AI enhancements are metered per plan. When a quota is exceeded the API returns 403 with an upgrade hint. See pricing.