AI Reframe
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
22,500Credits
Image Reframe+7,500Additional Variant
+7,500Custom Prompt
POST
/v1/cornice/reframeBrings an existing still image to a new aspect ratio. Response: Pre-signed S3 URLs (valid 3h). Supports up to 3 variants per request.
Parameter
| Name | Type | Status | Description |
|---|---|---|---|
sourceImage | string | Yes | Master image to be brought into the new format — JPEG, PNG, WebP, GIF (URL, Base64 or Data URI, max 10 MB) |
targetWidth | number | Yes | Target width in pixels (64–8192). Cornice internally picks the closest Gemini aspect ratio. |
targetHeight | number | Yes | Target height in pixels (64–8192). Cornice internally picks the closest Gemini aspect ratio. |
mode | string | Optional | Reframe 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. |
prompt | string | Optional | Optional 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. |
variants | number | Optional | Number 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-live-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://...s3.amazonaws.com/cornice/....png?...",
"variant": 1,
"expiresAt": "2026-06-05T18:30:12.345Z"
},
{
"url": "https://...s3.amazonaws.com/cornice/....png?...",
"variant": 2,
"expiresAt": "2026-06-05T18:30:13.987Z"
}
],
"count": 2,
"attempted": 2,
"model": "cornice-v1",
"mode": "extend",
"target": {
"width": 1792,
"height": 1024,
"nativeAspect": "16:9"
},
"usage": {
"credits_used": 30000,
"remaining_balance": 7741456
}
}Attribution
- Powered in part by Google AI
- Generated content contains digital watermarks (SynthID)