跳转到内容

Vecglypher · Image to SVG

集成

模型 id vecglypher/image-to-svg
# 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/vecglypher/image-to-svg?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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.005 5 API 积分 在此页面运行

获取 API 密钥
Open model 图像编辑 参考输入

根据 1 至 8 张参考字形图像的风格生成 SVG 字形,而不是使用文本风格描述

Open model · 图像

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填

字符将转换为矢量字形的文本,使用参考图像复现其样式。

•必填 reference_image_urls
拖放文件,或 · 最多 8 个

以 1 到 8 个图像 URL 提供的样式参考,每个图像显示一个字形字符。图像外观会指导生成字形的样式。

高级 fill_color · stroke_color · temperature · top_p · top_k · repetition_penalty · max_tokens · output_size · stroke_width · seed · enable_safety_checker
默认 black

使用 SVG/CSS 支持的任意颜色表示法指定字形填充。

字形轮廓设置:提供此可选颜色后,会在每个生成的字形路径周围添加描边。

默认 0.1

采样时使用的温度。

默认 0.95

核采样控制(top-p)。

默认 5

top-k 采样设置。

默认 1

应用于重复内容的惩罚。

默认 8192

生成 token 的上限。

默认 512

SVG 像素尺寸上限,应用于较大的尺寸,同时保持宽高比例。

默认 1

轮廓粗细,仅在指定 stroke_color 时生效,并使用 SVG 单位测量。

控制随机性的种子,以获得可复现的结果。

POST /run/vecglypher/image-to-svg?wait=20 报价 → $0.005
# 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/vecglypher/image-to-svg?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",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# 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 密钥

关于 Vecglypher · Image to SVG

将 `prompt` 中的文本写成矢量字形,使其匹配 `reference_image_urls` 中 1 至 8 张参考字形图像的风格,每张图像展示一个独立字符。输出为 SVG 路径,尺寸由 64 至 4096 px 的 `output_size` 设置。`fill_color`、`stroke_color` 和 `stroke_width` 设置外观,并提供 `temperature` 和 `max_tokens` 等采样控制项。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
prompt必填
类型string
字符将转换为矢量字形的文本,使用参考图像复现其样式。
reference_image_urls必填 images
类型url[] · image
≤ 8 个项目
以 1 到 8 个图像 URL 提供的样式参考,每个图像显示一个字形字符。图像外观会指导生成字形的样式。
temperature可选
类型number
默认值0.1
0 – 2
采样时使用的温度。
seed可选
类型integer | null
控制随机性的种子,以获得可复现的结果。
enable_safety_checker可选
类型boolean
默认值true
启用输入安全检查。
top_p可选
类型number
默认值0.95
0 – 1
核采样控制(top-p)。
top_k可选
类型integer
默认值5
-1 – 100
top-k 采样设置。
repetition_penalty可选
类型number
默认值1
0 – 2
应用于重复内容的惩罚。
max_tokens可选
类型integer
默认值8192
256 – 16,384
生成 token 的上限。
output_size可选
类型integer
默认值512
64 – 4,096
SVG 像素尺寸上限,应用于较大的尺寸,同时保持宽高比例。
fill_color可选
类型string
默认值black
使用 SVG/CSS 支持的任意颜色表示法指定字形填充。
stroke_color可选
类型string | null
字形轮廓设置:提供此可选颜色后,会在每个生成的字形路径周围添加描边。
stroke_width可选
类型number
默认值1
0.1 – 50
轮廓粗细,仅在指定 stroke_color 时生效,并使用 SVG 单位测量。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "vecglypher/image-to-svg",
  "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": 5,
    "usd": "0.005",
    "charged": 5,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "reference_image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "svg_content": "string",
    "seed": 42,
    "timings": {}
  },
  "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 是模型自身的结果对象。
输出字段
image
any保存生成矢量字形的 SVG 文件。
svg_content
string包含原始 SVG 标记的字符串。
seed
integer生成期间应用的种子值。
timings
object按处理阶段细分的生成计时结果。

更多模型:图像编辑

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/vecglypher/image-to-svg.md. 所有模型和指南: https://doitong.com/developers/llms.txt