Model ID
Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.
Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.
- Third-party
Topaz Labs Gigapixel Standard 2 is a general-purpose precision image upscaler that balances detail, sharpness, and noise reduction while staying true to the source. It is the recommended default for photos, graphics, and print, with optional face recovery.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing |
|
const response = await env.AI.run(
'topaz/gigapixel-standard-2',
{
image: 'https://tile.loc.gov/storage-services/service/pnp/ppmsca/13300/13397r.jpg',
output_format: 'jpeg',
output_width: 1900,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "topaz/gigapixel-standard-2",
"input": {
"image": "https://tile.loc.gov/storage-services/service/pnp/ppmsca/13300/13397r.jpg",
"output_format": "jpeg",
"output_width": 1900
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/topaz/gigapixel-standard-2/poster-upscale.jpeg"
}
}Small Photo Upscale — Upscale a 640-pixel photo 4x to 2560 pixels wide. Standard 2 picks its own enhancement settings, so none are needed. Photo: NASA.
const response = await env.AI.run(
'topaz/gigapixel-standard-2',
{
image:
'https://images-assets.nasa.gov/image/KSC-20260313-PH-JBS01_0157/KSC-20260313-PH-JBS01_0157~small.jpg',
output_format: 'jpeg',
output_width: 2560,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "topaz/gigapixel-standard-2",
"input": {
"image": "https://images-assets.nasa.gov/image/KSC-20260313-PH-JBS01_0157/KSC-20260313-PH-JBS01_0157~small.jpg",
"output_format": "jpeg",
"output_width": 2560
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/topaz/gigapixel-standard-2/small-photo-upscale.jpeg"
}
}Thumbnail Portrait — Upscale a 127-pixel thumbnail of an 1863 portrait 6x to 762 pixels wide. Face recovery rebuilds a sharp face where a plain upscale smears it. Photo: Alexander Gardner, via the Library of Congress (no known restrictions).
const response = await env.AI.run(
'topaz/gigapixel-standard-2',
{
face_enhancement: true,
face_enhancement_creativity: 0.2,
face_enhancement_strength: 0.8,
image: 'https://tile.loc.gov/storage-services/service/pnp/ppmsca/19300/19301_150px.jpg',
output_format: 'jpeg',
output_width: 762,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "topaz/gigapixel-standard-2",
"input": {
"face_enhancement": true,
"face_enhancement_creativity": 0.2,
"face_enhancement_strength": 0.8,
"image": "https://tile.loc.gov/storage-services/service/pnp/ppmsca/19300/19301_150px.jpg",
"output_format": "jpeg",
"output_width": 762
}
}'{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/topaz/gigapixel-standard-2/thumbnail-portrait.jpeg"
}
}image
stringrequiredSource image as a public HTTPS URL or a base64 data URI (JPEG, PNG, or TIFF)output_width
integerminimum: 1maximum: 32000Desired output width in pixels. If only one dimension is set, the other scales proportionally. If neither is set, the source resolution is kept (enhancement without upscaling)output_height
integerminimum: 1maximum: 32000Desired output height in pixels. If only one dimension is set, the other scales proportionally. If neither is set, the source resolution is kept (enhancement without upscaling)output_format
stringrequireddefault: jpegenum: jpeg, png, tiffFormat of the upscaled imagecrop_to_fill
booleanCrop to fill the requested dimensions instead of letterboxing when the aspect ratio differsface_enhancement
booleanRun face recovery on detected facesface_enhancement_strength
numberminimum: 0maximum: 1Strength of face recoveryface_enhancement_creativity
numberminimum: 0maximum: 1Face recovery style, from realistic (0) to creative (1)subject_detection
stringenum: foreground, background, allWhere enhancements are appliedsharpen
numberminimum: 0maximum: 1Amount of additional sharpeningdenoise
numberminimum: 0maximum: 1Amount of noise reductionfix_compression
numberminimum: 0maximum: 1Amount of compression-artifact reductionimage
stringformat: uriTime-limited presigned URL to the upscaled image