⌘K

Tencent MPS Image Super Resolution

tencent_mps_image_super_resolution

Upscale a single image through an asynchronous task, with a configurable scale factor and JPEG output.

API Notes

tencent_mps_image_super_resolution processes one input image per asynchronous task and returns one upscaled image

percent is a scale factor: 2 means 2x, not 2%

tencent_mps_image_super_resolution outputs JPEG images at a fixed quality of 80

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

The request body has two top-level fields, model and input. Place image parameters in input[0].params

model string required

Model ID for the request

Value: tencent_mps_image_super_resolution


input array required

Input list containing exactly one object

params object required

Image processing parameters

input_url string required

HTTP(S) URL of the input image. The server must be able to access it directly, and the URL must remain valid during processing

Example: https://example.com/input-image.webp

percent number

Image scale factor

Default: 2

Range: 1-10

Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Create a task with POST /model/v1/generation and query it with GET /model/v1/generation/task/{task_id}. Use the id from the creation response in the query path

Even if the creation response contains status: "completed", it only indicates that the creation request completed. Check the query response’s status and output to determine whether the image is ready

A polling interval of 5 seconds is recommended. Continue waiting on in_progress; read output[].content[] when the status is completed and an image result is present. Stop polling and inspect error on failed. Processing time varies with the image and service load

Response Format

The right panel shows creation, processing and successful query examples. Task IDs and image URLs are placeholders; replace them with your own values

id string

Platform task ID used to query this task


created_at integer

Task creation time as a Unix timestamp in milliseconds


status string

Query status: in_progress, completed or failed


model string

Model ID used for the request


output array

Image results returned by a successful query, located at output[].content[]

content array

Image content list

type string

Value: image

url string

Result image download URL. It may include signature parameters; preserve the complete URL and download the image promptly. Do not assume permanent availability

size string

Actual output dimensions in widthxheight format

Example: 1280x1686


usage object

Usage and pricing information returned by a successful query

FieldTypeDescription
output_widthintegerActual output width in pixels
output_heightintegerActual output height in pixels
output_image_countintegerOutput image count, 1
image_countintegerImage count, 1
quantitynumberBillable quantity, 1 image
unit_pricestringPer-image price of the selected tier in USD
coststringPricing amount returned for this task in USD
user_discountnumberCompatibility field; do not use it to recalculate the final discount. 0 does not mean free
input_tokens / output_tokens / total_tokensnumber or nullThis model is billed per image; these fields are null in the example
extra_infoobject or nullAdditional information; null in the example

The example amounts come from one test and are not a fixed quote. Refer to your platform bill for the final posted charge


error object

Error information on failure. Read error.message; if error.code is present, include it when troubleshooting. Do not branch on the illustrative error message below

Example failed query structure (the error message is illustrative):

{
  "id": "task_id",
  "created_at": 1790664422443,
  "status": "failed",
  "model": "tencent_mps_image_super_resolution",
  "error": {
    "message": "Image processing failed"
  }
}

Billing

The tier is selected from the actual output image’s short edge, s = min(output_width, output_height). Each successful output has a quantity of 1 image

TierOutput short edge s (pixels)
720p0 < s <= 720
1080p720 < s <= 1080
2K1080 < s <= 1440
4K1440 < s <= 2160
8K2160 < s <= 4320

For example, a 1280x1686 output has a short edge of 1280, selecting the 2K tier with a quantity of 1 image. Tier names are pricing categories, not fixed output dimensions

Prices, exchange rates and account discounts follow platform configuration and billing. Current pricing coverage extends to an output short edge of 4320 pixels. This is not a statement of the model’s capability limit; pricing for larger outputs requires separate confirmation