Docs
Super Resolution(Upscale) API

Super Resolution (Upscale) API

Documentation on our Super Resolution API!

API Spec

Using unified Create and Fetch API in Image Editing API.

Request task_input

{
    "task_input": {
        "image": "https://example.com/cat.jpg", //the url of the image that you want to upscale, both width and height of the image should be no more than 2048 pixels
        "scale": 2 //upscale factor, can only set to be 2,4,8
    }
}

Response task_output

{
    "task_output": {
        "image_base64": "",
        "image_url": "https://img.midjourneyapi.xyz/temp/c8dd89d1-1d5f-47e1-8649-bb0155fbc5d9.png"
    }
}

Request Example


curl --location 'https://api.goapi.ai/api/image_toolkit/v2/create' \
--header 'X-API-KEY: {YOUR_API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
    "task_type": "upscale",
    "result_type": "url",
    "task_input": {
        "image": "https://example.com/cat.jpg",
        "scale": 2
    }
}'

Response Example


{
    "code": 200,
    "data": {
        "task_id": "40307027-c713-4314-9c29-49e7f591742c",
        "task_type": "upscale",
        "status": "success",
        "task_info": {
            "created_at": "2024-03-19T09:38:59.975840Z",
            "started_at": "2024-03-19T01:39:40.428051Z",
            "completed_at": "2024-03-19T01:39:42.688459Z",
            "frozen_credits": 0,
            "task_input": {
                "image": "https://example.com/cat.jpg",
                "scale": 2
            }
        },
        "task_result": {
            "used_credits": 0,
            "error_messages": [],
            "task_output": {
                "image_base64": "",
                "image_url": "https://img.midjourneyapi.xyz/temp/c8dd89d1-1d5f-47e1-8649-bb0155fbc5d9.png"
            }
        }
    },
    "message": "success"
}