Lumaktaw sa nilalaman

Image2svg

I-integrate

ID ng modelo image2svg
# 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/image2svg?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Kahilingang ito: $0.005 5 kredito ng API Patakbuhin ito sa page na ito

Kumuha ng API key
Utility Pag-edit ng Larawan #utility#editing

Ginagawang SVG ang raster na larawan gamit ang color o binary mode at spline o polygon paths

Utility · Larawan

Dito mapupunta ang iyong unang resulta

Bumuo ng kahilingan sa ibaba at patakbuhin ito gamit ang iyong API key. Kinokopya ang mga output sa aming storage, na pinananatili nang walang hanggan o 7 araw nang libre.

Bumuo ng kahilingan

Ang mga control ay binubuo mula sa schema ng modelo. Nagbabago ang code at presyo habang ina-adjust mo ang mga ito.

•kinakailangan image_url
Mag-drop ng file, o

Source na larawan para sa SVG conversion.

advanced colormode · hierarchical · mode · filter_speckle · color_precision · layer_difference · corner_threshold · length_threshold · max_iterations · splice_threshold · path_precision
colormode default na color

Pagpili ng output mode: color para sa colored output, o binary para sa black-and-white output.

hierarchical default na stacked

Pagpili ng hierarchy mode: stacked o cutout.

mode default na spline

Path mode: spline para sa mga curve o polygon para sa mga tuwid na linya.

default na 4

Pag-filter ng ingay at maliliit na tuldok.

default na 6

Level na ginagamit para sa color quantization.

default na 16

Threshold para sa mga pagkakaiba sa pagitan ng mga layer sa hierarchical mode.

default na 60

Angular threshold, sa degrees, para sa pagtukoy ng mga sulok.

default na 4

Threshold na inilalapat sa haba ng curve o linya.

default na 10

Pinakamataas na limitasyon ng mga iteration sa optimization.

default na 45

Threshold na ginagamit kapag pinagdudugtong ang mga path.

default na 3

Precision ng mga coordinate ng path sa decimal places.

POST /run/image2svg?wait=20 presyo → $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/image2svg?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Patakbuhin ang kahilingang ito

Nananatili ang iyong key sa browser na ito: ipinapadala lamang ito sa Doitong API at sine-save (localStorage) lamang kung pipiliin mo ang Tandaan. Kumuha ng API key

Tungkol sa Image2svg

Kino-convert ang raster na larawan sa isang SVG file. Pinagpapalit ng `colormode` ang color at binary output, pinipili ng `mode` ang spline curves o polygons, at tinutukoy ng `hierarchical` ang stacked o cutout layering. Inaangkop ang detalye gamit ang mga setting gaya ng `filter_speckle` (0 hanggang 20), `color_precision` (1 hanggang 10), at `path_precision` (1 hanggang 10).

Mga parameter

Ipadala ang canonical na pangalan o ang native na pangalan, hindi pareho. Mga canonical na pangalan

PangalanUri defaultPinapayagan Paglalarawan
image_urlkinakailangan image
Uriurl · image
Source na larawan para sa SVG conversion.
colormodeopsyonal
Urienum
defaultcolor
colorbinary
Pagpili ng output mode: color para sa colored output, o binary para sa black-and-white output.
hierarchicalopsyonal
Urienum
defaultstacked
stackedcutout
Pagpili ng hierarchy mode: stacked o cutout.
modeopsyonal
Urienum
defaultspline
splinepolygon
Path mode: spline para sa mga curve o polygon para sa mga tuwid na linya.
filter_speckleopsyonal
Uriinteger
default4
0 – 20
Pag-filter ng ingay at maliliit na tuldok.
color_precisionopsyonal
Uriinteger
default6
1 – 10
Level na ginagamit para sa color quantization.
layer_differenceopsyonal
Uriinteger
default16
1 – 32
Threshold para sa mga pagkakaiba sa pagitan ng mga layer sa hierarchical mode.
corner_thresholdopsyonal
Uriinteger
default60
0 – 180
Angular threshold, sa degrees, para sa pagtukoy ng mga sulok.
length_thresholdopsyonal
Urinumber
default4
0 – 10
Threshold na inilalapat sa haba ng curve o linya.
max_iterationsopsyonal
Uriinteger
default10
1 – 20
Pinakamataas na limitasyon ng mga iteration sa optimization.
splice_thresholdopsyonal
Uriinteger
default45
0 – 90
Threshold na ginagamit kapag pinagdudugtong ang mga path.
path_precisionopsyonal
Uriinteger
default3
1 – 10
Precision ng mga coordinate ng path sa decimal places.
kinakailangan Canonical na pangalan, tinatanggap din

Tumatanggap ang mga parameter ng file ng pampublikong https:// URL, data: URI na hanggang 10 MB, o file_url ng isang upload. Mga file

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "image2svg",
  "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": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200
      }
    ]
  },
  "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"
  }
}
Ikaw ang pumipili para sa iyong mga fileAng bawat outputs[].url ay kopya sa aming storage: pinananatili nang walang hanggan (sinisingil bawat GB-month) o 7 araw nang libre, ayon sa setting ng iyong account o ?storage=.
Parehong shape sa bawat modelotype, url, content_type, width, height at duration, para sa mga larawan, video at audio. Ang output ay sariling result object ng modelo.
Mga field ng output
images
array of object {url, content_type, file_name, file_size}SVG file na ginawa sa conversion.

Para sa mga AI agent: nasa Markdown ang pahinang ito sa https://doitong.com/fil/developers/models/image2svg.md. Lahat ng modelo at gabay: https://doitong.com/developers/llms.txt