Fooocus Image Prompt
इंटीग्रेट करें
fooocus/image-prompt
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/fooocus/image-prompt?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/fooocus/image-prompt?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
},
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fooocus/image-prompt", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/hi/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "fooocus/image-prompt",
"input": {
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
}
Fooocus Image Prompt मॉडल (fooocus/image-prompt) को Doitong API के ज़रिए कॉल करें। एजेंट के लिए दस्तावेज़: https://doitong.com/hi/developers/models/fooocus/image-prompt.md
POST https://api.doitong.com/v1/run/fooocus/image-prompt?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
यदि रिस्पॉन्स स्टेटस "queued" या "running" है, तो GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20 को तब तक पोल करें जब तक यह "succeeded" न हो जाए; फ़ाइलें outputs[].url में हैं। उसी बॉडी के साथ POST https://api.doitong.com/v1/quote/fooocus/image-prompt चलाने से रन से पहले सटीक कीमत मिलती है।
यह अनुरोध: ≈$0.085 85 API क्रेडिट इसे इस पेज पर चलाएँ
आपकी नई API कुंजी। यह केवल अभी दिखाया गया है और कोड तथा नीचे दिए गए API कुंजी फ़ील्ड में पहले से मौजूद है। इसे गुप्त रखें: इसे कभी भी ब्राउज़र में चलने वाले कोड में न डालें।
आपका पहला परिणाम यहाँ आएगा
नीचे एक अनुरोध बनाएँ और उसे अपनी API कुंजी से चलाएँ। आउटपुट हमारे स्टोरेज में कॉपी किए जाते हैं और हमेशा के लिए या 7 दिन तक मुफ़्त में रखे जाते हैं।
अनुरोध बनाएँ
कंट्रोल मॉडल स्कीमा से जनरेट होते हैं। इन्हें बदलने पर कोड और कीमत अपडेट होती है।
/run/fooocus/image-prompt?wait=20
कोटेशन → $0.085
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/fooocus/image-prompt?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/fooocus/image-prompt?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
},
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/fooocus/image-prompt", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "fooocus/image-prompt",
"input": {
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
},
"wait_seconds": 20
}
}
}
यह अनुरोध चलाएँ
आपकी key इसी ब्राउज़र में रहती है: इसे केवल Doitong API को भेजा जाता है और केवल तभी (localStorage) में सेव किया जाता है जब आप Remember चुनते हैं। API कुंजी प्राप्त करें
Fooocus Image Prompt के बारे में
टेक्स्ट `prompt` के साथ निर्माण को नियंत्रित करने के लिए `image_prompt_1` (आवश्यक) और अधिकतम तीन अतिरिक्त इमेज प्रॉम्प्ट का उपयोग करता है। यह `inpaint_mode` के साथ इनपेंटिंग और आउटपेंट दिशाएँ, तथा बदलाव या अपस्केल के लिए `uov_method` भी उपलब्ध कराता है। स्टाइल प्रीसेट, LoRAs, `performance` modes और प्रत्येक अनुरोध पर 1 से 4 आउटपुट समर्थित हैं।
पैरामीटर
कैनोनिकल नाम या नेटिव नाम में से कोई एक भेजें, दोनों नहीं। कैनोनिकल नाम
promptवैकल्पिक
negative_promptवैकल्पिक
stylesवैकल्पिक
performanceवैकल्पिक
guidance_scaleवैकल्पिक
sharpnessवैकल्पिक
aspect_ratioवैकल्पिक
num_imagesवैकल्पिक
num_outputs
lorasवैकल्पिक
loras[].pathआवश्यक
loras[].scaleवैकल्पिक
refiner_modelवैकल्पिक
refiner_switchवैकल्पिक
output_formatवैकल्पिक
seedवैकल्पिक
image_prompt_1आवश्यक
image_prompt_1.typeवैकल्पिक
image_prompt_1.image_urlवैकल्पिक
image_prompt_1.stop_atवैकल्पिक
image_prompt_1.weightवैकल्पिक
image_prompt_2वैकल्पिक
image_prompt_2.typeवैकल्पिक
image_prompt_2.image_urlवैकल्पिक
image_prompt_2.stop_atवैकल्पिक
image_prompt_2.weightवैकल्पिक
image_prompt_3वैकल्पिक
image_prompt_3.typeवैकल्पिक
image_prompt_3.image_urlवैकल्पिक
image_prompt_3.stop_atवैकल्पिक
image_prompt_3.weightवैकल्पिक
image_prompt_4वैकल्पिक
image_prompt_4.typeवैकल्पिक
image_prompt_4.image_urlवैकल्पिक
image_prompt_4.stop_atवैकल्पिक
image_prompt_4.weightवैकल्पिक
inpaint_image_urlवैकल्पिक
mask_image_urlवैकल्पिक
inpaint_modeवैकल्पिक
inpaint_additional_promptवैकल्पिक
outpaint_selectionsवैकल्पिक
mixing_image_prompt_and_inpaintवैकल्पिक
uov_image_urlवैकल्पिक
uov_methodवैकल्पिक
mixing_image_prompt_and_vary_upscaleवैकल्पिक
enable_safety_checkerवैकल्पिक
फ़ाइल पैरामीटर में सार्वजनिक https:// URL, 10 MB तक का data: URI, या अपलोड का file_url लिया जाता है। फ़ाइलें
आउटपुट
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "fooocus/image-prompt",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 85,
"usd": "0.085",
"charged": 85,
"refunded": 0
},
"input": {
"image_prompt_1": {
"image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
},
"output": {
"images": [
{
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_name": "0-output.jpeg",
"file_size": 1843200,
"width": 1024,
"height": 768
}
],
"timings": {},
"has_nsfw_concepts": [
false
]
},
"outputs": [
{
"type": "image",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_size": 1843200,
"width": 1024,
"height": 768,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
आउटपुट के फ़ील्ड
- images
- array of object {url, content_type, file_name, file_size, width, height}निर्मित इमेज की फ़ाइल जानकारी।
- timings
- objectनिर्माण में लगा समय।
- has_nsfw_concepts
- array of booleanबताता है कि बनाई गई इमेज में NSFW अवधारणाएँ दिखाई देती हैं या नहीं।
अन्य Fooocus वेरिएंट
और मॉडल: टेक्स्ट से इमेज
AI एजेंट के लिए: इस पेज का Markdown यहाँ है https://doitong.com/hi/developers/models/fooocus/image-prompt.md. सभी मॉडल और गाइड: https://doitong.com/developers/llms.txt







