Hi!
I’m trying to connect to an API that will allow me to resize generated images using the HTTP make a request.
The API documentation is here (http://bigjpg.com/)) and instructs me to use this code:
To Enlarge API
curl F ‘conf={“style”: “art”, “noise”: “3”, “x2”: “1”, “input”: “YOUR_IMAGE_URL”}’
-H ‘X-API-KEY:“YOUR API KEY”’
https://bigjpg.com/api/task/
conf is 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
I have filled out the fields for the HTTP make a request module as outlined in the attached screenshots and the inputs and output are as follows:
INPUT:
Bundle 1Collection
Self-signed certificate empty
Query StringArray
Empty
URL https://bigjpg.com/api/task/
Request content {
“style”: “art”,
“noise”: “1”,
“x2”: “4”,
“input”: “https://oaidalleapiprodscus.blob.core.windows.net/private/org-TAWtSCfHzot3xJG7ZjrrhiAX/user-MaDMTUnPnKsvPiwb1SuqTnM3/img-WogKZgoG9nJhLkSITL7tsCyb.png?st=2023-04-01T23%3A34%3A20Z&se=2023-04-02T01%3A34%3A20Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-04-01T19%3A44%3A28Z&ske=2023-04-02T19%3A44%3A28Z&sks=b&skv=2021-08-06&sig=nKn9n4HcSwQUwYszVaOlewg64NR7RkIHZIAXcr21YiY%3D”
}
Request compressed content true
Method post
HeadersArray
1Collection
name x-api-key
value MY API KEY
Timeout empty
Use Mutual TLS false
Password empty
User name empty
Body type raw
Content type application/json
Serialize URL false
Share cookies with other HTTP modules false
Parse response true
Follow redirect true
Disable serialization of multiple same query string keys as arrays false
Follow all redirect false
Reject connections that are using unverified (self-signed) certificates true
OUTPUT:
Bundle 1Collection
Status code 200
HeadersArray
1Collection
name server
value nginx
2Collection
name date
value Sun, 02 Apr 2023 00:34:21 GMT
3Collection
name content-type
value application/json; charset=UTF-8
4Collection
name content-length
value 25
5Collection
name connection
value close
Cookie headersArray
Empty
DataCollection
status param_error
fileSize 25
As you can see I am received a 200 param_error, which seems to indicate that some of the process if correct but some parameters are wrong.
I’ve tried different URLS for the image for {{68.data.url}}(however I’m not sure if I am inputting it in the proper formatting).
Also I have hidden / replaced my API key here with MY API KEY, however I assure you that I have entered the API key into the module.
Is there any suggestion you have to make this work?
When asking your question, please include:
The steps you have taken
Relevant screenshots
Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
Exclude Personal Information.