API reference · Topaz Labs

topaz/upscale/image

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

IMAGEAsyncOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDtopaz/upscale/image
01

Input Schema

18 parameters · 2 required · 16 optional

ParameterTypeRequiredDescription
imagestringRequiredUrl of the image to be upscaled · Min length: 1
promptstringRequiredText prompt to guide generative upscaling (max 1024 chars). Applies to Redefine model only. · Max length: 1024
detailnumberOptionalDetail recovery level (0.0-1.0). Applies to Recovery V2 model only. · Min: 0 · Max: 1
denoisenumberOptionalDenoising level (0.0-1.0). Applies to Standard V2, Low Resolution V2, CGI, High Fidelity V2, Text Refine, and Redefine models. · Min: 0 · Max: 1
sharpennumberOptionalSharpening level (0.0-1.0). Applies to Standard V2, Low Resolution V2, CGI, High Fidelity V2, Text Refine, and Redefine models. · Min: 0 · Max: 1
textureintegerOptionalTexture detail level for generative upscaling (1-5). Applies to Redefine model only. · Min: 1 · Max: 5
strengthnumberOptionalEnhancement strength (0.01-1.0). Applies to Text Refine model only. · Min: 0.01 · Max: 1
autopromptbooleanOptionalEnable automatic prompt generation for generative upscaling. Applies to Redefine model only.
creativityintegerOptionalCreativity level for generative upscaling (1-6). Higher values produce more creative/hallucinated details. Applies to Redefine model only. · Min: 1 · Max: 6
crop_to_fillbooleanOptionalDefault: false
output_formatstringOptionalOutput format of the upscaled image. · Options: jpeg, png · Default: "jpeg"
jpegpng
upscale_factornumberOptionalFactor to upscale the image by (e.g. 2.0 doubles width and height) · Min: 1 · Max: 4 · Default: 2
fix_compressionnumberOptionalCompression artifact removal level (0.0-1.0). Applies to Standard V2, Low Resolution V2, High Fidelity V2, and Text Refine models. · Min: 0 · Max: 1
face_enhancementbooleanOptionalWhether to apply face enhancement to the image. Applies to standard enhance and Recovery V2 models. · Default: true
enhancement_modelstringOptionalModel to use for image enhancement. · Options: Low Resolution V2, Standard V2, CGI, High Fidelity V2, Text Refine, Recovery, Redefine, Recovery V2, Standard MAX, Wonder · Default: "Standard V2"
Low Resolution V2Standard V2CGIHigh Fidelity V2Text RefineRecoveryRedefineRecovery V2Standard MAXWonder
subject_detectionstringOptionalSubject detection mode for the image enhancement. Applies to standard enhance and Recovery V2 models. · Options: All, Foreground, Background · Default: "All"
AllForegroundBackground
face_enhancement_strengthnumberOptionalStrength of the face enhancement. 0.0 means no enhancement, 1.0 means maximum enhancement. Ignored if face enhancement is disabled. · Min: 0 · Max: 1 · Default: 0.8
face_enhancement_creativitynumberOptionalCreativity level for face enhancement. 0.0 means no creativity, 1.0 means maximum creativity. Ignored if face enhancement is disabled. · Min: 0 · Max: 1 · Default: 0
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "topaz/upscale/image",
  "image": "https://static.sandbase.ai/examples/topaz/upscale/image/input_image_0.jpeg",
  "crop_to_fill": false,
  "output_format": "jpeg",
  "upscale_factor": 2,
  "face_enhancement": true,
  "enhancement_model": "Standard V2",
  "subject_detection": "All",
  "face_enhancement_strength": 0.8,
  "face_enhancement_creativity": 0,
  "prompt": "a beautiful sunset over mountains"
}'

# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
  -H "Authorization: Bearer YOUR_API_KEY"