Use Alibaba Wanx API to convert image to a different style, say Ghibli.
Notice: this API may be restricted to Mainland China only.
Use fastapi for API endpoints, and showapi for API rate limitaion.
-
Accquire an api-key from
aliyun bailian console, and set the api-key in .env -
Setup python environment by running:
python -m venv .venv && source .venv/bin/activate -
Install the requirments by:
pip install -r requirements.txt -
Start the fastapi web server:
fastapi dev main.py -
you should see results like:
{
"result": "success",
"result_image_url": "https://dashscope-result-wlcb.oss-cn-wulanchabu.aliyuncs.com/1d/5a/20250402/81750fc9/20250402135400426812_refstyle_o7penmv13r.jpg?Expires=1743659644&OSSAccessKeyId=LTAI5tQZd8AEcZX6KZV4G8qL&Signature=eKgJ2Ws6RY4TD51NF5pxxbIuQV0%3D"
}