इमेज से 3D API

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


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

इमेज से 3D कार्य बनाएँ

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

पैरामीटर

  • 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-कोडित डेटा 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-t1 या meshy-t2) के साथ एक Smart Topology मॉडल चुनें।
    • lowpoly (deprecated): क्लीनर पॉलीगॉन्स के लिए अनुकूलित लो-पॉली मेश उत्पन्न करता है। हम smart-topology का उपयोग करने की सिफारिश करते हैं।
  • Name
    ai_model
    Type
    string
    डिफ़ॉल्ट latest
    Description

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

    मानक जनरेशन (model_type: standard):

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

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

    • meshy-t2 (डिफ़ॉल्ट, सिफारिश की गई): Smart Topology मॉडल — क्लीनर टोपोलॉजी, स्वाभाविक रूप से विभाजित भाग, त्रिकोणीय आउटपुट, और एक फेस काउंट जिसे आप target_polycount के साथ सेट कर सकते हैं।
    • meshy-t1: पुराना लो-पॉली मॉडल; 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 मैप्स (धातु, खुरदुरापन, नॉर्मल) उत्पन्न करें। जब ai_model meshy-6 हो तो एक एमिशन मैप भी शामिल है, सिवाय जब texture_resolution: 8k हो। meshy-7 और 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

    टेक्सचरिंग प्रक्रिया का मार्गदर्शन करने के लिए एक टेक्स्ट प्रॉम्प्ट प्रदान करें। अधिकतम 600 वर्ण।

  • Name
    texture_image_url
    Type
    string
    Description

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

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

    • सार्वजनिक रूप से उपलब्ध URL: एक URL जो सार्वजनिक इंटरनेट से सुलभ है
    • Data URI: इमेज की एक बेस64-कोडित डेटा 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

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

    उपलब्ध मान:

    • 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 का प्रभाव तब होता है जब:

    • Remeshstandard मॉडल पर 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

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

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

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

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

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

    उपलब्ध मान:

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

    इसके बजाय pose_mode का उपयोग करें। चाहे मॉडल को एक ए/टी पोस में उत्पन्न किया जाए।

  • 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) संस्करण प्रदान करता है और इसे alpha_thumbnail_url के रूप में GET प्रतिक्रिया पर लौटता है। मौजूदा thumbnail_url फ़ील्ड अपरिवर्तित है।

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

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

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

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

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

Returns

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

Failure Modes

  • 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: बेस64 स्ट्रिंग खराब है।
    • अवैध पैरामीटर संयोजन: 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
# आवश्यक पैरामीटर के साथ साधारण अनुरोध
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": "<आपका सार्वजनिक रूप से सुलभ इमेज URL या बेस64-कोडित डेटा URI>"
  }'

# रीमेश, PBR, और A-पोस के साथ
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": "<आपका सार्वजनिक रूप से सुलभ इमेज URL या बेस64-कोडित डेटा 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 कार्य को वापस लाने की अनुमति देता है। देखें The Image to 3D Task Object यह देखने के लिए कि इमेज से 3D कार्य ऑब्जेक्ट में कौन सी संपत्तियाँ शामिल की जाती हैं।

पैरामीटर

  • Name
    id
    Type
    path
    Description

    पुनः प्राप्त करने के लिए इमेज से 3D कार्य के लिए अनोखा पहचानकर्ता।

Returns

प्रतिक्रिया में इमेज से 3D कार्य ऑब्जेक्ट होता है। विवरण के लिए जांचें The Image to 3D Task Object खंड।

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

पथ पैरामीटर

  • Name
    id
    Type
    path
    Description

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

Returns

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

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 लौटाता है।

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: सृजन समय द्वारा अवरोही क्रम में सॉर्ट करें।

Returns

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 कार्य को स्ट्रीम करें

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

पैरामीटर

  • Name
    id
    Type
    path
    Description

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

Returns

प्रतिक्रिया सर्वर-सेंट इवेंट्स के रूप में The Image to 3D Task Objects की एक स्ट्रीम लौटाती है।

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

// त्रुटि घटना का उदाहरण
event: error
data: {
  "status_code": 404,
  "message": "कार्य नहीं मिला"
}

// संदेश घटना उदाहरण कार्य प्रगति को दर्शाते हैं।
// `PENDING` या `IN_PROGRESS` कार्यों के लिए, प्रतिक्रिया स्ट्रीम में सभी फ़ील्ड्स शामिल नहीं होंगे।
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

  • 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। यदि प्रारूप उत्पन्न नहीं होता है तो एक खाली स्ट्रिंग वापस करने के बजाय प्रारूप के लिए विशेषता को हटा दिया जाएगा।

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

    • Name
      front
      Type
      string
      Description

      फ्रंट दृश्य, ऊर्ध्वाधर अक्ष के चारों ओर 0° रोटेशन (matches 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 ऑब्जेक्ट संदर्भ के लिए देखें Errors

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