इमेज से 3D API

इमेज से 3D API एक विशेषता है जो आपको Meshy की इमेज से 3D क्षमताओं को अपने स्वयं के एप्लिकेशन में एकीकृत करने की अनुमति देती है। इस अनुभाग में, आपको इस API के साथ शुरुआत करने के लिए आवश्यक सभी जानकारी मिलेगी।


POST/openapi/v1/image-to-3d

इमेज से 3D टास्क बनाएं

यह एंडपॉइंट आपको एक नया इमेज से 3D टास्क बनाने की सुविधा देता है। इमेज से 3D टास्क ऑब्जेक्ट के साथ शामिल properties देखने के लिए The Image to 3D Task Object देखें।

पैरामीटर

  • Name
    input_task_id
    Type
    string
    आवश्यक
    Description

    एक पूर्ण हो चुके इमेज-जनरेशन टास्क का ID, जिसका आउटपुट इनपुट इमेज के रूप में उपयोग किया जाना चाहिए। यह टास्क निम्न में से एक होना चाहिए: टेक्स्ट से इमेज या इमेज से इमेज। इसके अतिरिक्त, इसे API के माध्यम से चलाया गया होना चाहिए, इसकी स्थिति SUCCEEDED होनी चाहिए, और यह ठीक एक इमेज उत्पन्न करना चाहिए।

  • Name
    image_url
    Type
    string
    आवश्यक
    Description

    मॉडल बनाने में Meshy द्वारा उपयोग करने के लिए एक इमेज प्रदान करें। हम वर्तमान में .jpg, .jpeg, और .png फॉर्मेट का समर्थन करते हैं।

    इमेज प्रदान करने के दो तरीके हैं:

    • सार्वजनिक रूप से एक्सेस किया जा सकने वाला URL: एक URL जो सार्वजनिक इंटरनेट से एक्सेस किया जा सकता है।
    • Data URI: इमेज का बेस64-एन्कोडेड data URI। data URI का उदाहरण: data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    model_type
    Type
    string
    डिफ़ॉल्ट standard
    Description

    3D मेश जनरेशन के प्रकार को निर्दिष्ट करें।

    उपलब्ध मान:

    • standard: नियमित उच्च-विस्तार वाला 3D मेश जनरेशन।
    • smart-topology: ai_model (meshy-t2) के साथ एक Smart Topology मॉडल चुनें।
    • lowpoly (डेप्रिकेटेड): क्लीनर पॉलीगॉन के लिए ऑप्टिमाइज़ किया गया लो-पॉली मेश उत्पन्न करता है। इसके बजाय हम smart-topology का उपयोग करने की सलाह देते हैं।
  • Name
    ai_model
    Type
    string
    डिफ़ॉल्ट latest
    Description

    उपयोग करने वाले मॉडल का ID। उपलब्ध मान model_type पर निर्भर करते हैं।

    Standard जनरेशन (model_type: standard):

    • meshy-5, meshy-6, meshy-7, latest (Meshy 7)

    Smart Topology जनरेशन (model_type: smart-topology):

    • meshy-t2 (डिफ़ॉल्ट): Smart Topology मॉडल — क्लीनर topology, स्वाभाविक रूप से अलग किए गए भाग, ट्राइऐंगल आउटपुट, और एक फेस काउंट जिसे आप target_polycount से सेट कर सकते हैं।
  • Name
    ultra_mode
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    बेहतर सतह विवरण के साथ उच्च-फिडेलिटी ज्यामिति के लिए Ultra जनरेशन सक्षम करता है।

  • Name
    should_texture
    Type
    boolean
    डिफ़ॉल्ट true
    Description

    निर्धारित करता है कि टेक्सचर उत्पन्न किए जाएं या नहीं। इसे false पर सेट करने से टेक्सचर फ़ेज़ छूट जाता है, जिससे टेक्सचर के बिना एक मेश मिलता है।

केवल तब लागू होता है जब should_texture = true
  • Name
    enable_pbr
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    बेस कलर के अतिरिक्त PBR मैप (metallic, roughness, normal) उत्पन्न करें। जब ai_model meshy-6 हो, तो एक emission मैप भी शामिल किया जाता है, सिवाय texture_resolution: 8k पर। meshy-7 और latest emission मैप उत्पन्न नहीं करते।

  • Name
    texture_resolution
    Type
    string
    डिफ़ॉल्ट 2k
    Description

    बेस कलर टेक्सचर रेज़ॉल्यूशन। 2k (2048×2048), 4k (4096×4096), या 8k (8192×8192) में से एक। उच्च रेज़ॉल्यूशन अधिक सतह विवरण कैप्चर करते हैं।

  • Name
    hd_texture
    Type
    boolean
    पुराना
    डिफ़ॉल्ट false
    Description

    इसके बजाय texture_resolution का उपयोग करें — यह texture_resolution: "4k" के समान है। जब दोनों सेट हों, तो texture_resolution को प्राथमिकता मिलती है।

  • Name
    texture_prompt
    Type
    string
    Description

    टेक्सचरिंग प्रक्रिया को गाइड करने के लिए एक टेक्स्ट prompt प्रदान करें। अधिकतम 800 वर्ण।

  • Name
    texture_image_url
    Type
    string
    Description

    टेक्सचरिंग प्रक्रिया को गाइड करने के लिए एक 2d इमेज प्रदान करें। हम वर्तमान में .jpg, .jpeg, और .png फॉर्मेट का समर्थन करते हैं।

    इमेज प्रदान करने के दो तरीके हैं:

    • सार्वजनिक रूप से एक्सेस किया जा सकने वाला URL: एक URL जो सार्वजनिक इंटरनेट से एक्सेस किया जा सकता है
    • Data URI: इमेज का बेस64-एन्कोडेड data URI। data URI का उदाहरण: data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    should_remesh
    Type
    boolean
    डिफ़ॉल्ट false (meshy-6, meshy-7), true (others)
    Description

    नियंत्रित करता है कि रीमेश फ़ेज़ सक्षम किया जाए या नहीं। उच्चतम-गुणवत्ता वाले मॉडल के लिए, हम should_remesh को false पर सेट करने की सलाह देते हैं।

केवल तब लागू होता है जब should_remesh = true
  • Name
    topology
    Type
    string
    डिफ़ॉल्ट triangle
    Description

    उत्पन्न मॉडल की topology निर्दिष्ट करें।

    उपलब्ध मान:

    • quad: एक quad-प्रधान मेश उत्पन्न करें।
    • triangle: एक डेसिमेटेड ट्राइऐंगल मेश उत्पन्न करें।
  • Name
    decimation_mode
    Type
    integer
    Description

    पॉलीकाउंट स्तर सेट करके adaptive डेसिमेशन सक्षम करें। जब सेट किया जाता है, तो target_polycount को अनदेखा कर दिया जाता है।

    उपलब्ध मान:

    • 1: Adaptive — अल्ट्रा पॉलीकाउंट।
    • 2: Adaptive — उच्च पॉलीकाउंट।
    • 3: Adaptive — मध्यम पॉलीकाउंट।
    • 4: Adaptive — निम्न पॉलीकाउंट।
  • Name
    save_pre_remeshed_model
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    जब true पर सेट किया जाता है, तो Meshy रीमेश फ़ेज़ पूरा होने से पहले एक अतिरिक्त GLB फ़ाइल भी संग्रहीत करता है।

  • Name
    target_polycount
    Type
    integer
    Description

    आउटपुट में पॉलीगॉन (फेस) की लक्ष्य संख्या। ज्यामिति के आधार पर वास्तविक संख्या लक्ष्य से भिन्न हो सकती है।

    target_polycount दो स्वतंत्र मामलों में प्रभावी होता है:

    • रीमेश — किसी standard मॉडल पर should_remesh: true के साथ। मेश को लगभग इस संख्या में रीमेश (डेसिमेट) किया जाता है। रेंज 100 से 300,000, डिफ़ॉल्ट 30,000। यदि decimation_mode सेट है, तो यह प्राथमिकता लेता है और target_polycount को अनदेखा कर दिया जाता है।
    • Smart Topologymodel_type: smart-topology और ai_model: meshy-t2 के साथ। मॉडल को इस फेस काउंट पर सीधे उत्पन्न किया जाता है; कोई रीमेश नहीं चलता है और should_remesh आवश्यक नहीं है। रेंज 100 से 15,000, डिफ़ॉल्ट 4,000।
  • Name
    symmetry_mode
    Type
    string
    पुराना
    डिफ़ॉल्ट auto
    Description

    डेप्रिकेटेड। यह पैरामीटर अब आउटपुट को प्रभावित नहीं करता है।

    symmetry_mode फील्ड मॉडल जनरेशन प्रक्रिया के दौरान सममिति व्यवहार को नियंत्रित करता है।

    मान्य मान हैं:

    • off: सममिति को अक्षम करता है।
    • auto: इनपुट ज्यामिति के आधार पर स्वचालित रूप से सममिति निर्धारित करता है और लागू करता है।
    • on: जनरेशन के दौरान सममिति को लागू करता है।
  • Name
    pose_mode
    Type
    string
    डिफ़ॉल्ट ""
    Description

    उत्पन्न मॉडल के लिए pose mode निर्दिष्ट करें।

    उपलब्ध मान:

    • a-pose: मॉडल को A पोज़ में उत्पन्न करें।
    • t-pose: मॉडल को T पोज़ में उत्पन्न करें।
    • "" (खाली स्ट्रिंग): कोई विशिष्ट पोज़ लागू नहीं किया गया।
  • Name
    is_a_t_pose
    Type
    boolean
    पुराना
    डिफ़ॉल्ट false
    Description

    इसके बजाय pose_mode का उपयोग करें। मॉडल को A/T पोज़ में उत्पन्न करना है या नहीं।

  • Name
    image_enhancement
    Type
    boolean
    डिफ़ॉल्ट true
    Description

    बेहतर परिणामों के लिए इनपुट इमेज को ऑप्टिमाइज़ करता है। इनपुट इमेज के सटीक स्वरूप को किसी भी स्टाइल प्रोसेसिंग के बिना संरक्षित करने के लिए false पर सेट करें।

  • Name
    remove_lighting
    Type
    boolean
    डिफ़ॉल्ट true
    Description

    बेस कलर टेक्सचर से हाइलाइट्स और शैडो को हटाता है, जिससे एक क्लीनर परिणाम मिलता है जो कस्टम लाइटिंग सेटअप के तहत बेहतर काम करता है।

  • Name
    moderation
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    जब true पर सेट किया जाता है, तो इनपुट सामग्री की स्वचालित रूप से संभावित हानिकारक सामग्री के लिए जांच की जाएगी। यदि हानिकारक सामग्री का पता चलता है, तो टास्क जनरेशन के लिए आगे नहीं बढ़ेगा।

    image_url, texture_image_url, और texture_prompt इनपुट से सामग्री की जांच की जाएगी।

  • Name
    target_formats
    Type
    string[]
    Description

    निर्दिष्ट करता है कि आउटपुट में कौन से 3D फ़ाइल फॉर्मेट शामिल किए जाएं। केवल अनुरोध किए गए फॉर्मेट ही उत्पन्न और लौटाए जाएंगे, जो टास्क पूर्णता समय को कम कर सकता है। जब छोड़ दिया जाता है, तो सभी समर्थित फॉर्मेट शामिल किए जाते हैं।

    उपलब्ध मान: glb, obj, fbx, stl, usdz, 3mf

  • Name
    auto_size
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    जब true पर सेट किया जाता है, तो सेवा ऑब्जेक्ट की रीयल-वर्ल्ड ऊँचाई का स्वचालित रूप से अनुमान लगाने के लिए AI vision का उपयोग करती है और उसके अनुसार मॉडल को रीसाइज़ करती है। जब तक origin_at को स्पष्ट रूप से सेट नहीं किया जाता, ओरिजिन डिफ़ॉल्ट रूप से bottom होगा।

  • Name
    alpha_thumbnail
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    जब true पर सेट किया जाता है, तो टास्क अतिरिक्त रूप से प्रीव्यू का एक ट्रांसपेरेंट-बैकग्राउंड (RGBA) संस्करण रेंडर करता है और GET रिस्पॉन्स पर इसे alpha_thumbnail_url के रूप में लौटाता है। मौजूदा thumbnail_url फील्ड अपरिवर्तित रहती है।

  • Name
    multi_view_thumbnails
    Type
    boolean
    डिफ़ॉल्ट false
    Description

    जब true पर सेट किया जाता है, तो टास्क अतिरिक्त रूप से चार कार्डिनल-व्यू थंबनेल (सामने, दाएं, पीछे, बाएं) रेंडर करता है और उन्हें GET रिस्पॉन्स पर thumbnail_urls के अंतर्गत लौटाता है। मौजूदा thumbnail_url फील्ड अपरिवर्तित रहती है और सामने के व्यू की ओर इंगित करना जारी रखती है, इसलिए मौजूदा क्लाइंट प्रभावित नहीं होते हैं।

केवल तब लागू होता है जब auto_size = true
  • Name
    origin_at
    Type
    string
    डिफ़ॉल्ट bottom
    Description

    जब auto_size सक्षम हो तो ओरिजिन की स्थिति।

    उपलब्ध मान: bottom, center

रिटर्न

रिस्पॉन्स की result प्रॉपर्टी में नए बनाए गए इमेज से 3D टास्क का टास्क id होता है।

विफलता मोड

  • Name
    400 - Bad Request
    Description

    अनुरोध स्वीकार्य नहीं था। सामान्य कारण:

    • गुम पैरामीटर: image_url या input_task_id में से एक प्रदान किया जाना चाहिए।
    • अमान्य इनपुट टास्क: input_task_id को एक SUCCEEDED टेक्स्ट से इमेज या इमेज से इमेज टास्क को संदर्भित करना चाहिए जो ठीक एक इमेज उत्पन्न करता है।
    • अमान्य इमेज फॉर्मेट: प्रदान किया गया image_url एक समर्थित फॉर्मेट नहीं है (.jpg, .jpeg, .png)।
    • अनुपलब्ध URL: image_url को डाउनलोड नहीं किया जा सका (404 या timeout)।
    • अमान्य Data URI: base64 स्ट्रिंग malformed है।
    • अमान्य पैरामीटर संयोजन: enable_pbr केवल तब समर्थित है जब should_texture true हो।
  • Name
    401 - Unauthorized
    Description

    प्रमाणीकरण विफल रहा। कृपया अपनी API की जाँच करें।

  • Name
    402 - Payment Required
    Description

    इस टास्क को करने के लिए अपर्याप्त क्रेडिट।

  • Name
    429 - Too Many Requests
    Description

    आपने अपनी रेट लिमिट पार कर ली है।

Request

POST
/openapi/v1/image-to-3d
# Simple request with required params
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_url": "<your publicly accessible image url or base64-encoded data URI>"
  }'

# With remesh, PBR, and A-pose
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_url": "<your publicly accessible image url or base64-encoded data URI>",
    "enable_pbr": true,
    "should_remesh": true,
    "target_polycount": 100000,
    "should_texture": true,
    "pose_mode": "a-pose",
    "target_formats": ["glb"]
  }'

Response

{
  "result": "018a210d-8ba4-705c-b111-1f1776f7f578"
}

GET/openapi/v1/image-to-3d/:id

इमेज से 3D कार्य प्राप्त करें

यह एंडपॉइंट आपको एक मान्य कार्य id के साथ इमेज से 3D कार्य प्राप्त करने की अनुमति देता है। यह देखने के लिए इमेज से 3D कार्य ऑब्जेक्ट का संदर्भ लें कि इमेज से 3D कार्य ऑब्जेक्ट के साथ कौन-कौन सी प्रॉपर्टीज शामिल हैं।

पैरामीटर्स

  • Name
    id
    Type
    path
    Description

    प्राप्त करने के लिए इमेज से 3D कार्य का अद्वितीय पहचानकर्ता।

रिटर्न्स

प्रतिक्रिया में इमेज से 3D कार्य ऑब्जेक्ट शामिल होता है। विवरण के लिए इमेज से 3D कार्य ऑब्जेक्ट अनुभाग देखें।

अनुरोध

GET
/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl https://api.meshy.ai/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

प्रतिक्रिया

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "image-to-3d",
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
    "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
    "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
    "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
    "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
    "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {
    "message": ""
  },
  "consumed_credits": 30
}

DELETE/openapi/v1/image-to-3d/:id

इमेज से 3D कार्य को हटाएं

यह एंडपॉइंट एक इमेज से 3D कार्य को स्थायी रूप से हटाता है, जिसमें सभी संबंधित मॉडल और डेटा शामिल होते हैं। यह क्रिया अपरिवर्तनीय है।

पथ पैरामीटर्स

  • Name
    id
    Type
    path
    Description

    हटाने के लिए इमेज से 3D कार्य का ID।

रिटर्न्स

सफलता पर 200 OK लौटाता है।

अनुरोध

DELETE
/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

प्रतिक्रिया

// Returns 200 Ok on success.

GET/openapi/v1/image-to-3d

इमेज से 3D कार्यों की सूची

यह एंडपॉइंट आपको इमेज से 3D कार्यों की सूची प्राप्त करने की अनुमति देता है।

पैरामीटर्स

वैकल्पिक विशेषताएँ

  • Name
    page_num
    Type
    integer
    Description

    पेजिनेशन के लिए पृष्ठ संख्या। 1 से शुरू होती है और डिफ़ॉल्ट होती है।

  • Name
    page_size
    Type
    integer
    Description

    पृष्ठ आकार सीमा। डिफ़ॉल्ट रूप से 10 आइटम्स। अधिकतम अनुमत 50 आइटम्स हैं।

  • Name
    sort_by
    Type
    string
    Description

    क्रमबद्ध करने के लिए फ़ील्ड। उपलब्ध मान:

    • +created_at: निर्माण समय के अनुसार आरोही क्रम में क्रमबद्ध करें।
    • -created_at: निर्माण समय के अनुसार अवरोही क्रम में क्रमबद्ध करें।

रिटर्न्स

इमेज से 3D कार्य ऑब्जेक्ट्स की एक पेजिनेटेड सूची लौटाता है।

अनुरोध

GET
/openapi/v1/image-to-3d
curl https://api.meshy.ai/openapi/v1/image-to-3d?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"

प्रतिक्रिया

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "image-to-3d",
    "model_urls": {
      "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
      "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
      "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
      "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
      "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
    "thumbnail_urls": {
      "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
      "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
      "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
      "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
    },
    "texture_prompt": "",
    "progress": 100,
    "started_at": 1692771667037,
    "created_at": 1692771650657,
    "expires_at": 1692771679037,
    "finished_at": 1692771669037,
    "status": "SUCCEEDED",
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
        "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
        "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
        "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
        "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
      }
    ],
    "preceding_tasks": 0,
    "task_error": {
      "message": ""
    },
    "consumed_credits": 30
  }
]

GET/openapi/v1/image-to-3d/:id/stream

इमेज से 3D कार्य को स्ट्रीम करें

यह एंडपॉइंट सर्वर-सेंट इवेंट्स (SSE) का उपयोग करके इमेज से 3D कार्य के लिए रीयल-टाइम अपडेट स्ट्रीम करता है।

पैरामीटर्स

  • Name
    id
    Type
    path
    Description

    इमेज से 3D कार्य के लिए अद्वितीय पहचानकर्ता जिसे स्ट्रीम करना है।

रिटर्न्स

सर्वर-सेंट इवेंट्स के रूप में इमेज से 3D कार्य ऑब्जेक्ट्स की एक स्ट्रीम लौटाता है।

PENDING या IN_PROGRESS कार्यों के लिए, प्रतिक्रिया स्ट्रीम केवल आवश्यक progress और status फ़ील्ड्स को शामिल करेगी।

Request

GET
/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/stream
curl -N https://api.meshy.ai/openapi/v1/image-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"

Response Stream

// Error event example
event: error
data: {
  "status_code": 404,
  "message": "Task not found"
}

// Message event examples illustrate task progress.
// For PENDING or IN_PROGRESS tasks, the response stream will not include all fields.
event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "image-to-3d",
  "model_urls": {
  "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
  "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
  "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
  "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
  "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
  "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
    "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
    "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
    "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
    "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {
    "message": ""
  },
  "consumed_credits": 30
}

इमेज से 3D टास्क ऑब्जेक्ट

इमेज से 3D टास्क ऑब्जेक्ट एक कार्य इकाई है जिसे Meshy एक इमेज इनपुट से 3D मॉडल उत्पन्न करने के लिए ट्रैक करता है। इस ऑब्जेक्ट में निम्नलिखित गुण होते हैं:

गुण

  • Name
    id
    Type
    string
    Description

    कार्य के लिए अद्वितीय पहचानकर्ता। जबकि हम कार्य आईडी के लिए k-sortable UUID का उपयोग करते हैं, आपको आईडी के प्रारूप के बारे में कोई अनुमान नहीं लगाना चाहिए।

  • Name
    type
    Type
    string
    Description

    इमेज से 3D टास्क का प्रकार। इसका मान image-to-3d है।

  • Name
    model_urls
    Type
    object
    Description

    Meshy द्वारा उत्पन्न टेक्सचरयुक्त 3D मॉडल फ़ाइल के लिए डाउनलोड करने योग्य URL। यदि कोई प्रारूप उत्पन्न नहीं होता है तो खाली स्ट्रिंग लौटाने के बजाय उस प्रारूप के लिए गुण छोड़ दिया जाएगा।

    • Name
      glb
      Type
      string
      Description

      GLB फ़ाइल के लिए डाउनलोड करने योग्य URL।

    • Name
      fbx
      Type
      string
      Description

      FBX फ़ाइल के लिए डाउनलोड करने योग्य URL।

    • Name
      obj
      Type
      string
      Description

      OBJ फ़ाइल के लिए डाउनलोड करने योग्य URL।

    • Name
      usdz
      Type
      string
      Description

      USDZ फ़ाइल के लिए डाउनलोड करने योग्य URL।

    • Name
      mtl
      Type
      string
      Description

      MTL फ़ाइल के लिए डाउनलोड करने योग्य URL, जब टेक्सचर मौजूद होते हैं तो OBJ निर्यात के साथ लौटाया जाता है।

    • Name
      stl
      Type
      string
      Description

      STL फ़ाइल के लिए डाउनलोड करने योग्य URL।

    • Name
      3mf
      Type
      string
      Description

      3MF फ़ाइल के लिए डाउनलोड करने योग्य URL। केवल तब मौजूद होता है जब target_formats के माध्यम से 3mf का अनुरोध किया गया हो।

    • Name
      pre_remeshed_glb
      Type
      string
      Description

      रीमेशिंग से पहले मूल GLB आउटपुट के लिए डाउनलोड करने योग्य URL।

  • Name
    thumbnail_url
    Type
    string
    Description

    मॉडल फ़ाइल की थंबनेल छवि के लिए डाउनलोड करने योग्य URL। जब मौजूद होता है तो thumbnail_urls.front के बराबर, पिछली संगतता के लिए रखा गया।

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    thumbnail_url के एक पारदर्शी-पृष्ठभूमि (RGBA) संस्करण के लिए डाउनलोड करने योग्य URL। केवल तब मौजूद होता है जब कार्य alpha_thumbnail: true के साथ बनाया गया था और पारदर्शी पूर्वावलोकन सफलतापूर्वक प्रस्तुत किया गया था; अन्यथा यह फ़ील्ड छोड़ दिया जाता है।

  • Name
    thumbnail_urls
    Type
    object
    Description

    उत्पन्न 3D मॉडल के चार कार्डिनल-व्यू थंबनेल के लिए डाउनलोड करने योग्य URL। प्रत्येक मान 512×512 PNG के लिए एक साइन किया हुआ URL है जो thumbnail_url के समान सामग्री और प्रकाश के साथ प्रस्तुत किया गया है। बैच पाइपलाइनों में कई कोणों से मॉडल का पूर्वावलोकन करने के लिए उपयोगी है बिना GLB डाउनलोड किए।

    • Name
      front
      Type
      string
      Description

      फ्रंट व्यू, ऊर्ध्वाधर अक्ष के चारों ओर 0° घुमाव (thumbnail_url से मेल खाता है)।

    • Name
      right
      Type
      string
      Description

      राइट व्यू, 90° घुमाव।

    • Name
      back
      Type
      string
      Description

      बैक व्यू, 180° घुमाव।

    • Name
      left
      Type
      string
      Description

      लेफ्ट व्यू, 270° घुमाव।

  • Name
    texture_prompt
    Type
    string
    Description

    टेक्सचरिंग प्रक्रिया को मार्गदर्शित करने के लिए उपयोग किया गया टेक्स्ट प्रॉम्प्ट।

  • Name
    texture_image_url
    Type
    string
    Description

    टेक्सचरिंग प्रक्रिया को मार्गदर्शित करने के लिए उपयोग की गई टेक्सचर छवि के लिए डाउनलोड करने योग्य URL।

  • Name
    ultra_mode
    Type
    boolean
    Description

    उस ultra_mode मान को प्रतिध्वनित करता है जिसके साथ कार्य बनाया गया था। केवल meshy-7 (या latest) कार्यों के लिए मौजूद होता है जिन्होंने स्पष्ट रूप से ultra_mode सेट किया था; अन्यथा छोड़ा जाता है।

  • Name
    progress
    Type
    integer
    Description

    कार्य की प्रगति। यदि कार्य अभी तक शुरू नहीं हुआ है, तो यह गुण 0 होगा। एक बार कार्य सफल हो जाने पर, यह 100 हो जाएगा।

  • Name
    started_at
    Type
    timestamp
    Description

    कार्य कब शुरू हुआ था का टाइमस्टैंप, मिलीसेकंड में। यदि कार्य अभी तक शुरू नहीं हुआ है, तो यह गुण 0 होगा।

  • Name
    created_at
    Type
    timestamp
    Description

    कार्य कब बनाया गया था का टाइमस्टैंप, मिलीसेकंड में।

  • Name
    expires_at
    Type
    timestamp
    Description

    कार्य परिणाम कब समाप्त होता है का टाइमस्टैंप, मिलीसेकंड में।

  • Name
    finished_at
    Type
    timestamp
    Description

    कार्य कब समाप्त हुआ था का टाइमस्टैंप, मिलीसेकंड में। यदि कार्य अभी तक समाप्त नहीं हुआ है, तो यह गुण 0 होगा।

  • Name
    status
    Type
    string
    Description

    कार्य की स्थिति। संभावित मान PENDING, IN_PROGRESS, SUCCEEDED, FAILED, CANCELED में से एक हैं।

  • Name
    texture_urls
    Type
    array
    Description

    कार्य से उत्पन्न टेक्सचर URL ऑब्जेक्ट्स की एक श्रृंखला। सामान्यतः इसमें केवल एक टेक्सचर URL ऑब्जेक्ट होता है। प्रत्येक टेक्सचर URL में निम्नलिखित गुण होते हैं:

    • Name
      base_color
      Type
      string
      Description

      बेस कलर मैप छवि के लिए डाउनलोड करने योग्य URL।

    • Name
      metallic
      Type
      string
      Description

      मेटालिक मैप छवि के लिए डाउनलोड करने योग्य URL।

    • Name
      normal
      Type
      string
      Description

      नॉर्मल मैप छवि के लिए डाउनलोड करने योग्य URL।

    • Name
      roughness
      Type
      string
      Description

      रफनेस मैप छवि के लिए डाउनलोड करने योग्य URL।

    • Name
      emission
      Type
      string
      Description

      एमिशन मैप छवि के लिए डाउनलोड करने योग्य URL।

  • Name
    preceding_tasks
    Type
    integer
    Description

    पूर्ववर्ती कार्यों की संख्या।

  • Name
    task_error
    Type
    object
    Description

    असफल कार्यों के लिए त्रुटि विवरण। पूर्ण task_error ऑब्जेक्ट संदर्भ के लिए एरर देखें।

  • Name
    consumed_credits
    Type
    integer
    Description

    इस कार्य द्वारा उपभोग किए गए क्रेडिट की संख्या। जब कार्य की स्थिति PENDING, IN_PROGRESS, या SUCCEEDED होती है, तो मौजूद होता है। FAILED कार्यों के लिए 0 लौटाता है (असफलता पर क्रेडिट वापस कर दिए जाते हैं)।

उदाहरण इमेज से 3D टास्क ऑब्जेक्ट

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "image-to-3d",
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***",
    "pre_remeshed_glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/pre_remeshed_model.glb?Expires=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "thumbnail_urls": {
    "front": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_front.png?Expires=***",
    "right": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_right.png?Expires=***",
    "back": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_back.png?Expires=***",
    "left": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview_left.png?Expires=***"
  },
  "texture_prompt": "",
  "texture_image_url": "",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "expires_at": 1692771679037,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {
    "message": ""
  },
  "consumed_credits": 30
}