promptstringआवश्यक
The prompt for image generation
openai/gpt-image-1.5Gpt Image 1.5 is OpenAI's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.
model को आज़माएँ
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"aspect_ratio": "1:1",
"prompt": "a red apple on a white table, studio light",
"quality": "low"
}{
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912"
}मानवीय पसंद
ब्लाइंड साइड-बाय-साइड वोटों से प्राप्त Elo रेटिंग, अन्य इमेज और वीडियो मॉडलों से तुलना में।
रैंकिंग का स्रोत Artificial Analysis Arena
टेक्स्ट-से-इमेज Arena: लोग एक ही प्रॉम्प्ट से बनी दो छवियों में से बेहतर छवि चुनते हैं, मॉडल नाम देखे बिना।
GPT Image 1.5 text-to-image, with transparent-background output for logos and stickers.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 32,000 characters. |
aspect_ratio | 1:1 / 3:2 / 2:3 | 1:1 | 1:1, 3:2, or 2:3; non-square sizes cost more. |
output_format | jpeg / png | png | Output file format. |
background | auto / transparent / opaque | auto | transparent returns a PNG with alpha. |
quality | low / medium / high | high | Higher quality costs more; high is the default. |
Price depends on quality and shape, plus $0.005 per started 1,000 prompt characters:
| Quality, short prompt | 1:1 | 3:2 or 2:3 |
|---|---|---|
| low | $0.014 | $0.018 |
| medium | $0.039 | $0.056 |
| high | $0.138 | $0.205 |
Failed runs are not charged.
background: transparent with PNG output for cut-out assets.Related: openai/gpt-image-1.5/edit, openai/gpt-image-2 (newer).
बिल्डिंग शुरू करें
इस model को SandBase Unified Run API के माध्यम से सबमिट करें।
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "openai/gpt-image-1.5",
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"quality": "high",
"background": "auto",
"aspect_ratio": "1:1",
"output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
promptstringआवश्यकThe prompt for image generation
qualitystringQuality for the generated image
डिफ़ॉल्ट: "high"
संभावित मान: "low", "medium", "high"
backgroundstringBackground for the generated image
डिफ़ॉल्ट: "auto"
संभावित मान: "auto", "transparent", "opaque"
aspect_ratiostringOutput aspect ratio: 1:1 (1024x1024), 3:2 (1536x1024) or 2:3 (1024x1536).
डिफ़ॉल्ट: "1:1"
संभावित मान: "1:1", "3:2", "2:3"
output_formatstringOutput format for the images
डिफ़ॉल्ट: "png"
संभावित मान: "jpeg", "png"
{
"model": "openai/gpt-image-1.5",
"prompt": "create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912",
"quality": "high",
"background": "auto",
"aspect_ratio": "1:1",
"output_format": "png"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/091b2882-b0ce-44ed-bc7e-dc011d9ef03c/output/fcd85d3c-165b-4f66-9a8e-e5a593837462.png"
}
]