> ## 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.5 文生图

> Ideogram 4.5 文生图 API 每次请求可生成 1–8 张海报、Logo 和含文字的图片，支持 low、medium、high 三档质量和 42 种尺寸。

> [!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.5 文生图根据提示词生成海报、Logo、包装样稿、社交媒体配图等需要清晰文字的图片。一次最多可生成八张，并可按草稿或成品选择合适的质量档位。

Ideogram 4.5 是 Ideogram 面向文字密集型画面和精确编辑的图像模型。Vidgo 提供两个 model ID：[文生图](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-5-text-to-image.md)和[图像编辑](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-5-edit.md)。

## 模型

* **ideogram/v4.5/text-to-image** — Ideogram 4.5 文生图，每次请求 1–8 张。

## 功能

* 文生图，擅长准确渲染画面中的文字（标题、标语、标签）。
* 通过 `n` 每次生成 1–8 张。
* 三档质量：`low`、`medium`、`high`。
* 六种宽高比预设，外加 36 种精确像素尺寸，从 720x1280 到 3328x1248，以及 2048x2048。

## 必填参数

* `prompt`（string）：想要的画面，1–10,000 个字符。需要出现的文字请用引号标出，例如 `"GRAND OPENING"`。不能为空白。

## 可选参数

* `n`（integer）：图片张数，`1`–`8`。默认 `1`。
* `quality`（string）：`low`、`medium` 或 `high`。默认 `medium`。
* `size`（string）：输出尺寸。默认 `1:1 HD`。见[尺寸](#尺寸)。

## 尺寸

* 预设：`1:1`、`1:1 HD`、`4:3`、`3:4`、`16:9`、`9:16`。`1:1 HD` 为更高分辨率的方形。
* 精确像素尺寸：`720x1280`、`720x1440`、`800x1280`、`832x1248`、`864x1152`、`896x1120`、`1024x1024`、`1024x3072`、`1120x896`、`1152x864`、`1152x2944`、`1248x832`、`1248x3328`、`1280x720`、`1280x800`、`1280x3072`、`1296x3168`、`1440x720`、`1440x2560`、`1440x2880`、`1600x2560`、`1664x2496`、`1728x2304`、`1792x2240`、`2048x2048`、`2240x1792`、`2304x1728`、`2496x1664`、`2560x1440`、`2560x1600`、`2880x1440`、`2944x1152`、`3072x1024`、`3072x1280`、`3168x1296`、`3328x1248`。
* 其他取值会返回 400。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)和回调内容的 `files` 数组中会按请求的张数（`n`）返回对应数量的图片文件。

## 示例

* **带文字的海报**：旅行海报，标题文字在提示词中用引号标出，`3:4`，`medium` 质量。
* **四个高质量 Logo 方案，带回调**：`n: 4`，`quality: high`，`1024x1024`，并提供 `callback_url`。

## 注意事项

* 本 ID 只接受文本。要修改已有图片，请用 [Ideogram 4.5 图像编辑](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-v4-5-edit.md)。
* 上文未列出的字段会返回 400。`model` 和 `callback_url` 放在请求根级，不要放进 `input`。
* 积分在提交时预扣，只取决于 `quality` 和 `n`，`size` 不影响价格。任务失败会全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/image-series/ideogram-v4-5-text-to-image.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Ideogram 4.5 文生图
  description: >-
    Ideogram 4.5 文生图 API 每次请求可生成 1–8 张海报、Logo 和含文字的图片，支持 low、medium、high 三档质量和
    42 种尺寸。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Image Series
      summary: Ideogram 4.5 文生图
      description: 只传本模型列出的 `input` 字段。其他字段（包括图片输入）都会返回 400。
      operationId: submit_ideogram_v4_5_text_to_image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: 模型 ID，填 `ideogram/v4.5/text-to-image`。
                  example: ideogram/v4.5/text-to-image
                callback_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    可选的公开 HTTP(S) 地址，任务变为 `finished` 或 `failed` 时会收到 POST
                    请求。建议使用 HTTPS。省略、传 `null` 或空字符串即不发送回调。
                  example: https://your-domain.com/callback
                input:
                  type: object
                  required:
                    - prompt
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      maxLength: 10000
                      description: 文本提示词。需要出现在画面中的文字请用引号标出。1–10,000 个字符，不能为空白。
                      example: >-
                        A retro travel poster for "LISBON 1932", tram climbing a
                        sunny hill, bold art deco lettering
                    'n':
                      type: integer
                      minimum: 1
                      maximum: 8
                      default: 1
                      description: 生成的图片张数。
                    quality:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      default: medium
                      description: 渲染质量，决定计费档位。
                    size:
                      type: string
                      enum:
                        - '1:1'
                        - 1:1 HD
                        - '4:3'
                        - '3:4'
                        - '16:9'
                        - '9:16'
                        - 1024x1024
                        - 1024x3072
                        - 1120x896
                        - 1152x2944
                        - 1152x864
                        - 1248x3328
                        - 1248x832
                        - 1280x3072
                        - 1280x720
                        - 1280x800
                        - 1296x3168
                        - 1440x2560
                        - 1440x2880
                        - 1440x720
                        - 1600x2560
                        - 1664x2496
                        - 1728x2304
                        - 1792x2240
                        - 2048x2048
                        - 2240x1792
                        - 2304x1728
                        - 2496x1664
                        - 2560x1440
                        - 2560x1600
                        - 2880x1440
                        - 2944x1152
                        - 3072x1024
                        - 3072x1280
                        - 3168x1296
                        - 3328x1248
                        - 720x1280
                        - 720x1440
                        - 800x1280
                        - 832x1248
                        - 864x1152
                        - 896x1120
                      default: 1:1 HD
                      description: 输出尺寸：宽高比预设（`1:1 HD` 为更高分辨率的方形），或列表中的某个精确像素尺寸。
                  additionalProperties: false
                  description: 生成参数。
            examples:
              poster:
                summary: 带文字的海报
                value:
                  model: ideogram/v4.5/text-to-image
                  input:
                    prompt: >-
                      A retro travel poster for "LISBON 1932", tram climbing a
                      sunny hill, bold art deco lettering
                    'n': 1
                    quality: medium
                    size: '3:4'
              logo_variants:
                summary: 四个高质量 Logo 方案，带回调
                value:
                  model: ideogram/v4.5/text-to-image
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Minimal flat logo for a coffee roastery called "Ember &
                      Oak", warm orange on cream
                    'n': 4
                    quality: high
                    size: 1024x1024
      responses:
        '200':
          description: 任务已提交
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                    description: HTTP 状态码。
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                        description: >-
                          任务
                          ID，用于[查询任务状态](/zh/api-manual/task-management/status)。
                      status:
                        type: string
                        enum:
                          - not_started
                        description: 任务的初始状态。
                      created_time:
                        type: string
                        format: date-time
                        description: 任务创建时间（ISO 8601）。
              example:
                code: 200
                data:
                  task_id: task-unified-1762160000-abc123
                  status: not_started
                  created_time: '2026-11-03T10:30:00'
        '400':
          description: 输入无效、字段不受支持、媒体无法访问或积分不足
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '401':
          description: 凭证无效
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '403':
          description: 拒绝访问
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '404':
          description: 模型未知或已停用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '408':
          description: 请求超时
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: JSON 无效或请求体不是对象
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '429':
          description: 超出速率限制或 API Key 积分限额
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '500':
          description: 内部错误
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '502':
          description: 无法创建上游生成任务
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
        '503':
          description: 所请求的模型暂时不可用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: 错误信息。
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证


        获取 API Key：


        进入 **仪表盘 → API 密钥**（[API Key
        管理页面](https://vidgo.ai/apis/dashboard/api-key)）获取你的 API Key


        在请求头中添加：


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

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