放大圖片接口 Python Demo curl -d '{"style": "art", "noise": "3", "x2": "1", "input": "YOUR_IMAGE_URL"}' \ -H 'X-API-KEY:' \ https://bigjpg.com/api/task/ import requests import json data = { 'style': 'art', 'noise': '3', 'x2': '1', 'file_name': 'small.jpg', 'input': 'YOUR_IMAGE_URL' } r = requests.post( url='https://bigjpg.com/api/task/', headers={'X-API-KEY': ''}, data=json.dumps(data) ) print(r.json()) - 參數是JSON 格式 - style 參數有 'art', 'photo' 分別表示 '卡通插畫', '照片' - noise 參數有 '-1', '0', '1 ', '2', '3' 分別表示降噪程度 '無', '低', '中', '>高', '最高' - x2 參數有 '1', '2', ' 3', '4' 分別表示 2x, 4x, 8x, 16x - input 參數是需要放大的圖片鏈接 放大結果查詢接口 Python Democurl https://bigjpg.com/api/task/tid1,tid2,tid3,tid100 import requests r = requests.get(url='https://bigjpg.com/api/task/tid1,tid2,tid3,tid100') print(r.json()) - 黃顏色參數是上面放大圖片接口返回的任務id 任務重試接口 Python Democurl -X POST https://bigjpg.com/api/task/tid1,tid2,tid3,tid100 import requests r = requests.post(url='https://bigjpg.com/api/task/tid1,tid2,tid3,tid100') print(r.json()) - 黃顏色參數是上面放大圖片接口返回的任務id (责任编辑:) |