Reframing
Cornice
Brings an existing still image into a new format — outpainting for gentle aspect changes or recompose for radical format jumps. Text, fonts, logos and subjects stay pixel-perfect.
Pricing
Image Reframe
- + Additional Variant7,500Credits
- + Custom Prompt7,500Credits
/v1/cornice/reframeBrings an existing still image to exactly the requested pixel size. Response: signed download URLs (valid 3h) with width and height per image. Supports up to 3 variants per request; failed variants are listed in failed and not charged.
Parameter
sourceImagestringYesMaster image to be brought into the new format — JPEG, PNG, WebP, GIF (URL, Base64 or Data URI, max 10 MB)
targetWidthnumberYesTarget width in pixels (64–8192). Every delivered file has exactly this size: Cornice generates in a matching supported aspect ratio, scales uniformly and crops the overflow. Never distorted; Cornice keeps text and logos out of the crop.
targetHeightnumberYesTarget height in pixels (64–8192). Every delivered file has exactly this size; the response lists width and height per image.
modestringOptionalReframe strategy. "extend" (default): outpaint/crop — original pixels stay centered, edges are extended symmetrically. "recompose": re-stage — subject is repositioned, background is rebuilt. Recommended for large aspect jumps.
promptstringOptionalOptional targeted instruction ("make it darker", "remove the chair on the left"). The protection rules remain strict — only what the prompt explicitly asks for is changed. Surcharge: 7,500 credits.
variantsnumberOptionalNumber of variants (1–3, default: 1). Each additional variant: 7,500 credits. Variants run in parallel — no additional latency.
Request
curl -X POST "https://api.centra.dbpg.io/v1/cornice/reframe" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"sourceImage": "https://example.com/master.jpg",
"targetWidth": 1792,
"targetHeight": 1024,
"mode": "extend",
"variants": 2
}'Response
{
"images": [
{
"url": "https://<signierte-download-url>/cornice/....png?...",
"variant": 1,
"width": 1792,
"height": 1024,
"expiresAt": "2026-06-05T18:30:12.345Z"
},
{
"url": "https://<signierte-download-url>/cornice/....png?...",
"variant": 2,
"width": 1792,
"height": 1024,
"expiresAt": "2026-06-05T18:30:13.987Z"
}
],
"count": 2,
"attempted": 2,
"model": "cornice-v1",
"mode": "extend",
"target": {
"width": 1792,
"height": 1024,
"nativeAspect": "16:9",
"imageSize": "2K"
},
"usage": {
"credits_used": 30000,
"remaining_balance": 7741456
}
}Attribution
- Powered in part by Google AI
- Generated content contains digital watermarks (SynthID)