curl https://api.yingtu.ai/v1/task/submit \
-H 'Authorization: Bearer $YINGTU_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-3.1-flash-image",
"input": {
"prompt": "Minimal ceramic product photo, soft shadows",
"aspect_ratio": "4:3",
"resolution": "2K"
}
}'
import os, requests
task = requests.post(
"https://api.yingtu.ai/v1/task/submit",
headers={"Authorization": f"Bearer {os.environ['YINGTU_API_KEY']}"},
json={
"model": "gemini-3.1-flash-image",
"input": {
"prompt": "Minimal ceramic product photo, soft shadows",
"aspect_ratio": "4:3",
"resolution": "2K",
},
},
timeout=30,
).json()
const task = await fetch("https://api.yingtu.ai/v1/task/submit", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.YINGTU_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gemini-3.1-flash-image",
input: {
prompt: "Minimal ceramic product photo, soft shadows",
aspect_ratio: "4:3",
resolution: "2K",
},
}),
}).then((response) => response.json());
Always inspect the returned asset’s MIME type instead of assuming PNG.