इमेज से 3D API

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


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

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

यह एंडपॉइंट आपको एक नया इमेज से 3D टास्क बनाने की अनुमति देता है। इमेज से 3D टास्क ऑब्जेक्ट में कौन-कौन से प्रॉपर्टीज़ शामिल हैं, यह देखने के लिए 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: इमेज का एक base64-एन्कोडेड 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-6-lite, meshy-6, meshy-7.1, latest (Meshy 7.1)
    • meshy-7 (डेप्रिकेटेड): इसके बजाय meshy-7.1 का उपयोग करें।

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

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

    ज्यामिति जनरेशन पास। 2k, 2048³ पर Ultra पास चलाता है; 4k सबसे बारीक सतह विवरण के लिए इसे 4096³ पर चलाता है।

    उपलब्ध वैल्यू: standard, 2k, 4k

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

    इसके बजाय geometry_resolution का उपयोग करें। ultra_mode: true, geometry_resolution: "2k" के बराबर है।

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

    यह तय करता है कि टेक्सचर जनरेट होंगे या नहीं। इसे false सेट करने पर टेक्सचर फ़ेज़ को छोड़ दिया जाता है, जिससे बिना टेक्सचर वाला मेश मिलता है।

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

    बेस कलर के अतिरिक्त PBR मैप (मेटैलिक, रफनेस, नॉर्मल) जनरेट करें। जब ai_model, meshy-6 हो, तो texture_resolution: 8k को छोड़कर, एक एमिशन मैप भी शामिल होता है। meshy-6-lite, meshy-7.1 और latest एमिशन मैप जनरेट नहीं करते।

  • 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: इमेज का एक base64-एन्कोडेड data URI। data URI का उदाहरण: data:image/jpeg;base64,<your base64-encoded image data>
  • Name
    should_remesh
    Type
    boolean
    डिफ़ॉल्ट false (Meshy 6 and Meshy 7 models), true (others)
    Description

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

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

    जनरेट किए गए मॉडल की topology निर्दिष्ट करें।

    उपलब्ध वैल्यू:

    • quad: एक क्वाड-प्रधान मेश जनरेट करें।
    • triangle: एक डेसीमेटेड ट्राएंगल मेश जनरेट करें।
  • Name
    decimation_mode
    Type
    integer
    Description

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

    उपलब्ध वैल्यू:

    • 1: एडेप्टिव — अल्ट्रा पॉलीकाउंट।
    • 2: एडेप्टिव — हाई पॉलीकाउंट।
    • 3: एडेप्टिव — मीडियम पॉलीकाउंट।
    • 4: एडेप्टिव — लो पॉलीकाउंट।
  • 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 Topology — model_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 pose में जनरेट करें।
    • t-pose: मॉडल को T pose में जनरेट करें।
    • "" (खाली स्ट्रिंग): कोई विशिष्ट pose लागू नहीं।
  • Name
    is_a_t_pose
    Type
    boolean
    ⚠ पुराना
    डिफ़ॉल्ट false
    Description

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

  • 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 विज़न का उपयोग करती है और उसके अनुसार मॉडल का आकार बदल देती है। जब तक 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 सेट किया जाता है, तो टास्क अतिरिक्त रूप से चार कार्डिनल-व्यू थंबनेल (front, right, back, left) रेंडर करता है और उन्हें GET रिस्पॉन्स पर thumbnail_urls के अंतर्गत लौटाता है। मौजूदा thumbnail_url फ़ील्ड अपरिवर्तित रहती है और front view की ओर इशारा करना जारी रखती है, इसलिए मौजूदा क्लाइंट प्रभावित नहीं होते।

केवल तब लागू होता है जब 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 स्ट्रिंग गलत फॉर्मैट में है।
    • अमान्य पैरामीटर संयोजन: enable_pbr केवल तभी समर्थित है जब should_texture true हो।
    • लो पॉली के लिए असमर्थित मॉडल: ai_model: "meshy-6-lite", model_type: "lowpoly" को सपोर्ट नहीं करता है।
    • Ultra के लिए असमर्थित मॉडल: geometry_resolution के लिए meshy-7.1 या latest आवश्यक है।
  • 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 Ultra 4K geometry, 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>",
    "ai_model": "meshy-7.1",
    "geometry_resolution": "4k",
    "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 टास्क के लिए यूनीक पहचानकर्ता (identifier)।

रिटर्न

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

Request

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}"

Response

{
  "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 टास्क को स्थायी रूप से डिलीट कर देता है, जिसमें सभी संबंधित मॉडल और डेटा शामिल हैं। यह क्रिया अपरिवर्तनीय है।

Path Parameters

  • Name
    id
    Type
    path
    Description

    डिलीट किए जाने वाले इमेज से 3D टास्क की ID।

टास्क स्टेटस

जो टास्क अभी भी PENDING है, वह डिलीट कर दिया जाता है और क्रिएट-टाइम पर खर्च किए गए क्रेडिट रिफंड कर दिए जाते हैं।

जो टास्क पहले से IN_PROGRESS है, उसे डिलीट नहीं किया जा सकता: रिक्वेस्ट को 409 Conflict के साथ रिजेक्ट कर दिया जाता है और टास्क चलता रहता है। जिस टास्क को वर्कर पहले ही शुरू कर चुका है, उसके क्रेडिट रिफंड योग्य नहीं होते, इसलिए उसे बीच में डिलीट करने पर आपको क्रेडिट और रिजल्ट दोनों गंवाने पड़ेंगे। इसके SUCCEEDED, FAILED या CANCELED तक पहुंचने का इंतजार करें, फिर उसे डिलीट करें।

टर्मिनल स्टेट (SUCCEEDED, FAILED या CANCELED) में मौजूद टास्क बिना किसी रिफंड के डिलीट कर दिया जाता है।

Returns

सफल होने पर 200 OK लौटाता है, या जब टास्क IN_PROGRESS हो तो 409 Conflict लौटाता है।

Request

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}"

Response

// 200 OK on success, with an empty body.
//
// 409 Conflict when the task is IN_PROGRESS — the task is left running:
{
  "message": "Task is IN_PROGRESS and cannot be deleted. Credits for a task the worker has already started are not refundable; wait for it to reach SUCCEEDED, FAILED or CANCELED, then delete it."
}

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

इमेज से 3D टास्क सूचीबद्ध करें

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

पैरामीटर

वैकल्पिक एट्रिब्यूट

  • Name
    page_num
    Type
    integer
    Description

    पेजिनेशन के लिए पेज नंबर। शुरुआत और डिफ़ॉल्ट 1 है।

  • Name
    page_size
    Type
    integer
    Description

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

  • Name
    sort_by
    Type
    string
    Description

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

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

रिटर्न

The Image to 3D Task Objects की एक पेजिनेटेड सूची लौटाता है।

Request

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}"

Response

[
  {
    "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 टास्क स्ट्रीम करें

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

पैरामीटर

  • Name
    id
    Type
    path
    Description

    स्ट्रीम करने के लिए इमेज से 3D टास्क का यूनीक आइडेंटिफायर।

रिटर्न वैल्यू

इमेज से 3D टास्क ऑब्जेक्ट्स की एक स्ट्रीम को Server-Sent Events के रूप में रिटर्न करता है।

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 मॉडल जनरेट करने के लिए ट्रैक करता है। इस ऑब्जेक्ट में निम्नलिखित properties होती हैं:

Properties

  • Name
    id
    Type
    string
    Description

    टास्क के लिए यूनीक आइडेंटिफायर। हालाँकि हम टास्क id के लिए इम्प्लीमेंटेशन डिटेल के रूप में k-sortable UUID का उपयोग करते हैं, आपको id के फॉर्मेट के बारे में कोई धारणा नहीं बनानी चाहिए।

  • Name
    type
    Type
    string
    Description

    इमेज से 3D टास्क का टाइप। इसका वैल्यू image-to-3d है।

  • Name
    model_urls
    Type
    object
    Description

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

    • 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

      remesh किए जाने से पहले के मूल 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 मॉडल के चार कार्डिनल-व्यू थंबनेल्स के लिए डाउनलोड करने योग्य URLs। प्रत्येक वैल्यू एक साइन्ड URL है जो thumbnail_url जैसे ही मैटेरियल्स और लाइटिंग के साथ रेंडर की गई 512×512 PNG की ओर इंगित करती है। बैच पाइपलाइनों में 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

    टेक्स्ट prompt जिसका उपयोग टेक्सचरिंग प्रक्रिया को गाइड करने के लिए किया गया था।

  • Name
    texture_image_url
    Type
    string
    Description

    टेक्सचर इमेज का डाउनलोड करने योग्य URL जिसका उपयोग टेक्सचरिंग प्रक्रिया को गाइड करने के लिए किया गया था।

  • Name
    ultra_mode
    Type
    boolean
    ⚠ पुराना
    Description

    डेप्रिकेटेड; इसके बदले geometry_resolution पढ़ें।

  • Name
    geometry_resolution
    Type
    string
    Description

    वह Ultra टियर जिस पर टास्क चला (2k या 4k); standard के लिए छोड़ दिया जाता है।

  • Name
    progress
    Type
    integer
    Description

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

  • Name
    started_at
    Type
    timestamp
    Description

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

  • Name
    created_at
    Type
    timestamp
    Description

    टास्क बनाए जाने का टाइमस्टैंप, मिलीसेकंड में।

  • Name
    expires_at
    Type
    timestamp
    Description

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

  • Name
    finished_at
    Type
    timestamp
    Description

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

  • Name
    status
    Type
    string
    Description

    टास्क का स्टेटस। संभावित वैल्यूज़ हैं PENDING, IN_PROGRESS, SUCCEEDED, FAILED, CANCELED में से एक।

  • Name
    texture_urls
    Type
    array
    Description

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

    • 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 लौटाता है (असफलता पर क्रेडिट रिफंड कर दिए जाते हैं)।

Example Image to 3D Task Object

{
  "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
}