1224 条记录
52 私有链接
52 私有链接
1 条结果
标签
画图
flux画图逆向
import requests
import json
url = 'https://flux1.art/api/image/generateImage'
headers = {
'authority': 'flux1.art',
'accept': '*/*',
'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'content-type': 'text/plain;charset=UTF-8',
# 'cookie': '__Host-next-auth.csrf-token=8cba3e68065bee524a115f8f4cb3b8b68e695bc6613b5825c179cdfc30f80ab8%7C74211afd55d82f4455b3b889113f00d066959b4c80390b1c44085fe150a84a39; __Secure-next-auth.callback-url=https%3A%2F%2Fflux1.art',
'origin': 'https://flux1.art',
'referer': 'https://flux1.art/',
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36'
}
data = {
"textStr": "puppy",
"model": "black-forest-labs/flux-schnell",
"aspect_ratio": "1:1"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.status_code)
print(response.text)