seedinteger
Random seed. Omit to choose automatically.
ideogram/4.6Ideogram 4.6 generates images with reliable text rendering and polished graphic design, with four quality levels from very_low to high.
Wypróbuj model
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"aspect_ratio": "16:9",
"prompt": "A vintage travel poster for Kyoto with the headline \"KYOTO\" in bold art deco letters, pagoda and cherry blossoms"
}{
"aspect_ratio": "16:9",
"prompt": "A colorful storefront with a sign reading hello"
}Ideogram 4.6 generates images with reliable text rendering and polished graphic design, at four quality levels.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 10,000 characters. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
seed | integer | random | Fix it to compare prompt changes. |
quality | very_low / low / medium / high | medium | Sets the per-image rate. |
Per image: $0.008 very_low, $0.03 low, $0.06 medium, $0.10 high.
| Quality | Price |
|---|---|
| very_low | $0.008 |
| low | $0.03 |
| medium | $0.06 |
| high | $0.10 |
| Failed runs are not charged. |
Related: ideogram/4.6/edit, ideogram/4.5.
Zacznij tworzyć
Prześlij ten model przez 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": "ideogram/4.6",
"prompt": "A colorful storefront with a sign reading hello",
"quality": "medium"
}
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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
seedintegerRandom seed. Omit to choose automatically.
promptstringwymaganeThe generation or editing prompt.
qualitystringText-to-image quality.
Domyślnie: "medium"
Możliwe wartości: "very_low", "low", "medium", "high"
aspect_ratiostringThe aspect ratio of the generated image.
Możliwe wartości: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
{
"model": "ideogram/4.6",
"prompt": "A colorful storefront with a sign reading hello",
"quality": "medium"
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
[
{
"url": "https://static.sandbase.ai/examples/5a577634-9f9c-493f-ab0a-1f9219840587/output/33806469-db48-4570-b5ae-19d138e0b1dd.png"
}
]