Issue upscaling image with BIGJPG API

Hello,

I am trying to enlarge animage with BIGJPG but I have an issue with an API request.
Please find below the documentation of BIGJPG API.

Enlarge API  

    curl -d '{"style": "art", "noise": "3", "x2": "1", "input": "YOUR_IMAGE_URL"}' \
         -H 'X-API-KEY:Myapikey' \
         https://bigjpg.com/api/task/


- JSON format
- style can be 'art', 'photo' which means 'cartoon illustration', 'photo'
- noise can be '-1', '0', '1', '2', '3' which means 'None', 'Low, 'Medium', 'High', 'Highest'
- x2 can be '1', '2', '3', '4' which means 2x, 4x, 8x, 16x
- input your enlarge image url

When i am using the upscale x1 or x2 it does work, but with x3 or x4 i have a “param_error”.

[
    {
        "statusCode": 200,
        "headers": [
            {
                "name": "date",
                "value": "Wed, 10 Apr 2024 19:30:05 GMT"
            },
            {
                "name": "content-type",
                "value": "application/json; charset=UTF-8"
            },
            {
                "name": "content-length",
                "value": "25"
            },
            {
                "name": "connection",
                "value": "close"
            },
            {
                "name": "server",
                "value": "YUNKD/WAF 2.0.6"
            },
            {
                "name": "cache-control",
                "value": "no-cache"
            },
            {
                "name": "x-cache-status",
                "value": "MISS"
            }
        ],
        "cookieHeaders": [],
        "data": {
            "status": "param_error"
        },
        "fileSize": 25
    }
]

It does work when I do the API request from my console, but in Make.com it doesn’t work.
I contacted the support of BIGJPG and for them, it seems to be an issue on Make.com.

Any ideas ?

Thank you for your help !

Have a great evening :slight_smile:

Froz

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hello @samliew,

Thank you for you advise, please find below:

1. Screenshots of module fields and filters

I am just running a test scenario to identify the problem:
Capture d’écran 2024-04-11 à 08.47.22

2. Scenario blueprint

blueprint (1).json (9.9 KB)

3. Output bundles

A. Successful output Bundle:

Sucess.txt (1.0 KB)

B. Error output Bundle:

Error.txt (952 Bytes)

Just to sum up, the issue I have is when i change the upscale value. It does work for x1 et x2 but doesn’t for x3 and x4.

Hope someone has this issue or can help me resolve that :slight_smile:

Have a great day !

The numbers are not the multiplication/upscale factor. It is simply the option ID.

The accepted option values are only 1, 2, 3, and 4.

1 & 2 are available on the free tiers, and 3 & 4 are only available for the paid tiers. It is likely failing because you are not on a subscription.

Please refer to the API tab as to what upscale IDs correspond to which upscale multiplier.

I.e.: If you want an upscale of 4x, you need to be using the option ID “2”

2 Likes

Thank you for your fast reply.
Yes I understood the option values, but thanks for the reminder.

It could make sense but I am in the Standard Plan, which normally should give me access to the full upscale:

Furthermore, I made a curl request in my terminal, with the same parameters and it does work, but still not working on my module on make.

It might be that the service could not access the image URL to download the image for processing. Try switching to the U.S. server under the Settings tab.

If this continues to fail, I’m out of ideas. You should contact their support at i@bigjpg.com to report the bug.

2 Likes

Thanks @samliew for your lead.

I felt that there was something weird considering the fact that it was working on the terminal but not on make. And by checking the location server I found the root cause. It wasn’t because of the server but the keychain implemented in my http module. I guess i was using the API-key from my free plan…

Thank you ! :slight_smile:

3 Likes