lowpoly 30 अक्टू॰ 2026 को बंद हो जाएगा। अनुरोध त्रुटियों से बचने के लिए इन तारीखों से पहले मॉडल बदल लें।

क्विकस्टार्ट

अपनी API की बनाकर शुरुआत करें

इस गाइड में हर अनुरोध के लिए इसकी आवश्यकता होती है। एक की बनाने में बस कुछ सेकंड लगते हैं।

अपनी API की बनाएं

Meshy REST API का उपयोग करके अपना पहला 3D मॉडल बनाने के चार चरण।


1अपनी API की प्राप्त करें

Developer Platform के API Keys पेज से API की बनाएं — इस स्क्रीन के बाद आप इसे दोबारा नहीं देख पाएंगे, इसलिए इसे किसी सुरक्षित जगह पर संग्रहीत करें। हर अनुरोध Authorization हेडर में Bearer टोकन के साथ प्रमाणीकृत होता है — देखें Authentication।

Developer Platform में API Keys पेज खोलें, फिर अपनी की बनाएं


2अपनी पहली Image-to-3D request बनाएं

अपनी key एक्सपोर्ट करें, फिर Image to 3D के साथ अपना पहला टास्क बनाएं। क्या आप इसके बजाय किसी टेक्स्ट prompt या कई फोटो के साथ काम कर रहे हैं? Text to 3D या Multi-Image to 3D देखें।

Export your key

export MESHY_API_KEY="<your-api-key>"

नीचे दिया गया हर उदाहरण इसी फोटो का उपयोग करता है — कुछ और आज़माने के लिए अपना खुद का image_url डालें।

Sample fantasy character illustration used as the Image to 3D input in this guide
Sample input

Request

POST
/openapi/v1/image-to-3d
curl https://api.meshy.ai/openapi/v1/image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://docs.meshy.ai/images/api/quick-start/source-photo.webp"
  }'

3टास्क की स्थिति जांचें

टास्क बैकग्राउंड में चलता है और आमतौर पर इसमें कुछ मिनट लगते हैं। उसी एंडपॉइंट को तब तक पोल करें जब तक status, SUCCEEDED, FAILED या CANCELED न हो जाए, और नीचे <task_id> को चरण 2 में प्राप्त ID से बदलें। सामान्य समय और कितनी देर प्रतीक्षा करनी चाहिए, इसके लिए Task Lifecycle देखें।

Request

GET
/openapi/v1/image-to-3d/:id
curl https://api.meshy.ai/openapi/v1/image-to-3d/<task_id> \
  -H "Authorization: Bearer ${MESHY_API_KEY}"

Response — SUCCEEDED

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "status": "SUCCEEDED",
  "progress": 100,
  "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=***"
  },
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "task_error": {
    "message": ""
  }
}

4अपना मॉडल डाउनलोड करें

ऊपर दिए गए रिस्पॉन्स में से model_urls से मॉडल प्राप्त करें। प्रत्येक फॉर्मेट (GLB, FBX, OBJ, USDZ, STL) एक साइन्ड, समय-सीमित URL है — या कमांड लाइन को छोड़ें और इसे डाउनलोड करने के लिए सीधे अपने ब्राउज़र के एड्रेस बार में URL पेस्ट करें।

Download

model_urls.glb
curl -L "<model_urls.glb from the response above>" -o model.glb
The resulting 3D model generated from the sample fantasy character photo
Your result

सब कुछ एक साथ जोड़ें

एक ही स्क्रिप्ट पसंद करें जो पूरा काम करे — बनाना, पोल करना, डाउनलोड करना?

Full script

import axios from 'axios';
import fs from 'fs';

const headers = { Authorization: `Bearer ${process.env.MESHY_API_KEY}` };
const imageUrl = 'https://docs.meshy.ai/images/api/quick-start/source-photo.webp';

// 1. Create the task
const { data: created } = await axios.post(
  'https://api.meshy.ai/openapi/v1/image-to-3d',
  { image_url: imageUrl },
  { headers, timeout: 60_000 },
);
const taskId = created.result;

// 2. Poll until it finishes, for up to 60 minutes
const deadline = Date.now() + 60 * 60 * 1000;
let task;
while (true) {
  const { data, headers: resHeaders } = await axios.get(
    `https://api.meshy.ai/openapi/v1/image-to-3d/${taskId}`,
    { headers, timeout: 30_000 },
  );
  task = data;
  if (['SUCCEEDED', 'FAILED', 'CANCELED'].includes(task.status)) break;
  if (Date.now() > deadline) {
    // The task is still running. Check it again later with the same task ID instead of creating a new one.
    throw new Error(`Task ${taskId} is still ${task.status}; check it again later`);
  }
  const waitSeconds = Number(resHeaders['retry-after']) || 5;
  await new Promise((resolve) => setTimeout(resolve, waitSeconds * 1000));
}

// 3. Download the result (only if the task succeeded)
if (task.status !== 'SUCCEEDED') {
  throw new Error(`Task ${task.status}: ${task.task_error?.message || 'unknown error'}`);
}
const { data: model } = await axios.get(task.model_urls.glb, { responseType: 'arraybuffer' });
fs.writeFileSync('model.glb', model);
console.log('Saved model.glb');

Explore common workflows


अगले कदम

  • यूज़र इंटरफ़ेस पसंद करते हैं? Developer Platform खोलें — Playground में रिक्वेस्ट चलाएँ, उपयोग और रिक्वेस्ट लॉग ट्रैक करें, और webhooks प्रबंधित करें।
  • हर एंडपॉइंट के लिए पूरा API रेफरेंस ब्राउज़ करें।
  • काम करते उदाहरणों से सीखें: Cookbook में चरण-दर-चरण रेसिपी फॉलो करें और Developer Blog पर ट्यूटोरियल और बिल्ड स्टोरीज़ पढ़ें।
  • प्रोडक्शन में जाने से पहले मूल्य निर्धारण, Rate Limits, और एरर देख लें।
  • अपडेट और बग फिक्स के लिए चेंजलॉग पर नज़र रखें।
  • कोई फीडबैक है या किसी समस्या का सामना कर रहे हैं? हमारे Discord समुदाय से जुड़ें — हमें आपसे सुनना अच्छा लगेगा!