इमेज से 3D API
किसी इमेज को 3D मॉडल में बदलें, टेक्सचर्ड या अनटेक्सचर्ड, आपके चुने हुए फॉर्मेट्स में। इमेज भेजें, या टेक्स्ट से इमेज या इमेज से इमेज टास्क के आउटपुट का उपयोग करें।
इमेज से 3D टास्क बनाएं
एक इमेज से 3D टास्क बनाता है। यह टास्क बैकग्राउंड में चलता है। टास्क में आमतौर पर कितना समय लगता है, यह जानने के लिए देखें Processing times।
Request
# 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"]
}'
# Textured with Meshy N1 from the input image
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",
"texture_model": "meshy-n1"
}'
Response
{
"result": "018a210d-8ba4-705c-b111-1f1776f7f578"
}
पैरामीटर
- Name
- input_task_id
- Type
- string
- आवश्यक
- Description
यह आवश्यक है जब तक आप
image_urlनहीं भेजते। किसी टेक्स्ट से इमेज या इमेज से इमेज टास्क की ID, जिसकी इमेज को आप इनपुट के रूप में उपयोग करना चाहते हैं। यह टास्क ऐसा होना चाहिए जिसे आपने API से बनाया हो, जिसकी स्थितिSUCCEEDEDहो, और जिसने बिल्कुल एक इमेज बनाई हो।
- Name
- image_url
- Type
- string
- आवश्यक
- Description
यह आवश्यक है जब तक आप
input_task_idनहीं भेजते। जिस इमेज को 3D मॉडल में बदलना है, उसे पब्लिक URL या बेस64-एन्कोडेड data URI के रूप में भेजें, जैसेdata:image/jpeg;base64,<your base64-encoded image data>। यदि आप दोनों भेजते हैं, तो Meshyinput_task_idका उपयोग करता है।इमेज JPG, JPEG, PNG, या WebP फ़ाइल होनी चाहिए, जिसका आकार अधिकतम 20 MB हो, प्रत्येक तरफ कम से कम 32 पिक्सेल हो, और अधिकतम 178,956,970 पिक्सेल (चौड़ाई × ऊँचाई) हो।
- Name
- model_type
- Type
- string
- डिफ़ॉल्ट standard
- Description
जनरेट किए जाने वाले 3D मेश का प्रकार।
उपलब्ध मान:
standard: एक हाई-डिटेल मेशsmart-topology: एक Smart Topology मॉडल से बना मेश, जिसे आपai_model(meshy-t2याmeshy-t2.5) से चुनते हैं
smart-topologyके साथ, Meshyshould_remesh,save_pre_remeshed_model, औरdecimation_modeको नज़रअंदाज़ करता है, और केवलtopology: triangleको स्वीकार करता है।
- Name
- ai_model
- Type
- string
- डिफ़ॉल्ट latest
- Description
वह AI मॉडल जो 3D मॉडल जनरेट करता है। उपलब्ध मान
model_typeपर निर्भर करते हैं।स्टैंडर्ड मॉडल (
model_type: standard):latest: Meshy 7.1meshy-7.1meshy-6meshy-6-litemeshy-7(डेप्रिकेटेड): इसके बजायmeshy-7.1का उपयोग करें
Smart Topology मॉडल (
model_type: smart-topology) ट्रायंगल बनाते हैं, जिनकी फेस काउंट आपtarget_polycountसे सेट कर सकते हैं:meshy-t2: साफ topology और स्वाभाविक रूप से अलग किए गए भागmeshy-t2.5(डिफ़ॉल्ट): गेम एसेट्स के लिए शार्पर डिटेल
- Name
- geometry_resolution
- Type
- string
- डिफ़ॉल्ट standard
- Description
ज्यामिति जनरेशन पास।
उपलब्ध मान:
standard2k: Ultra पास को 2048³ पर चलाता है4k: Ultra पास को 4096³ पर चलाता है, सबसे अधिक सतह विवरण के लिए
2kके लिएmeshy-7.1,latest, या डेप्रिकेटेडmeshy-7चाहिए।4kके लिएmeshy-7.1याlatestचाहिए।
- Name
- ultra_mode
- Type
- boolean
- ⚠ पुराना
- डिफ़ॉल्ट false
- Description
इसके बजाय
geometry_resolutionका उपयोग करें।ultra_mode: true,geometry_resolution: "2k"के समान है।
- Name
- should_texture
- Type
- boolean
- डिफ़ॉल्ट true
- Description
क्या टेक्सचर जनरेट करना है।
trueपर एक टेक्सचर्ड मॉडल लौटाता है, औरfalseपर टेक्सचरिंग को छोड़कर एक अनटेक्सचर्ड मेश लौटाता है।
should_texture = true- Name
- texture_model
- Type
- string
- डिफ़ॉल्ट depends on ai_model
- Description
वह AI मॉडल जो उसी टास्क में 3D मॉडल को टेक्सचर करता है। अपने
ai_modelके लिए डिफ़ॉल्ट टेक्सचर मॉडल का उपयोग करने के लिए इसे छोड़ दें। इससे क्रेडिट की लागत नहीं बदलती।उपलब्ध मान:
meshy-7: Meshy 7, PBR मैप और 8K तक के टेक्सचर के साथmeshy-n1: Meshy N1, केवल संदर्भ इमेज से 2K बेस कलर टेक्सचरmeshy-6-lite: Meshy 6 Lite, सबसे कम लागत पर 2K टेक्सचरmeshy-6: Meshy 6, केवलai_model: meshy-6के लिए डिफ़ॉल्ट के रूप में
हर
ai_model,meshy-7,meshy-n1, औरmeshy-6-liteको लेता है। जो विकल्प चुना गया टेक्सचर मॉडल सपोर्ट नहीं करता, वह400लौटाता है।meshy-n1के साथ, 7,999,999 ट्रायंगल से अधिक वाला जनरेट किया गया मॉडल टास्क को फेल कर देता है, और Meshy उसके क्रेडिट वापस कर देता है।should_texture: falseके साथ, Meshytexture_modelको नज़रअंदाज़ करता है, लेकिन एक अज्ञात मान फिर भी400लौटाता है।प्रत्येक टेक्सचर मॉडल क्या करता है और किसे चुनना है, यह जानने के लिए देखें Models।
- Name
- enable_pbr
- Type
- boolean
- डिफ़ॉल्ट false
- Description
क्या बेस कलर के अलावा PBR मैप (मेटैलिक, रफनेस, और नॉर्मल) भी जनरेट करना है।
trueके लिएshould_texture: trueचाहिए, औरshould_texture: falseके साथ400लौटाता है।texture_model: meshy-n1के साथ,true400लौटाता है।Meshy 6 टेक्सचर मॉडल एक एमिशन मैप भी जनरेट करता है, सिवाय
texture_resolution: 8kके।
- Name
- texture_resolution
- Type
- string
- डिफ़ॉल्ट 2k
- Description
बेस कलर टेक्सचर का आकार। एक बड़ा टेक्सचर अधिक सतह विवरण को कैप्चर करता है।
उपलब्ध मान:
2k: 2048×20484k: 4096×40968k: 8192×8192
4kऔर8kके लिए Meshy 7 या Meshy 6 टेक्सचर मॉडल चाहिए, और बाकी के साथ400लौटाते हैं।8kपर, Meshy एमिशन मैप नहीं बनाता।
- Name
- hd_texture
- Type
- boolean
- ⚠ पुराना
- डिफ़ॉल्ट false
- Description
इसके बजाय
texture_resolutionका उपयोग करें।hd_texture: true,texture_resolution: "4k"के समान है। यदि आप दोनों भेजते हैं, तो Meshytexture_resolutionका उपयोग करता है।
- Name
- texture_prompt
- Type
- string
- Description
टेक्सचर को गाइड करने वाला टेक्स्ट, अधिकतम 800 वर्ण। इससे लंबा टेक्स्ट
400लौटाता है।texture_model: meshy-n1के साथ, इसे भेजने पर400लौटता है।
- Name
- texture_image_url
- Type
- string
- Description
टेक्सचर को गाइड करने वाली एक इमेज, पब्लिक URL या बेस64-एन्कोडेड data URI के रूप में, जैसे
data:image/jpeg;base64,<your base64-encoded image data>। इमेज JPG, JPEG, PNG, या WebP फ़ाइल होनी चाहिए, जिसका आकार अधिकतम 20 MB हो, प्रत्येक तरफ कम से कम 32 पिक्सेल हो, और अधिकतम 178,956,970 पिक्सेल (चौड़ाई × ऊँचाई) हो।Meshy टेक्सचर को
texture_promptऔरtexture_image_urlमें से केवल एक से गाइड करता है। यदि आप दोनों भेजते हैं, तो Meshytexture_promptका उपयोग करता है। टेक्सचरिंग की क्रेडिट लागत के लिए देखें Pricing।texture_model: meshy-n1के साथ, Meshy इस इमेज को फ्रंट व्यू के रूप में उपयोग करके टेक्सचर करता है, या जब आप इसे छोड़ देते हैं तो इनपुट इमेज से।जब इमेज का आकार 3D मॉडल की ज्यामिति से बहुत अलग हो, तो इमेज से टेक्सचरिंग अच्छी तरह काम नहीं कर सकती।
- Name
- should_remesh
- Type
- boolean
- डिफ़ॉल्ट true (meshy-6-lite), false (other models)
- Description
क्या रीमेश चरण चलाना है। सबसे उच्च-गुणवत्ता वाले 3D मॉडल के लिए, इसे
falseपर सेट करें।
should_remesh = true- Name
- topology
- Type
- string
- डिफ़ॉल्ट triangle
- Description
रीमेश किए गए मॉडल का फेस प्रकार।
उपलब्ध मान:
quad: एक क्वाड-प्रधान मेशtriangle: एक डेसिमेटेड ट्रायंगल मेश
Smart Topology का आउटपुट केवल ट्रायंगल होता है, इसलिए
meshy-t2याmeshy-t2.5के साथquad,400लौटाता है।texture_model: meshy-n1के साथ, जब मॉडल रीमेश किया जाता है तोquad,400लौटाता है, जोmeshy-6-liteडिफ़ॉल्ट रूप से करता है।
- Name
- decimation_mode
- Type
- integer
- Description
स्तर के अनुसार एडेप्टिव फेस काउंट। जब आप इसे सेट करते हैं, तो Meshy
target_polycountको नज़रअंदाज़ करता है।उपलब्ध मान:
1: अल्ट्रा2: हाई3: मीडियम4: लो
- Name
- save_pre_remeshed_model
- Type
- boolean
- डिफ़ॉल्ट false
- Description
क्या रीमेश चरण से पहले के मॉडल का GLB भी स्टोर करना है। Meshy इसे
model_urls.pre_remeshed_glbमें लौटाता है।
- Name
- target_polycount
- Type
- integer
- Description
लक्षित फेस की संख्या। परिणाम मॉडल की ज्यामिति के आधार पर लक्ष्य से भिन्न हो सकता है।
यह दो अलग मामलों में लागू होता है:
- रीमेश: जब एक
standardमॉडल परshould_remeshtrueहोता है, तो Meshy मेश को लगभग इस काउंट तक डेसिमेट करता है। यदि आपdecimation_modeसेट करते हैं, तो Meshy उसका उपयोग करता है औरtarget_polycountको नज़रअंदाज़ करता है। - Smart Topology: जब
model_type,smart-topologyहै औरai_model,meshy-t2याmeshy-t2.5है, तो Meshy इस फेस काउंट पर मॉडल जनरेट करता है। कोई रीमेश नहीं चलता, और आपकोshould_remeshकी आवश्यकता नहीं है।
रेंज और डिफ़ॉल्ट मामले पर निर्भर करते हैं:
मामला रेंज डिफ़ॉल्ट रीमेश 100से30000030000meshy-t2100से150004000meshy-t2.5100से3000015000रेंज के बाहर का मान
400लौटाता है।- रीमेश: जब एक
- Name
- symmetry_mode
- Type
- string
- ⚠ पुराना
- डिफ़ॉल्ट auto
- Description
इसे छोड़ दें, क्योंकि यह आउटपुट को प्रभावित नहीं करता। इसके मान जनरेशन के दौरान सममिति को नियंत्रित करते थे:
off: कोई सममिति नहींauto: इनपुट ज्यामिति से चुनी गई सममितिon: लागू की गई सममिति
- Name
- pose_mode
- Type
- string
- डिफ़ॉल्ट ""
- Description
जनरेट किए गए मॉडल के लिए पोज़।
उपलब्ध मान:
a-pose: एक A पोज़t-pose: एक T पोज़""(खाली स्ट्रिंग): कोई विशिष्ट पोज़ नहीं
- Name
- is_a_t_pose
- Type
- boolean
- ⚠ पुराना
- डिफ़ॉल्ट false
- Description
इसके बजाय
pose_modeका उपयोग करें। क्या मॉडल को A या T पोज़ में जनरेट करना है।
- Name
- surface_mode
- Type
- string
- ⚠ पुराना
- Description
इसके बजाय
ai_modelका उपयोग करें। यह आउटपुट को प्रभावित नहीं करता, क्योंकि इसके द्वारा चुना गया मॉडल जनरेशन रिटायर कर दिया गया है।स्वीकृत मान
organicऔरhardहैं। कोई भी अन्य मान400लौटाता है।
- Name
- image_enhancement
- Type
- boolean
- डिफ़ॉल्ट true
- Description
जनरेट करने से पहले इनपुट इमेज को ऑप्टिमाइज़ करना है या नहीं।
falseइनपुट इमेज के ठीक रूप को बिना किसी स्टाइल प्रोसेसिंग के बनाए रखता है।यह केवल
meshy-6,meshy-7.1, याlatestके साथ काम करता है।meshy-6-liteयाmodel_type: smart-topologyके साथ, यह400लौटाता है।
- Name
- remove_lighting
- Type
- boolean
- डिफ़ॉल्ट true
- Description
क्या बेस कलर टेक्सचर से हाइलाइट और शैडो हटाने हैं। इसका परिणाम साफ होता है और आपकी अपनी लाइटिंग में बेहतर काम करता है।
यह केवल Meshy 6 टेक्सचर मॉडल के साथ प्रभावी होता है, और जो टेक्सचर मॉडल इसे सपोर्ट नहीं करता वह
trueके लिए400लौटाता है।model_type: smart-topologyके साथ, याai_model: meshy-6-liteऔर उसके डिफ़ॉल्ट टेक्सचर मॉडल के साथ, इसे भेजने पर400लौटता है।
- Name
- moderation
- Type
- boolean
- डिफ़ॉल्ट false
- Description
जनरेट करने से पहले इन इनपुट्स को हानिकारक सामग्री के लिए स्क्रीन करना है या नहीं:
image_urltexture_image_urltexture_prompt
यदि Meshy हानिकारक सामग्री का पता लगाता है, तो अनुरोध
400लौटाता है और Meshy कोई टास्क नहीं बनाता।
- Name
- target_formats
- Type
- string[]
- Description
जनरेट की जाने वाली फ़ाइल फ़ॉर्मेट। Meshy केवल आपके द्वारा सूचीबद्ध फ़ॉर्मेट जनरेट करता है और लौटाता है, जिससे टास्क छोटा हो सकता है। यदि आप इसे छोड़ देते हैं, तो Meshy
3mfको छोड़कर हर फ़ॉर्मेट जनरेट करता है, जो आपको तभी मिलता है जब आप इसे सूचीबद्ध करते हैं।उपलब्ध मान:
glbobjfbxstlusdz3mf
- Name
- auto_size
- Type
- boolean
- डिफ़ॉल्ट false
- Description
क्या AI विज़न से ऑब्जेक्ट की वास्तविक दुनिया की ऊँचाई का अनुमान लगाना है और मॉडल को उसके अनुसार रीसाइज़ करना है। जब तक आप
origin_atसेट नहीं करते, Meshy ओरिजिन को नीचे रखता है।
- Name
- alpha_thumbnail
- Type
- boolean
- डिफ़ॉल्ट false
- Description
क्या पारदर्शी बैकग्राउंड (RGBA) के साथ एक प्रिव्यू भी रेंडर करना है, जो टास्क प्राप्त करते समय
alpha_thumbnail_urlमें लौटाया जाता है।thumbnail_urlनहीं बदलता।
- Name
- multi_view_thumbnails
- Type
- boolean
- डिफ़ॉल्ट false
- Description
क्या फ्रंट, राइट, बैक, और लेफ्ट प्रिव्यू भी रेंडर करने हैं, जो टास्क प्राप्त करते समय
thumbnail_urlsमें लौटाए जाते हैं।thumbnail_urlनहीं बदलता और अभी भी फ्रंट व्यू दिखाता है। इससे टास्क में लगभग 5 सेकंड जुड़ते हैं।
auto_size = true- Name
- origin_at
- Type
- string
- डिफ़ॉल्ट bottom
- Description
मॉडल का ओरिजिन कहाँ रखना है,
bottomयाcenter।
रिटर्न
रिस्पॉन्स का result फ़ील्ड नए इमेज से 3D टास्क की ID रखता है।
फेल्यर मोड
- Name
400 - Bad Request- Description
अनुरोध नहीं चल सकता। एरर संदेश बताता है कि कौन सी समस्या मिली। उदाहरण के लिए:
- गायब पैरामीटर: न तो
image_urlऔर न हीinput_task_idभेजा गया। - अमान्य इनपुट टास्क:
input_task_idकोईSUCCEEDEDटेक्स्ट से इमेज या इमेज से इमेज टास्क नहीं है जिसने बिल्कुल एक इमेज बनाई हो। - अमान्य इमेज फॉर्मेट:
image_urlइमेज JPG, JPEG, PNG, या WebP फ़ाइल नहीं है। - अनपहुँच योग्य URL: Meshy
image_urlइमेज को डाउनलोड नहीं कर सकता, क्योंकि URL404लौटाता है या टाइम आउट हो जाता है। - इमेज बहुत बड़ी है:
image_urlयाtexture_image_urlइमेज 20 MB से अधिक है। - अमान्य इमेज आकार:
image_urlयाtexture_image_urlइमेज का एक साइड 32 पिक्सेल से छोटा है, या 178,956,970 पिक्सेल (चौड़ाई × ऊँचाई) से अधिक है। - अमान्य Data URI: बेस64 स्ट्रिंग गलत तरीके से बनी है।
- अमान्य पैरामीटर संयोजन:
enable_pbr,trueहै, औरshould_texture,falseहै। - Ultra के लिए असमर्थित मॉडल:
geometry_resolution,2kया4kहै, एक ऐसेai_modelके साथ जो इसे नहीं चला सकता। - इमेज विकल्पों के लिए असमर्थित मॉडल: इनमें से एक:
image_enhancement,ai_model: "meshy-6-lite"याmodel_type: "smart-topology"के साथ भेजा गया था।remove_lighting,model_type: "smart-topology"के साथ, याai_model: "meshy-6-lite"और उसके डिफ़ॉल्ट टेक्सचर मॉडल के साथ भेजा गया था।
- अमान्य टेक्सचर मॉडल:
texture_modelउपलब्ध मानों में से एक नहीं है। - टेक्सचर मॉडल उपलब्ध नहीं है:
texture_model,meshy-6है, किसी ऐसेai_modelके साथ जोmeshy-6नहीं है।meshy-7,meshy-n1, याmeshy-6-liteभेजें, या इसे छोड़ दें। - टेक्सचर मॉडल के लिए असमर्थित विकल्प: अनुरोध टेक्सचर मॉडल से ऐसा विकल्प माँगता है जिसे वह सपोर्ट नहीं करता, जैसे
meshy-n1के साथenable_pbr: trueयाmeshy-6-liteके साथ4kटेक्सचर। देखें Models।
अनुरोध को ठीक करें, फिर इसे फिर से भेजें। देखें Errors।
- गायब पैरामीटर: न तो
- Name
401 - Unauthorized- Description
API की गायब है या अमान्य है।
Authorizationहेडर जाँचें।
- Name
402 - Payment Required- Description
उदाहरण के लिए:
- अपर्याप्त क्रेडिट: खाते में इस टास्क के लिए पर्याप्त क्रेडिट नहीं हैं, या खाता क्रेडिट सीमा तक पहुँच गया है। अपना क्रेडिट बैलेंस जाँचें, फिर पुनः प्रयास करें।
- फ्री प्लान: टास्क बनाने के लिए पेड प्लान आवश्यक है। अपने सब्सक्रिप्शन सेटिंग्स में अपना प्लान अपग्रेड करें, फिर पुनः प्रयास करें।
- Name
403 - Forbidden- Description
कंटेंट मॉडरेशन ने prompt या किसी इनपुट इमेज को ब्लॉक कर दिया। इनपुट बदलें, फिर पुनः प्रयास करें।
- Name
404 - Not Found- Description
input_task_idआपके किसी भी टास्क से मेल नहीं खाता। टास्क ID जाँचें, फिर अनुरोध फिर से भेजें।
- Name
429 - Too Many Requests- Description
आपने अपनी रेट लिमिट पार कर ली है। प्रतीक्षा करें, फिर पुनः प्रयास करें। देखें Rate limits।
इमेज से 3D टास्क प्राप्त करें
यह उसकी ID द्वारा एक इमेज से 3D टास्क लौटाता है।
Request
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": null,
"consumed_credits": 30
}
पैरामीटर
- Name
- id
- Type
- path
- Description
क्रिएट रिस्पॉन्स से प्राप्त टास्क ID।
रिटर्न वैल्यू
Image to 3D टास्क डिलीट करें
किसी Image to 3D टास्क को स्थायी रूप से डिलीट करता है, जिसमें उसके मॉडल और डेटा भी शामिल हैं। आप डिलीट को पूर्ववत नहीं कर सकते।
Request
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 keeps 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."
}
पाथ पैरामीटर
- Name
- id
- Type
- path
- Description
डिलीट किए जाने वाले टास्क की ID।
टास्क स्थिति
किसी PENDING टास्क को डिलीट करने पर, टास्क बनाते समय इस्तेमाल हुए क्रेडिट वापस कर दिए जाते हैं।
किसी IN_PROGRESS टास्क को डिलीट नहीं किया जा सकता। रिक्वेस्ट 409 Conflict
लौटाती है, और टास्क चलता रहता है। Meshy किसी शुरू हो चुके टास्क के लिए रिफंड नहीं देता,
इसलिए उसे डिलीट करने पर आपको क्रेडिट और परिणाम दोनों का नुकसान होगा। उसके
SUCCEEDED, FAILED, या CANCELED तक पहुँचने का इंतज़ार करें, फिर उसे डिलीट करें।
किसी अंतिम स्थिति (SUCCEEDED, FAILED, या CANCELED) में मौजूद टास्क को डिलीट करने पर
उसके क्रेडिट वापस नहीं होते।
रिटर्न्स
जब टास्क डिलीट हो जाता है तो 200 OK, या जब टास्क IN_PROGRESS होता है तो 409 Conflict।
इमेज से 3D टास्क की सूची
आपके इमेज से 3D टास्क की एक सूची देता है।
Request
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": null,
"consumed_credits": 30
}
]
पैरामीटर
- Name
- page_num
- Type
- integer
- डिफ़ॉल्ट 1
- Description
वह पेज नंबर जो लौटाया जाना है,
255तक। इससे बड़ा मान400लौटाता है।
- Name
- page_size
- Type
- integer
- डिफ़ॉल्ट 10
- Description
प्रति पेज टास्क की संख्या,
100तक।
- Name
- sort_by
- Type
- string
- Description
सॉर्ट करने का क्रम।
उपलब्ध मान:
+created_at: सबसे पुराने पहले-created_at: सबसे नए पहले
रिटर्न
इमेज से 3D टास्क ऑब्जेक्ट की एक पेजिनेटेड सूची।
इमेज से 3D टास्क को स्ट्रीम करें
इमेज से 3D टास्क के अपडेट्स को सर्वर-सेंट इवेंट्स (SSE) के रूप में स्ट्रीम करता है।
Request
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.
// These examples are shortened. Each event holds the full task object.
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": null,
"consumed_credits": 30
}
पैरामीटर
- Name
- id
- Type
- path
- Description
क्रिएट रिस्पॉन्स से प्राप्त टास्क ID।
रिटर्न वैल्यू
इमेज से 3D टास्क ऑब्जेक्ट्स की एक स्ट्रीम सर्वर-सेंट इवेंट्स के रूप में।
प्रत्येक इवेंट में पूरा टास्क ऑब्जेक्ट होता है, उसी फॉर्मेट में जो Get एंडपॉइंट रिटर्न करता है। जब तक टास्क PENDING या IN_PROGRESS स्थिति में होता है, तब तक इसके रिजल्ट फील्ड्स में कोई वैल्यू नहीं होती।
इमेज से 3D टास्क ऑब्जेक्ट
एक इमेज से 3D टास्क ऑब्जेक्ट किसी इमेज से 3D मॉडल के एक जनरेशन का वर्णन करता है। इसमें स्टेटस, progress, और टास्क सफल होने पर मॉडल फ़ाइलें होती हैं।
Properties
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": null,
"consumed_credits": 30
}
- Name
- id
- Type
- string
- Description
टास्क ID। इसे एक ओपेक स्ट्रिंग मानें, और इसके फॉर्मेट पर निर्भर न रहें।
- Name
- type
- Type
- string
- Description
टास्क टाइप, हमेशा
image-to-3d।
- Name
- model_urls
- Type
- object
- Description
जनरेट किए गए 3D मॉडल के लिए डाउनलोड URL, प्रति फ़ाइल फॉर्मेट एक। जिस फॉर्मेट को टास्क ने जनरेट नहीं किया, उसकी कोई key नहीं होती, खाली स्ट्रिंग नहीं।
- Name
glb- Type
- string
- Description
GLB फ़ाइल।
- Name
fbx- Type
- string
- Description
FBX फ़ाइल।
- Name
obj- Type
- string
- Description
OBJ फ़ाइल।
- Name
usdz- Type
- string
- Description
USDZ फ़ाइल।
- Name
mtl- Type
- string
- Description
MTL फ़ाइल, जब मॉडल में टेक्सचर होते हैं तो OBJ फ़ाइल के साथ लौटाई जाती है।
- Name
stl- Type
- string
- Description
STL फ़ाइल।
- Name
3mf- Type
- string
- Description
3MF फ़ाइल। केवल तब मौजूद होती है जब
target_formatsमें3mfशामिल हो।
- Name
pre_remeshed_glb- Type
- string
- Description
रीमेश से पहले की GLB फ़ाइल। केवल तब मौजूद होती है जब आपने टास्क को
should_remesh: trueऔरsave_pre_remeshed_model: trueदोनों के साथ बनाया हो।
- Name
- thumbnail_url
- Type
- string
- Description
3D मॉडल की प्रीव्यू इमेज के लिए डाउनलोड URL। जब
thumbnail_urlsमौजूद हो, तो यहthumbnail_urls.frontजैसी ही इमेज होती है। Meshy इसे बैकवर्ड कंपैटिबिलिटी के लिए बनाए रखता है।
- Name
- alpha_thumbnail_url
- Type
- string
- Description
thumbnail_urlके पारदर्शी बैकग्राउंड (RGBA) वाले वर्शन के लिए डाउनलोड URL। केवल तब मौजूद होता है जब आपने टास्क कोalpha_thumbnail: trueके साथ बनाया हो और Meshy ने पारदर्शी प्रीव्यू रेंडर किया हो।
- Name
- thumbnail_urls
- Type
- object
- Description
चार तरफ से 3D मॉडल के प्रीव्यू के लिए डाउनलोड URL। प्रत्येक वैल्यू 512×512 PNG के लिए एक साइन्ड URL है, जिसे
thumbnail_urlजैसी ही मटीरियल और लाइटिंग के साथ रेंडर किया गया है। इनका उपयोग GLB डाउनलोड किए बिना, उदाहरण के लिए किसी बैच पाइपलाइन में, कई एंगल से मॉडल को प्रीव्यू करने के लिए करें।केवल तब मौजूद होता है जब आपने टास्क को
multi_view_thumbnails: trueके साथ बनाया हो और टास्कSUCCEEDEDतक पहुंच गया हो।multi_view_thumbnails: trueके बिना बनाए गए टास्क में यह फ़ील्ड शामिल नहीं होती।- 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
टास्क कितना पूरा हुआ है, प्रतिशत के रूप में। टास्क शुरू होने तक यह
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
टास्क द्वारा जनरेट किए गए टेक्सचर मैप्स, ऑब्जेक्ट्स की एक array के रूप में। इसमें आमतौर पर इन फ़ील्ड्स वाला एक ऑब्जेक्ट होता है:
- Name
base_color- Type
- string
- Description
बेस कलर मैप के लिए डाउनलोड URL।
- Name
metallic- Type
- string
- Description
मेटैलिक मैप के लिए डाउनलोड URL। जब आपने टास्क को
enable_pbr: falseके साथ बनाया हो, तो यह फ़ील्ड अनुपस्थित होती है।
- Name
normal- Type
- string
- Description
नॉर्मल मैप के लिए डाउनलोड URL। जब आपने टास्क को
enable_pbr: falseके साथ बनाया हो, तो यह फ़ील्ड अनुपस्थित होती है।
- Name
roughness- Type
- string
- Description
रफनेस मैप के लिए डाउनलोड URL। जब आपने टास्क को
enable_pbr: falseके साथ बनाया हो, तो यह फ़ील्ड अनुपस्थित होती है।
- Name
emission- Type
- string
- Description
एमिशन मैप के लिए डाउनलोड URL। Meshy इसे केवल तभी शामिल करता है जब आपने टास्क को इन सभी के साथ बनाया हो:
ai_model: meshy-6, इसके डिफ़ॉल्ट टेक्सचर मॉडल के साथenable_pbr: true2kया4kकाtexture_resolution
- Name
- preceding_tasks
- Type
- integer
- Description
क्यू में इस टास्क से आगे मौजूद टास्क की संख्या। यह वैल्यू तभी सार्थक होती है जब टास्क
PENDINGहो।
- Name
- task_error
- Type
- object
- Description
टास्क फेल होने पर एरर का विवरण। जब तक स्टेटस
FAILEDन हो, यहnullहोता है। देखें एरर।
- Name
- consumed_credits
- Type
- integer
- Description
टास्क द्वारा उपयोग किए गए क्रेडिट की संख्या। यह तब मौजूद होता है जब स्टेटस
PENDING,IN_PROGRESS, याSUCCEEDEDहो।FAILEDटास्क के लिए यह0होता है, क्योंकि टास्क फेल होने पर Meshy क्रेडिट रिफंड कर देता है।