टेक्स्ट से 3D API

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

टेक्स्ट से 3D एक दो-चरण वाला वर्कफ़्लो इस्तेमाल करता है। पहले, आकार का मूल्यांकन करने के लिए बिना टेक्सचर वाला 3D मेश जनरेट करने हेतु एक preview टास्क (mode: "preview") बनाएँ। फिर, मेश पर टेक्सचर लागू करने के लिए पूर्ण हो चुके preview के टास्क ID को एक refine टास्क (mode: "refine") में पास करें। दोनों चरण एक ही एंडपॉइंट साझा करते हैं।


POST/openapi/v2/text-to-3d

एक Text to 3D Preview टास्क बनाएं

यह एंडपॉइंट एक Text to 3D preview टास्क बनाता है, जो एक टेक्स्ट prompt से बिना टेक्सचर वाला 3D मेश (केवल ज्यामिति) जनरेट करता है। यह दो-चरणीय वर्कफ़्लो का पहला चरण है। एक बार preview सफल हो जाने पर, टेक्सचरिंग के लिए एक refine टास्क बनाएं हेतु प्राप्त टास्क ID का उपयोग करें। पूर्ण रिस्पॉन्स स्कीमा के लिए The Text to 3D Task Object देखें।

पैरामीटर

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

    preview टास्क बनाते समय इस फ़ील्ड को "preview" पर सेट किया जाना चाहिए।

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

    बताएं कि 3D मॉडल किस प्रकार की वस्तु है। अधिकतम 800 कैरेक्टर।

  • 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 पर निर्भर करती हैं।

    स्टैंडर्ड जनरेशन (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, Ultra पास को 2048³ पर चलाता है; 4k इसे सबसे बारीक सतह विवरण के लिए 4096³ पर चलाता है।

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

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

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

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

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

  • Name
    art_style
    Type
    string
    ⚠ पुराना
    डिफ़ॉल्ट realistic
    Description

    Meshy-6 द्वारा समर्थित नहीं है। Meshy-6 का उपयोग करने वाले अनुरोध art_style को नज़रअंदाज़ कर देंगे, और कुछ संयोजनों से एरर हो सकती है। उपलब्ध वैल्यू: realistic, sculpture।

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

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

    prompt से टेक्स्ट को स्क्रीन किया जाएगा।

  • Name
    target_formats
    Type
    string[]
    Description

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

    उपलब्ध वैल्यू: glb, obj, fbx, stl, usdz, 3mf

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

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

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

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

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

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

    उपलब्ध वैल्यू: bottom, center।

रिटर्न

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

विफलता मोड

  • Name
    400 - Bad Request
    Description

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

    • पैरामीटर गायब: एक आवश्यक पैरामीटर (जैसे, prompt, mode) गायब है।
    • अमान्य पैरामीटर: art_style अनुमत वैल्यू में से एक नहीं है।
    • prompt बहुत लंबा है: prompt कैरेक्टर सीमा से अधिक है।
    • low poly के लिए असमर्थित मॉडल: 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/v2/text-to-3d
# Simple preview with required params only
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "preview",
  "prompt": "a monster mask"
}'

# Preview with Ultra 4K geometry, remesh and A-pose
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "preview",
  "prompt": "a futuristic robot warrior",
  "ai_model": "meshy-7.1",
  "geometry_resolution": "4k",
  "should_remesh": true,
  "target_polycount": 100000,
  "pose_mode": "a-pose",
  "target_formats": ["glb"]
}'

Response

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

POST/openapi/v2/text-to-3d

Text to 3D Refine टास्क बनाएं

यह एंडपॉइंट एक Text to 3D refine टास्क बनाता है, जो एक पूर्ण preview मेश पर टेक्सचर लागू करता है। आपको सफल preview टास्क से preview_task_id प्रदान करना होगा। यह दो-चरणीय वर्कफ़्लो का दूसरा चरण है।

पैरामीटर

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

    refine टास्क बनाते समय इस फ़ील्ड को "refine" पर सेट किया जाना चाहिए।

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

    संबंधित preview टास्क id।

    दिए गए preview टास्क की स्थिति SUCCEEDED होनी चाहिए।

  • 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) में से एक। उच्च रिज़ॉल्यूशन अधिक सतह विवरण कैप्चर करते हैं। यह केवल refine mode पर लागू होता है।

  • 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
    ai_model
    Type
    string
    डिफ़ॉल्ट inherited from the preview task
    Description

    refine करने के लिए उपयोग किए जाने वाले मॉडल की ID।

    उपलब्ध मान:

    • meshy-6-lite, meshy-6, meshy-7.1, latest (Meshy 7.1)
    • meshy-7 (डेप्रिकेटेड): इसके बजाय meshy-7.1 का उपयोग करें।

    preview टास्क द्वारा उपयोग किए गए मॉडल को इनहेरिट करने के लिए इस पैरामीटर को छोड़ दें, जो एक preview और उसके refine को शुरू से अंत तक एक ही मॉडल पर बनाए रखता है। उस इनहेरिटेंस को ओवरराइड करने के लिए एक स्पष्ट मान पास करें।

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

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

    texture_prompt से टेक्स्ट और texture_image_url से इमेज दोनों को स्क्रीन किया जाएगा।

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

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

  • Name
    target_formats
    Type
    string[]
    Description

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

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

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

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

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

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

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

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

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

रिटर्न

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

विफलता मोड

  • Name
    400 - Bad Request
    Description

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

    • अमान्य टास्क ID: preview_task_id अमान्य है या मौजूद नहीं है।
    • टास्क तैयार नहीं है: preview टास्क अभी तक सफल नहीं हुआ है।
    • मॉडल बेमेल: preview टास्क का AI मॉडल अनुरोधित refine मॉडल के साथ असंगत है।
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • Name
    404 - Not Found
    Description

    preview_task_id द्वारा निर्दिष्ट preview टास्क नहीं मिला।

  • Name
    429 - Too Many Requests
    Description

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

Request

POST
/openapi/v2/text-to-3d
# Basic refine task
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "refine",
  "preview_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "enable_pbr": true
}'

# Refine with auto-size and GLB format
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -H 'Authorization: Bearer ${YOUR_API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "refine",
  "preview_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "target_formats": ["glb"],
  "auto_size": true
}'

Response

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

GET/openapi/v2/text-to-3d/:id

एक Text to 3D टास्क प्राप्त करें

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

यह एंडपॉइंट preview और refine दोनों टास्क के लिए काम करता है।

पैरामीटर

  • Name
    id
    Type
    path
    Description

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

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

प्रतिक्रिया में टेक्स्ट से 3D टास्क ऑब्जेक्ट शामिल होता है। विवरण के लिए The Text to 3D Task Object सेक्शन देखें।

उदाहरण

Modeसैंपल मॉडल
PreviewPreview model
RefineRefined model

Request

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

Response

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "text-to-3d-preview",
  "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=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?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=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "prompt": "a monster mask",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***"
    }
  ],
  "preceding_tasks": 0,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 20
}

DELETE/openapi/v2/text-to-3d/:id

Text to 3D टास्क डिलीट करें

यह एंडपॉइंट किसी Text to 3D टास्क को स्थायी रूप से डिलीट कर देता है, जिसमें उससे जुड़े सभी मॉडल और डेटा शामिल हैं। यह कार्रवाई अपरिवर्तनीय (irreversible) है।

पाथ पैरामीटर

  • Name
    id
    Type
    path
    Description

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

टास्क स्टेटस

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

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

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

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

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

Request

DELETE
/openapi/v2/text-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v2/text-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/v2/text-to-3d

Text to 3D कार्यों की सूची

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

पैरामीटर

  • Name
    page_num
    Type
    integer
    डिफ़ॉल्ट 1
    Description

    पेजिनेशन के लिए पेज नंबर।

  • Name
    page_size
    Type
    integer
    डिफ़ॉल्ट 10
    Description

    पेज साइज़ सीमा। अधिकतम अनुमत 100 आइटम है।

  • Name
    sort_by
    Type
    string
    Description

    जिस फ़ील्ड के आधार पर सॉर्ट करना है।

    उपलब्ध मान:

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

रिटर्न

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

Request

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

Response

[
  {
    "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "type": "text-to-3d-preview",
    "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=***",
      "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?Expires=***",
      "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***"
    },
    "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
    "prompt": "a monster mask",
    "progress": 100,
    "started_at": 1692771667037,
    "created_at": 1692771650657,
    "finished_at": 1692771669037,
    "status": "SUCCEEDED",
    "texture_urls": [
      {
        "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***"
      }
    ],
    "preceding_tasks": 0,
    "task_error": {

      "message": ""

    },

    "consumed_credits": 20
  }
]

GET/openapi/v2/text-to-3d/:id/stream

Text to 3D टास्क को स्ट्रीम करें

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

पैरामीटर

  • Name
    id
    Type
    path
    Description

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

रिटर्न

Server-Sent Events के रूप में The Text to 3D Task Objects की एक स्ट्रीम रिटर्न करता है।

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

Request

GET
/openapi/v2/text-to-3d/018a210d-8ba4-705c-b111-1f1776f7f578/stream
curl -N https://api.meshy.ai/openapi/v2/text-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",
  "progress": 50,
  "status": "IN_PROGRESS"
}

event: message
data: {
"id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"type": "text-to-3d-preview",
"progress": 100,
"status": "SUCCEEDED",
"created_at": 1692771650657,
"started_at": 1692771667037,
"finished_at": 1692771669037,
"model_urls": {
  "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***"
},
"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": 20
}

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

टेक्स्ट से 3D टास्क ऑब्जेक्ट एक वर्क यूनिट है जिसे Meshy टेक्स्ट इनपुट से 3D मॉडल जनरेट करने के लिए ट्रैक करता है। टेक्स्ट से 3D API के दो स्टेज होते हैं, preview और refine। preview स्टेज केवल-मेश 3D मॉडल जनरेट करने के लिए है, और refine स्टेज preview स्टेज के परिणाम के आधार पर टेक्सचर्ड 3D मॉडल जनरेट करने के लिए है।

इस ऑब्जेक्ट में निम्नलिखित प्रॉपर्टीज़ हैं:

Properties

  • Name
    id
    Type
    string
    Description

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

  • Name
    type
    Type
    string
    Description

    टेक्स्ट से 3D टास्क का टाइप। संभावित वैल्यूज़ हैं preview स्टेज टास्क के लिए text-to-3d-preview और refine स्टेज टास्क के लिए text-to-3d-refine।

  • Name
    model_urls
    Type
    object
    Description

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

    • Name
      glb
      Type
      string
      Description

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

    • Name
      fbx
      Type
      string
      Description

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

    • Name
      usdz
      Type
      string
      Description

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

    • Name
      obj
      Type
      string
      Description

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

    • Name
      mtl
      Type
      string
      Description

      MTL फाइल का डाउनलोड करने योग्य URL।

    • Name
      stl
      Type
      string
      Description

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

    • Name
      3mf
      Type
      string
      Description

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

  • Name
    prompt
    Type
    string
    Description

    यह वही अपरिवर्तित prompt है जिसका उपयोग टास्क बनाने के लिए किया गया था।

  • Name
    negative_prompt
    Type
    string
    ⚠ पुराना
    Description

    बैकवर्ड कम्पेटिबिलिटी के लिए बनाए रखा गया है। इस फील्ड का जनरेट किए गए मॉडल पर कोई फंक्शनल प्रभाव नहीं है।

  • Name
    art_style
    Type
    string
    ⚠ पुराना
    Description

    वही अपरिवर्तित art_style जिसका उपयोग preview टास्क बनाने के लिए किया गया था। Meshy-6 द्वारा समर्थित नहीं है।

  • Name
    texture_richness
    Type
    string
    ⚠ पुराना
    Description

    बैकवर्ड कम्पेटिबिलिटी के लिए बनाए रखा गया है। इस फील्ड का जनरेट किए गए मॉडल पर कोई फंक्शनल प्रभाव नहीं है।

  • Name
    texture_prompt
    Type
    string
    Description

    refine स्टेज के दौरान टेक्सचरिंग प्रोसेस को गाइड करने के लिए प्रदान किया गया अतिरिक्त टेक्स्ट prompt।

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

    डेप्रिकेटेड; इसके बजाय geometry_resolution पढ़ें।

  • Name
    geometry_resolution
    Type
    string
    Description

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

  • Name
    texture_image_url
    Type
    string
    Description

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

  • Name
    thumbnail_url
    Type
    string
    Description

    मॉडल फाइल की थंबनेल इमेज का डाउनलोड करने योग्य URL।

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

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

  • Name
    video_url
    Type
    string
    ⚠ पुराना
    Description

    प्रीव्यू वीडियो का डाउनलोड करने योग्य URL। भविष्य के रिलीज़ में इसे हटा दिया जाएगा।

  • Name
    progress
    Type
    integer
    Description

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

  • Name
    started_at
    Type
    timestamp
    Description

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

  • Name
    created_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 ऑब्जेक्ट्स का एक array। सामान्यतः इसमें केवल एक टेक्सचर 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 लौटाता है (असफल होने पर क्रेडिट वापस कर दिए जाते हैं)।

Example Text to 3D Task Object

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "text-to-3d-preview",
  "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=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***"
  },
  "prompt": "a monster mask",
  "texture_prompt": "green slimy skin with scales and warts",
  "texture_image_url": "",
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "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": 20
}