跳至內容

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.ru/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: $0.005 5 API 點數 · ≈ ₽0.54 在此頁面執行

取得 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

取樣使用的 Temperature。

預設 0.95

Nucleus sampling 控制(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.ru/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.ru/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
取樣使用的 Temperature。
seed選填
類型integer | null
控制隨機性以產生可重現結果的種子。
enable_safety_checker選填
類型boolean
預設值true
啟用輸入的安全檢查。
top_p選填
類型number
預設值0.95
0 – 1
Nucleus sampling 控制(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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/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-TW/developers/models/vecglypher/image-to-svg.md. 所有模型與指南: https://doitong.com/developers/llms.txt