مواد پر جائیں

Image2svg

انٹیگریٹ کریں

ماڈل 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"

یہ درخواست: ⁨$0.005⁩ 5 API کریڈٹس اس صفحے پر چلائیں

API کلید حاصل کریں
Utility تصویر میں ترمیم #utility#editing

راسٹر تصویر کو رنگی یا بائنری موڈ اور spline یا polygon پاتھ کے ساتھ SVG میں ویکٹرائز کرتا ہے

Utility · تصویر

آپ کا پہلا نتیجہ یہاں آئے گا

ذیل میں درخواست بنائیں اور اپنی API کلید کے ساتھ چلائیں۔ آؤٹ پٹس ہمارے اسٹوریج میں کاپی ہو جاتے ہیں، ہمیشہ کے لیے یا مفت میں 7 دن تک محفوظ رہتے ہیں۔

درخواست بنائیں

کنٹرولز ماڈل اسکیما سے تیار ہوتے ہیں۔ آپ کے بدلنے کے ساتھ کوڈ اور قیمت اپ ڈیٹ ہوتے ہیں۔

•لازمی image_url
فائل ڈراپ کریں، یا

SVG میں تبدیل کرنے کے لیے ماخذ تصویر۔

ایڈوانسڈ colormode · hierarchical · mode · filter_speckle · color_precision · layer_difference · corner_threshold · length_threshold · max_iterations · splice_threshold · path_precision
colormode ڈیفالٹ color

آؤٹ پٹ موڈ کا انتخاب: رنگین آؤٹ پٹ کے لیے color، یا سیاہ و سفید آؤٹ پٹ کے لیے binary۔

hierarchical ڈیفالٹ stacked

hierarchy موڈ کا انتخاب: stacked یا cutout۔

mode ڈیفالٹ spline

path موڈ: منحنی خطوط کے لیے spline یا سیدھی لکیروں کے لیے polygon۔

ڈیفالٹ 4

شور اور چھوٹے دھبوں کی فلٹرنگ۔

ڈیفالٹ 6

رنگوں کی quantization کے لیے استعمال ہونے والی سطح۔

ڈیفالٹ 16

hierarchical موڈ میں تہوں کے درمیان فرق کی حد۔

ڈیفالٹ 60

کونوں کی شناخت کے لیے زاویائی حد، degrees میں۔

ڈیفالٹ 4

curve یا line کی لمبائی پر لاگو ہونے والی حد۔

ڈیفالٹ 10

optimization iterations کی زیادہ سے زیادہ حد۔

ڈیفالٹ 45

paths کو جوڑتے وقت استعمال ہونے والی حد۔

ڈیفالٹ 3

اعشاری مقامات میں path coordinates کی درستگی۔

POST /run/image2svg?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/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"

یہ درخواست چلائیں

آپ کی key اسی براؤزر میں رہتی ہے: یہ صرف Doitong API کو بھیجی جاتی ہے اور صرف اس صورت میں localStorage میں محفوظ ہوتی ہے جب آپ Remember منتخب کریں۔ API کلید حاصل کریں

Image2svg کے بارے میں

راسٹر تصویر کو SVG فائل میں تبدیل کرتا ہے۔ `colormode` رنگین اور ثنائی آؤٹ پٹ کے درمیان سوئچ کرتا ہے، `mode` اسپلائن منحنیات یا کثیر الاضلاع منتخب کرتا ہے، اور `hierarchical` تہہ شدہ یا کٹ آؤٹ تہہ بندی منتخب کرتا ہے۔ تفصیل کو `filter_speckle` (0 سے 20)، `color_precision` (1 سے 10) اور `path_precision` (1 سے 10) جیسی ترتیبات سے ایڈجسٹ کیا جاتا ہے۔

پیرامیٹرز

معیاری نام یا مقامی نام میں سے صرف ایک بھیجیں، دونوں نہیں۔ معیاری نام

نامقسم ڈیفالٹمجاز تفصیل
image_urlلازمی image
قسمurl · image
SVG میں تبدیل کرنے کے لیے ماخذ تصویر۔
colormodeاختیاری
قسمenum
ڈیفالٹcolor
colorbinary
آؤٹ پٹ موڈ کا انتخاب: رنگین آؤٹ پٹ کے لیے color، یا سیاہ و سفید آؤٹ پٹ کے لیے binary۔
hierarchicalاختیاری
قسمenum
ڈیفالٹstacked
stackedcutout
hierarchy موڈ کا انتخاب: stacked یا cutout۔
modeاختیاری
قسمenum
ڈیفالٹspline
splinepolygon
path موڈ: منحنی خطوط کے لیے spline یا سیدھی لکیروں کے لیے polygon۔
filter_speckleاختیاری
قسمinteger
ڈیفالٹ4
0 – 20
شور اور چھوٹے دھبوں کی فلٹرنگ۔
color_precisionاختیاری
قسمinteger
ڈیفالٹ6
1 – 10
رنگوں کی quantization کے لیے استعمال ہونے والی سطح۔
layer_differenceاختیاری
قسمinteger
ڈیفالٹ16
1 – 32
hierarchical موڈ میں تہوں کے درمیان فرق کی حد۔
corner_thresholdاختیاری
قسمinteger
ڈیفالٹ60
0 – 180
کونوں کی شناخت کے لیے زاویائی حد، degrees میں۔
length_thresholdاختیاری
قسمnumber
ڈیفالٹ4
0 – 10
curve یا line کی لمبائی پر لاگو ہونے والی حد۔
max_iterationsاختیاری
قسمinteger
ڈیفالٹ10
1 – 20
optimization iterations کی زیادہ سے زیادہ حد۔
splice_thresholdاختیاری
قسمinteger
ڈیفالٹ45
0 – 90
paths کو جوڑتے وقت استعمال ہونے والی حد۔
path_precisionاختیاری
قسمinteger
ڈیفالٹ3
1 – 10
اعشاری مقامات میں path coordinates کی درستگی۔
لازمی معیاری نام، یہ بھی قبول ہے

فائل پیرامیٹرز عوامی https:// URL، 10 MB تک کی data: URI، یا اپ لوڈ کے file_url کو قبول کرتے ہیں۔ فائلیں

آؤٹ پٹ

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"
  }
}
آپ کی فائلیں، آپ کا انتخابہر outputs[].url ہمارے اسٹوریج میں ایک کاپی ہے: ہمیشہ کے لیے محفوظ (فی GB-ماہ ادائیگی) یا مفت میں 7 دن تک، آپ کی اکاؤنٹ سیٹنگ یا ?storage= کے مطابق۔
ہر ماڈل میں ایک جیسی ساختtype، url، content_type، width، height اور duration، تصاویر، ویڈیو اور آڈیو سب کے لیے یکساں۔ output ماڈل کا اپنا نتیجہ آبجیکٹ ہے۔
آؤٹ پٹ کے فیلڈز
images
array of object {url, content_type, file_name, file_size}تبدیلی سے تیار کردہ SVG فائل۔

AI ایجنٹس کے لیے: یہ صفحہ Markdown میں یہاں موجود ہے https://doitong.com/ur/developers/models/image2svg.md. تمام ماڈلز اور گائیڈز: https://doitong.com/developers/llms.txt