跳至內容

Ideogram Text to Image

整合

模型 id ideogram/v3
# 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/ideogram/v3?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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"

此請求: $0.06 60 API 點數 在此頁面執行

取得 API 金鑰
Ideogram · 圖像

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填
rendering_speed 預設 BALANCED

渲染速度設定。

image_size 預設 square_hd

輸出圖像使用的解析度。

num_images 預設 1

要產生的圖像數量。

進階 negative_prompt · images · style · style_preset · seed · expand_prompt · style_codes · color_palette
預設

指定不需要的圖像內容;主要提示詞的描述優先於這些負面提示詞描述。

image_urls
拖放檔案,或

JPEG、PNG 或 WebP 格式的風格參考圖像。合計大小不得超過 10 MB。

style

用於生成的風格類型;與 style_codes 互斥。

引導圖像生成的風格預設值。

隨機數生成的種子值。

以每組 8 個字元的十六進位字串提供的圖像風格代碼;使用此清單時,請省略 style_reference_images 與 style。

生成期間使用的色彩調色盤。可透過名稱指定預設集,或透過 members 指定明確的十六進位顏色,並可選擇加入權重。

POST /run/ideogram/v3?wait=20 報價 → $0.06
# 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/ideogram/v3?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Ideogram Text to Image

使用 `prompt` 生成影像,算繪速度可選 TURBO、BALANCED 或 QUALITY。可透過風格參考影像(`image_urls`)、`style_codes`、`color_palette`、`style` 或 62 種 `style_preset` 值之一引導外觀。每次呼叫最多支援 8 張影像、負面提示詞、選用的提示詞延伸和尺寸預設。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
image_urls選填 images
類型url[] · image
JPEG、PNG 或 WebP 格式的風格參考圖像。合計大小不得超過 10 MB。
rendering_speed選填
類型enum
預設值BALANCED
TURBOBALANCEDQUALITY
渲染速度設定。
color_palette選填
類型object
生成期間使用的色彩調色盤。可透過名稱指定預設集,或透過 members 指定明確的十六進位顏色,並可選擇加入權重。
color_palette.members選填
類型object[]
定義調色盤顏色的調色盤成員清單。
color_palette.members[].rgb必填
類型object
以 RGB 表示的調色盤成員顏色。
color_palette.members[].color_weight選填
類型number | null
預設值0.5
0.05 – 1
指派給調色盤中此顏色的權重。
color_palette.name選填
類型enum
EMBERFRESHJUNGLEMAGICMELONMOSAICPASTELULTRAMARINE
色彩調色盤的預設集選擇。
style_codes選填
類型string[]
以每組 8 個字元的十六進位字串提供的圖像風格代碼;使用此清單時,請省略 style_reference_images 與 style。
style選填
類型enum
AUTOGENERALREALISTICDESIGN
用於生成的風格類型;與 style_codes 互斥。
expand_prompt選填
類型boolean
預設值true
請求生成的 MagicPrompt 使用切換設定。
num_images選填 num_outputs
類型integer
預設值1
1 – 8
要產生的圖像數量。
seed選填
類型integer | null
隨機數生成的種子值。
style_preset選填
類型enum
80S_ILLUSTRATION90S_NOSTALGIAABSTRACT_ORGANICANALOG_NOSTALGIAART_BRUTART_DECOART_POSTERAURAAVANT_GARDEBAUHAUSBLUEPRINTBLURRY_MOTIONBRIGHT_ARTC4D_CARTOONCHILDRENS_BOOKCOLLAGE
另有 46 個COLORING_BOOK_ICOLORING_BOOK_IICUBISMDARK_AURADOODLEDOUBLE_EXPOSUREDRAMATIC_CINEMAEDITORIALEMOTIONAL_MINIMALETHEREAL_PARTYEXPIRED_FILMFLAT_ARTFLAT_VECTORFOREST_REVERIEGEO_MINIMALISTGLASS_PRISMGOLDEN_HOURGRAFFITI_IGRAFFITI_IIHALFTONE_PRINTHIGH_CONTRASTHIPPIE_ERAICONICJAPANDI_FUSIONJAZZYLONG_EXPOSUREMAGAZINE_EDITORIALMINIMAL_ILLUSTRATIONMIXED_MEDIAMONOCHROMENIGHTLIFEOIL_PAINTINGOLD_CARTOONSPAINT_GESTUREPOP_ARTRETRO_ETCHINGRIVIERA_POPSPOTLIGHT_80SSTYLIZED_REDSURREAL_COLLAGETRAVEL_POSTERVINTAGE_GEOVINTAGE_POSTERWATERCOLORWEIRDWOODBLOCK_PRINT
引導圖像生成的風格預設值。
prompt必填
類型string
image_size選填
類型object
預設值square_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
輸出圖像使用的解析度。
negative_prompt選填
類型string
預設值
指定不需要的圖像內容;主要提示詞的描述優先於這些負面提示詞描述。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ideogram/v3",
  "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": 60,
    "usd": "0.06",
    "charged": 60,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "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
      }
    ],
    "seed": 42
  },
  "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"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
images
array of object {url, content_type, file_name, file_size}
seed
integer用於隨機數生成的種子值。

更多模型:文字轉圖像

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/ideogram/v3.md. 所有模型與指南: https://doitong.com/developers/llms.txt