Requests must be signed server-side. Once signed, the URL works as a standard CDN resource.
<img src="https://img.arible.co/cyberpunk%20detective.webp?sig=...&expires=..." alt="Generated Asset" />
URL Structure: GET /<prompt>.<ext>
const crypto = require('crypto');
function signUrl(prompt, ext = 'webp', seed = 67) {
const HOST = "https://img.arible.co";
const path = `/${encodeURIComponent(prompt)}.${ext}`;
const expires = Math.floor(Date.now() / 1000) + 3600;
// Format: path:expires:seed
const payload = `${path}:${expires}:${seed}`;
const signature = crypto.sign(null,
Buffer.from(payload),
crypto.createPrivateKey(process.env.PRIVATE_KEY)
).toString('hex');
return `${HOST}${path}?sig=${signature}&expires=${expires}&seed=${seed}`;
}
import time, urllib.parse
from cryptography.hazmat.primitives import serialization
def sign_url(prompt, private_key_pem, ext="webp", seed=67):
path = f"/{urllib.parse.quote(prompt)}.{ext}"
expires = int(time.time()) + 3600
payload = f"{path}:{expires}:{seed}".encode('utf-8')
priv_key = serialization.load_pem_private_key(
private_key_pem.encode(),
password=None
)
signature = priv_key.sign(payload).hex()
return f"https://img.arible.co{path}?sig={signature}&expires={expires}&seed={seed}"
Cache-Control: immutable. Repeated requests for same prompt+seed are zero cost.Ready to subscribe? Generate your own key pair.
Email us the PUBLIC KEY. Keep the PRIVATE KEY on your server.