> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ideogram 4.6 文生图

> Ideogram 4.6 文生图 API 每次生成 1–8 张带文字的图片，支持 2K 或 4K、四档质量、自定义尺寸和透明背景。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Ideogram 4.6 文生图把提示词生成海报、Logo、包装、社交媒体图片等以清晰文字为核心的图片。每次最多生成 8 张，可选四档质量，尺寸可用 `auto`、预设或每边最高 4096 像素的精确像素尺寸。

Ideogram 4.6 是 Ideogram 的图像模型。Ideogram 文档写明它“可生成最高 4K 的图片”，并提供 Very low、Low、Medium、High 四档质量。Vidgo 提供两个模型 ID：[文生图](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-6-text-to-image.md)和[图像编辑](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-6-edit.md)。

## 模型

* **ideogram/v4.6/text-to-image** — Ideogram 4.6 文生图，每次 1–8 张图片。

## 功能

* 带文字的图片：需要出现在图中的文字放在引号里，例如 `"GRAND OPENING"`。
* 通过 `n` 每次生成 1–8 张图片。
* 四档质量：`very_low`、`low`、`medium`、`high`。
* 2K 和 4K 输出：`auto`、6 种预设，或每边最高 4096 像素的自定义 `WIDTHxHEIGHT`。
* 透明或不透明背景，以及用于复现结果的 `seed`。

## 必填参数

* `prompt` (string)：所需图片的描述，1–10,000 个字符，至少包含一个非空白字符。需要出现的文字请加引号。

## 可选参数

* `n` (integer)：图片数量，`1`–`8`。默认 `1`。
* `quality` (string)：`very_low`、`low`、`medium` 或 `high`。默认 `medium`。`very_low` 用于 2K 档。
* `size` (string)：输出尺寸。默认 `auto`。参见[尺寸](#尺寸)。
* `background` (string)：`transparent` 或 `opaque`。省略时由模型自动选择背景。
* `seed` (integer)：`0`–`2147483647`。

## 尺寸

* `auto`（默认）由模型在 2K 档内决定尺寸。
* 预设：`1:1`、`1:1 HD`、`4:3`、`3:4`、`16:9`、`9:16`，均属于 2K 档。
* 自定义 `WIDTHxHEIGHT` 使用小写 `x`（例如 `2048x1152`）：每边 256–4096 像素且为 32 的倍数，长边最多为短边的 6 倍。
* 档位：自定义尺寸面积不超过 4,194,304 像素（2048x2048）为 2K 档，更大为 4K 档；4K 档支持 `low`、`medium`、`high`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)和回调内容的 `files` 数组中按生成的图片数量返回文件，每张图片一个。设置 `background: transparent` 时图片带透明通道。

## 示例

* **带文字的海报**：提示词中用引号写出标题的马戏团海报，`3:4`，`medium` 质量。
* **透明贴纸组**：`n: 4`，`low` 质量，`1:1`，`background: transparent`，固定 `seed`。
* **带回调的 4K 自定义横幅**：`4096x2304`，`high` 质量，并设置 `callback_url`。

## 注意事项

* `input` 接收上文列出的字段，其他字段返回 400。`model` 和 `callback_url` 放在请求根级，与 `input` 并列。
* `quality: very_low` 搭配面积超过 4,194,304 像素的自定义尺寸会返回 400；4K 尺寸请使用 `low`、`medium` 或 `high`。
* 需要修改已有图片时，请使用 [Ideogram 4.6 图像编辑](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-6-edit.md)。
* 按张计费，费率由 `quality` 和输出档位（2K 或 4K）决定，再乘以 `n`，提交时预扣。`auto` 和预设按 2K 档计费，自定义尺寸按其像素面积计费。如果实际返回的图片少于 `n` 张，按实际返回张数降低扣费。任务失败会全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/image-series/ideogram-v4-6-text-to-image.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Ideogram 4.6 文生图
  description: Ideogram 4.6 文生图 API 每次生成 1–8 张带文字的图片，支持 2K 或 4K、四档质量、自定义尺寸和透明背景。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Ideogram 4.6 Text to Image
      summary: 提交 Ideogram 4.6 文生图 任务
      operationId: submitIdeogram46TextToImageTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              poster:
                summary: 带文字的海报
                value:
                  model: ideogram/v4.6/text-to-image
                  input:
                    prompt: >-
                      A vintage circus poster for "THE FLYING MARINOS", trapeze
                      artists under a striped tent, bold red and gold lettering
                    quality: medium
                    size: '3:4'
              stickers:
                summary: 透明贴纸组
                value:
                  model: ideogram/v4.6/text-to-image
                  input:
                    prompt: >-
                      Die-cut sticker of a smiling sloth holding a coffee cup
                      with the words "SLOW MORNING"
                    'n': 4
                    quality: low
                    size: '1:1'
                    background: transparent
                    seed: 2048
              banner-4k:
                summary: 带回调的 4K 自定义横幅
                value:
                  model: ideogram/v4.6/text-to-image
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Wide festival banner reading "MONSOON JAZZ NIGHTS" over a
                      rain-soaked Mumbai street with glowing umbrellas
                    quality: high
                    size: 4096x2304
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: ideogram/v4.6/text-to-image
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 10000
              description: 描述图片的提示词。图中需要出现的文字请放在引号里。1–10,000 个字符，至少包含一个非空白字符。
            'n':
              type: integer
              minimum: 1
              maximum: 8
              default: 1
              description: 生成图片数量。
            quality:
              type: string
              enum:
                - very_low
                - low
                - medium
                - high
              default: medium
              description: >-
                渲染质量，按张计费的档位之一。`very_low` 用于 2K 档（输出面积不超过 4,194,304 像素）；4K 档支持
                `low`、`medium`、`high`。
            size:
              type: string
              default: auto
              description: >-
                输出尺寸：`auto`、宽高比预设或自定义 `WIDTHxHEIGHT`。


                `auto` 和预设（`1:1`、`1:1 HD`、`4:3`、`3:4`、`16:9`、`9:16`）属于 2K 档。


                自定义 `WIDTHxHEIGHT` 使用小写 `x`（例如 `2048x1152`）：每边 256–4096 像素且为 32
                的倍数，长边最多为短边的 6 倍。


                自定义尺寸面积不超过 4,194,304 像素（2048x2048）为 2K 档，更大为 4K 档。
            background:
              type: string
              enum:
                - transparent
                - opaque
              description: 背景类型。`transparent` 输出带透明通道的图片。省略时由模型自动选择背景。
            seed:
              type: integer
              minimum: 0
              maximum: 2147483647
              description: 随机种子。固定种子并保持其他参数不变，可以复现相近的结果。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-example-001
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T10:30:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: prompt is required
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.