Njuolgga sisdollui

Image2svg

Integrere

Modealla-id 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"

Dát ohcamuš: 0,005 $ 5 API-kreditta Vuodje dán siiddu alde

Oza API-čoavdaga
Utility Gova heiveheapmi #utility#editing

Rievdada raster-govvosa SVG:n, ivdnásaš dahje binára modusain ja spline- dahje polygon-bálgáin

Utility · Govva

Dát lea du vuosttaš bohtos

Daga jearaldaga vuolábealde ja vuodje dan iežat API-čoavddain. Boađusat kopierejuvvojit min vurkemii, bisuhuvvojit álo dahje 7 beaivvi nuvttá.

Ráhkat jearaldaga

Kontrollat ráhkaduvvojit modealla skeama vuođul. Koda ja haddi ođasmahttojuvvojit go rievddadat daid.

•gáibiduvvo image_url
Luoitte fiilla, dahje

Gáldogovva SVG-konverteremii.

Viiddiduvvon colormode · hierarchical · mode · filter_speckle · color_precision · layer_difference · corner_threshold · length_threshold · max_iterations · splice_threshold · path_precision
colormode standárda color

Boađusvuogi válljen: color ivdneboahtui dahje binary čáhppesvilges boahtui.

hierarchical standárda stacked

Hierarkiija vuogi válljen: stacked dahje cutout.

mode standárda spline

Bálgá vuohki: spline geažuid dahje polygon njuolga čárggaid várás.

standárda 4

Jiena ja smávva čivgguid filteren.

standárda 6

Ivdnekvantiseremis geavahuvvon dásse.

standárda 16

Hierarkiijavuogis dásiid gaskasaš erohusaid rájádus.

standárda 60

Gaskamearálaš rájádus, grádaiguin, čoahkkáigeahččii.

standárda 4

Geažu dahje čárgga guhkkodahkii čuohcci rájádus.

standárda 10

Optimereniterášuvnnaid badjerádji.

standárda 45

Bálgáid ovttastahttimis geavahuvvon rájádus.

standárda 3

Bálgá koordináhtaid presišuvdna desimálačuoggáin.

POST /run/image2svg?wait=20 haddemearrádus → 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"

Geavat dán ohcamuša

Du key báhcá dán fierpmádatlogan: dat sáddejuvvo dušše Doitong API:ii ja vurkejuvvo (localStorage) dušše jos válljet Remember. Viečča API-keya

Dát lea Image2svg birra

Rievdada raster-govvosa SVG-fiilan. `colormode` molsašuddá ivdnásaš ja binára boađosiid gaskkas, `mode` vállje spline-kurvvaid dahje polygonaid, ja `hierarchical` vállje bálddalagaid dahje čuohppon láhttema. Detálja heivehuvvo nugo `filter_speckle` (0 gitta 20), `color_precision` (1 gitta 10) ja `path_precision` (1 gitta 10)-heivehusain.

Parametterat

Sádde kanonala nama dahje iežas nama, ii goappašiid. Kanonala namat

NammaŠládja StandárdaDohkkehuvvon Govvádus
image_urlgáibiduvvo image
Šládjaurl · image
Gáldogovva SVG-konverteremii.
colormodeeaktodáhtolaš
Šládjaenum
Standárdacolor
colorbinary
Boađusvuogi válljen: color ivdneboahtui dahje binary čáhppesvilges boahtui.
hierarchicaleaktodáhtolaš
Šládjaenum
Standárdastacked
stackedcutout
Hierarkiija vuogi válljen: stacked dahje cutout.
modeeaktodáhtolaš
Šládjaenum
Standárdaspline
splinepolygon
Bálgá vuohki: spline geažuid dahje polygon njuolga čárggaid várás.
filter_speckleeaktodáhtolaš
Šládjainteger
Standárda4
0 – 20
Jiena ja smávva čivgguid filteren.
color_precisioneaktodáhtolaš
Šládjainteger
Standárda6
1 – 10
Ivdnekvantiseremis geavahuvvon dásse.
layer_differenceeaktodáhtolaš
Šládjainteger
Standárda16
1 – 32
Hierarkiijavuogis dásiid gaskasaš erohusaid rájádus.
corner_thresholdeaktodáhtolaš
Šládjainteger
Standárda60
0 – 180
Gaskamearálaš rájádus, grádaiguin, čoahkkáigeahččii.
length_thresholdeaktodáhtolaš
Šládjanumber
Standárda4
0 – 10
Geažu dahje čárgga guhkkodahkii čuohcci rájádus.
max_iterationseaktodáhtolaš
Šládjainteger
Standárda10
1 – 20
Optimereniterášuvnnaid badjerádji.
splice_thresholdeaktodáhtolaš
Šládjainteger
Standárda45
0 – 90
Bálgáid ovttastahttimis geavahuvvon rájádus.
path_precisioneaktodáhtolaš
Šládjainteger
Standárda3
1 – 10
Bálgá koordináhtaid presišuvdna desimálačuoggáin.
gáibiduvvo Kanonala namma, maid sáhttá geavahit

Fiilaparametterat váldet almmolaš https:// URL:a, data: URI:a gitta 10 MB, dahje uploada file_url:a. Fiillat

Boađus

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"
  }
}
Du fiillat, du válljenJuohke outputs[].url lea kopia min vurkemis: bisuhuvvo álo (mákso GB-mánu mielde) dahje 7 beaivvi nuvttá, du konto­o heiveheami dahje ?storage= mielde.
Seammá hápmi juohke modeallastype, url, content_type, width, height ja duration, govvii, videoii ja jienai seammá ládje. output lea modealla iežas boađusobjekta.
Outputa giettit
images
array of object {url, content_type, file_name, file_size}Konverteremis ráhkaduvvon SVG-fiila.

AI-agenttaide: dán siidu Markdowna lea dáppe https://doitong.com/se/developers/models/image2svg.md. Buot modeallat ja ráđit: https://doitong.com/developers/llms.txt