Upscale Image

Upscales the resolution of a selected photo.

This operation costs 3 credits.

Endpoint

POST /api/images/upscale

Parameters

Parameter
Type
Required
Description

image_id

string

Yes

The identifier of the selected image.

callback

string

No

A URL that will be called when the prompt is done processing. If not provided, the endpoint will run in sync mode and return the response when the image generation is complete.

Callback

The callback parameter behaves similarly to the "generate image" endpoint.

Request Example

curl -X POST "https://api.deepmode.ai/api/images/upscale" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SECRET_API_KEY" \
-d '{
  "image_id": "c6b8a9f7e5d1c3a2f91e3"
}'

Response

Upon successful upscaling, the API returns the following response:

// Response for request in async mode (i.e. callback provided)
{"message": "Upscaling images..."}

// Response for request in sync mode & for callback in async mode
{
  "id": "c6b8a9f7e5d1c3a2f91e3",
  "file_name": "120e453f-3a73-4016-ad6a-5cd5e00ddd45.jpeg",
  "model_id": "a9f7e5d1c3a2f91e3d5c6",
  "image_url": "https://deepmodeimage.blob.core.windows.net/deepmode-user-image/120e453f-3a73-4016-ad6a-5cd5e00ddd45.jpeg?st=2024-04-29T14%3A28%3A02Z&se=2024-04-29T15%3A28%3A02Z&sp=r&sv=2023-11-03&sr=b&sig=NaLrBA8mqrBMiFL1e9gCbuQAvgEMmG39D6iyHkbuy2E%3D",
  "prompt": "A beautiful landscape with mountains and a river.",
  "negative_prompt": "rainy, foggy",
  "upscaled": true,
  "ratio": "square"
}

Last updated