> ## 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 Vector 1.0 文本生成 SVG

> Ideogram Vector 1.0 文本生成 SVG API 根据提示词生成 1–8 个 SVG 文件，支持最多 5 张参考图、18 种宽高比选项和三档质量。

> [!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 Vector 1.0 文本生成 SVG 根据提示词生成可缩放的 SVG 作品：Logo、图标、贴纸、徽章和扁平插画，任意尺寸下都保持清晰。提示词中的文字会以矢量图形绘制。可以加入最多五张参考图来引导风格或构图。

Ideogram Vector 1.0 是 Ideogram 第一个输出矢量图而不是像素图的模型。Vidgo 提供两个 model ID：[文本生成 SVG](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-vector-1-0-text-to-vector.md)和[图片转 SVG](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-vector-1-0-image-to-vector.md)。

## 模型

* **ideogram/vector-1.0/text-to-vector** — Ideogram Vector 1.0 文本生成 SVG，每次请求 1–8 个文件。

## 功能

* 文本生成 SVG：原生矢量输出（`image/svg+xml`），不是对位图的描摹。
* 可选 1–5 张参考图，第一张为主要参考。
* 18 种宽高比选项，从竖长的 `1:4` 到横宽的 `4:1`，另有 `auto`。
* 三档质量，每次请求 1–8 个 SVG 文件。

## 必填参数

* `prompt`（string）：想要的作品，1–9,500 个字符。需要的文字请用引号标出，例如 `"TRAILHEAD"`。不能为空白。

## 可选参数

* `image_urls`（string\[]）：1–5 张参考图（公开 HTTP(S) URL 或图片 data URI）。没有参考图时不要传该字段。
* `quality`（string）：`low`、`medium` 或 `high`。默认 `medium`。
* `n`（integer）：SVG 文件数量，`1`–`8`。默认 `1`。
* `size`（string）：宽高比。默认 `auto`。见[尺寸](#尺寸)。

## 尺寸

`size` 设置的是宽高比而不是像素尺寸：`auto`、`1:1`、`1:4`、`1:3`、`1:2`、`9:16`、`10:16`、`2:3`、`3:4`、`4:5`、`5:4`、`4:3`、`3:2`、`16:10`、`16:9`、`2:1`、`3:1`、`4:1`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)和回调内容的 `files` 数组中会返回 SVG 文件（`image/svg+xml`），可直接在矢量编辑软件中打开，或嵌入网页使用。

## 示例

* **仅提示词生成 SVG 图标**：两套方形图标，`medium` 质量。
* **带风格参考图的横幅，带回调**：`3:1` 横幅，文字用引号标出，一张品牌参考图，`quality: high`，并提供 `callback_url`。

## 注意事项

* 要把已有的位图（PNG、JPG）转换为 SVG，请用 [Ideogram Vector 1.0 图片转 SVG](https://docs.vidgo.ai/zh/api-manual/image-series/ideogram-vector-1-0-image-to-vector.md)。
* `image_urls` 为空数组或超过五张会返回 400。上文未列出的字段会返回 400。`model` 和 `callback_url` 放在请求根级，不要放进 `input`。
* 积分在提交时预扣，取决于 `quality` 和 `n`。`quality: high` 且传入 `image_urls` 时按更高的单文件费率计费；`low` 和 `medium` 有无参考图价格相同。任务失败会全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/image-series/ideogram-vector-1-0-text-to-vector.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Ideogram Vector 1.0 文本生成 SVG
  description: >-
    Ideogram Vector 1.0 文本生成 SVG API 根据提示词生成 1–8 个 SVG 文件，支持最多 5 张参考图、18
    种宽高比选项和三档质量。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Image Series
      summary: Ideogram Vector 1.0 文本生成 SVG
      description: >-
        只传本模型列出的 `input` 字段，其他字段会返回 400。`image_urls` 接受公开 HTTP(S) URL 或
        `data:image/...;base64,...` 格式的 data URI。
      operationId: submit_ideogram_vector_1_0_text_to_vector
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: 模型 ID，填 `ideogram/vector-1.0/text-to-vector`。
                  example: ideogram/vector-1.0/text-to-vector
                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: 9500
                      example: >-
                        Flat line icon set of a rocket, a planet and a star,
                        two-colour navy and coral
                      description: 描述矢量作品：主体、风格、配色以及需要的文字（用引号标出）。1–9,500 个字符，不能为空白。
                    image_urls:
                      type: array
                      items:
                        type: string
                        format: uri
                      minItems: 1
                      maxItems: 5
                      description: 可选的参考图，传入时为 1–5 张。第一张为主要参考。公开 HTTP(S) URL 或图片 data URI。
                    quality:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      default: medium
                      description: 渲染质量，决定计费档位。
                    'n':
                      type: integer
                      minimum: 1
                      maximum: 8
                      default: 1
                      description: 生成的 SVG 文件数量。
                    size:
                      type: string
                      enum:
                        - auto
                        - '1:1'
                        - '1:4'
                        - '1:3'
                        - '1:2'
                        - '9:16'
                        - '10:16'
                        - '2:3'
                        - '3:4'
                        - '4:5'
                        - '5:4'
                        - '4:3'
                        - '3:2'
                        - '16:10'
                        - '16:9'
                        - '2:1'
                        - '3:1'
                        - '4:1'
                      default: auto
                      description: 作品的宽高比。`auto` 由模型决定。
                  additionalProperties: false
                  description: 生成参数。
            examples:
              icon:
                summary: 仅提示词生成 SVG 图标
                value:
                  model: ideogram/vector-1.0/text-to-vector
                  input:
                    prompt: >-
                      Flat line icon set of a rocket, a planet and a star,
                      two-colour navy and coral
                    quality: medium
                    'n': 2
                    size: '1:1'
              with_reference:
                summary: 带风格参考图的横幅，带回调
                value:
                  model: ideogram/vector-1.0/text-to-vector
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Wide banner illustration of rolling hills at sunrise with
                      the word "TRAILHEAD" in bold geometric letters
                    image_urls:
                      - https://example.com/brand-style.png
                    quality: high
                    'n': 1
                    size: '3:1'
      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.