रिगिंग API

Rigging API आपको 3D ह्यूमनॉइड मॉडल में प्रोग्रामेटिक रूप से स्केलेटन (आर्मेचर) जोड़ने की सुविधा देता है, मेश को उससे बाँधते हुए ताकि वे एनिमेशन के लिए तैयार हों। रिग किए गए कैरेक्टर पर एनिमेशन लागू करने के लिए, एनिमेशन API देखें।

कृपया ध्यान दें कि प्रोग्रामेटिक रिगिंग वर्तमान में इस समय केवल स्पष्ट रूप से परिभाषित अंगों और शरीर संरचना वाले मानक ह्यूमनॉइड (द्विपाद) एसेट्स के साथ ही अच्छी तरह काम करती है।


POST/openapi/v1/rigging

रिगिंग कार्य बनाएँ

यह एंडपॉइंट आपको दिए गए 3D मॉडल के लिए नया रिगिंग कार्य बनाने देता है। सफलतापूर्वक पूरा होने पर, यह मानक फ़ॉर्मैट में एक रिग्ड कैरेक्टर और वैकल्पिक रूप से बुनियादी चलने/दौड़ने वाले एनिमेशन प्रदान करता है।

वर्तमान में, ऑटो-रिगिंग निम्नलिखित मॉडलों के लिए उपयुक्त नहीं है:

  • बिना टेक्सचर वाले मेश
  • गैर-मानवाकार assets
  • अस्पष्ट अंग और शरीर संरचना वाले मानवाकार assets

पैरामीटर

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

    इनपुट कार्य जिसे रिग किया जाना है। हम वर्तमान में टेक्सचर वाले मानवाकार मॉडलों का समर्थन करते हैं।

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

    कृपया Meshy को सार्वजनिक रूप से सुलभ URL या Data URI के माध्यम से रिग करने के लिए 3D मॉडल प्रदान करें। हम वर्तमान में टेक्सचर वाली मानवाकार GLB फ़ाइलों (.glb फ़ॉर्मैट) का समर्थन करते हैं।

  • Name
    height_meters
    Type
    number
    डिफ़ॉल्ट 1.7
    Description

    मीटर में कैरेक्टर मॉडल की अनुमानित ऊँचाई। यह स्केलिंग और रिगिंग सटीकता में मदद करता है। यह एक धनात्मक संख्या होनी चाहिए।

  • Name
    texture_image_url
    Type
    string
    Description

    मॉडल की UV-unwrapped बेस कलर टेक्सचर इमेज। सार्वजनिक रूप से सुलभ URL या Data URI। हम वर्तमान में .png फ़ॉर्मैट का समर्थन करते हैं।

रिटर्न

प्रतिक्रिया की result प्रॉपर्टी में नए बनाए गए रिगिंग कार्य का कार्य id होता है।

विफलता मोड

  • Name
    400 - Bad Request
    Description

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

    • गुम पैरामीटर: या तो model_url या input_task_id प्रदान किया जाना चाहिए।
    • अमान्य मॉडल फ़ॉर्मैट: model_url ऐसी फ़ाइल की ओर इशारा करता है जिसका एक्सटेंशन समर्थित नहीं है (केवल .glb समर्थित)।
    • अगम्य URL: model_url डाउनलोड नहीं किया जा सका।
    • अमान्य इनपुट कार्य: input_task_id किसी मान्य API कार्य को संदर्भित नहीं करता।
    • Face count exceeded: इनपुट मॉडल में 300,000 से अधिक faces हैं। कृपया रिगिंग से पहले face count कम करने के लिए रीमेश API का उपयोग करें।
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • Name
    422 - Unprocessable Entity
    Description

    Pose estimation विफल हुआ। प्रदान किया गया मॉडल एक मान्य मानवाकार कैरेक्टर नहीं हो सकता है।

  • Name
    429 - Too Many Requests
    Description

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

Request

POST
/openapi/v1/rigging
# Rig a model from a URL
curl https://api.meshy.ai/openapi/v1/rigging \
  -X POST \
  -H "Authorization: Bearer ${YOUR_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model_url": "YOUR_MODEL_URL_OR_DATA_URI",
    "height_meters": 1.8
  }'

Response

{
  "result": "018b314a-a1b5-716d-c222-2f1776f7f579"
}

GET/openapi/v1/rigging/:id

Rigging कार्य प्राप्त करें

यह एंडपॉइंट आपको वैध कार्य id दिए जाने पर rigging कार्य प्राप्त करने की अनुमति देता है। कौन-सी properties शामिल हैं, यह देखने के लिए Rigging कार्य ऑब्जेक्ट देखें।

पैरामीटर

  • Name
    id
    Type
    path
    Description

    प्राप्त किए जाने वाले rigging कार्य का विशिष्ट पहचानकर्ता।

रिटर्न

प्रतिक्रिया में Rigging कार्य ऑब्जेक्ट शामिल होता है। विवरण के लिए Rigging कार्य ऑब्जेक्ट अनुभाग देखें।

Request

GET
/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579
curl https://api.meshy.ai/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579 
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

{
  "id": "018b314a-a1b5-716d-c222-2f1776f7f579",
  "type": "rig",
  "status": "SUCCEEDED",
  "created_at": 1747032400453,
  "progress": 100,
  "started_at": 1747032401314,
  "finished_at": 1747032418417,
  "expires_at": 1747291618417,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 5,
  "result": {
    "rigged_character_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Character_output.fbx?Expires=...",
    "rigged_character_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Character_output.glb?Expires=...",
    "basic_animations": {
      "walking_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin.glb?Expires=...",
      "walking_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin.fbx?Expires=...",
      "walking_armature_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin_armature.glb?Expires=...",
      "running_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin.glb?Expires=...",
      "running_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin.fbx?Expires=...",
      "running_armature_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin_armature.glb?Expires=..."
    }
  },
  "preceding_tasks": 0
}

DELETE/openapi/v1/rigging/:id

रिगिंग कार्य हटाएँ

यह एंडपॉइंट एक रिगिंग कार्य को स्थायी रूप से हटाता है, जिसमें सभी संबद्ध मॉडल और डेटा शामिल हैं। यह कार्रवाई अपरिवर्तनीय है।

पाथ पैरामीटर

  • Name
    id
    Type
    path
    Description

    हटाए जाने वाले रिगिंग कार्य की ID।

रिटर्न

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

Request

DELETE
/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579
curl --request DELETE \
  --url https://api.meshy.ai/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579 \
  -H "Authorization: Bearer ${YOUR_API_KEY}"

Response

// Returns 200 Ok on success.

GET/openapi/v1/rigging/:id/stream

Rigging टास्क स्ट्रीम करें

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

पैरामीटर

  • Name
    id
    Type
    path
    Description

    स्ट्रीम किए जाने वाले Rigging टास्क के लिए अद्वितीय पहचानकर्ता।

रिटर्न

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

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

Request

GET
/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579/stream
curl -N https://api.meshy.ai/openapi/v1/rigging/018b314a-a1b5-716d-c222-2f1776f7f579/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": "018b314a-a1b5-716d-c222-2f1776f7f579",
  "progress": 0,
  "status": "PENDING"
}

event: message
data: {
  "id": "018b314a-a1b5-716d-c222-2f1776f7f579",
  "progress": 50,
  "status": "IN_PROGRESS"
}

event: message
data: { // Example of a SUCCEEDED task stream item, mirroring The Rigging Task Object structure
  "id": "018b314a-a1b5-716d-c222-2f1776f7f579",
  "type": "rig",
  "status": "SUCCEEDED",
  "created_at": 1747032400453,
  "progress": 100,
  "started_at": 1747032401314,
  "finished_at": 1747032418417,
  "expires_at": 1747291618417,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 5,
  "result": {
    "rigged_character_fbx_url": "https://assets.meshy.ai/.../Character_output.fbx?...",
    "rigged_character_glb_url": "https://assets.meshy.ai/.../Character_output.glb?...",
    "basic_animations": {
      "walking_glb_url": "https://assets.meshy.ai/.../Animation_Walking_withSkin.glb?...",
      "walking_fbx_url": "https://assets.meshy.ai/.../Animation_Walking_withSkin.fbx?...",
      "walking_armature_glb_url": "https://assets.meshy.ai/.../Animation_Walking_withSkin_armature.glb?...",
      "running_glb_url": "https://assets.meshy.ai/.../Animation_Running_withSkin.glb?...",
      "running_fbx_url": "https://assets.meshy.ai/.../Animation_Running_withSkin.fbx?...",
      "running_armature_glb_url": "https://assets.meshy.ai/.../Animation_Running_withSkin_armature.glb?..."
    }
  },
  "preceding_tasks": 0
}

रिगिंग टास्क ऑब्जेक्ट

रिगिंग टास्क ऑब्जेक्ट किसी कैरेक्टर की रिगिंग के लिए कार्य इकाई का प्रतिनिधित्व करता है.

प्रॉपर्टीज

  • Name
    id
    Type
    string
    Description

    टास्क के लिए अद्वितीय पहचानकर्ता।

  • Name
    type
    Type
    string
    Description

    रिगिंग टास्क का प्रकार। मान rig है।

  • Name
    status
    Type
    string
    Description

    टास्क की स्थिति। संभावित मान: PENDING, IN_PROGRESS, SUCCEEDED, FAILED, CANCELED

  • Name
    progress
    Type
    integer
    Description

    टास्क का progress (0-100)। शुरू नहीं हुआ हो तो 0, सफल होने पर 100

  • Name
    created_at
    Type
    timestamp
    Description

    टाइमस्टैंप (epoch के बाद से मिलीसेकंड) जब टास्क बनाया गया था।

  • Name
    started_at
    Type
    timestamp
    Description

    टाइमस्टैंप (epoch के बाद से मिलीसेकंड) जब टास्क ने प्रोसेसिंग शुरू की। शुरू नहीं हुआ हो तो 0

  • Name
    finished_at
    Type
    timestamp
    Description

    टाइमस्टैंप (epoch के बाद से मिलीसेकंड) जब टास्क पूरा हुआ। पूरा नहीं हुआ हो तो 0

  • Name
    expires_at
    Type
    timestamp
    Description

    टाइमस्टैंप (epoch के बाद से मिलीसेकंड) जब टास्क परिणाम एसेट्स की समय-सीमा समाप्त होती है और उन्हें हटाया जा सकता है।

  • Name
    task_error
    Type
    object
    Description

    विफल टास्क के लिए एरर विवरण। पूर्ण task_error ऑब्जेक्ट संदर्भ के लिए एरर देखें।

  • Name
    consumed_credits
    Type
    integer
    Description

    इस टास्क द्वारा उपयोग किए गए क्रेडिट की संख्या। टास्क स्थिति PENDING, IN_PROGRESS, या SUCCEEDED होने पर मौजूद होता है। FAILED टास्क के लिए 0 लौटाता है (विफलता पर क्रेडिट वापस कर दिए जाते हैं)।

  • Name
    result
    Type
    object
    Description

    यदि टास्क SUCCEEDED है तो आउटपुट एसेट URLs शामिल करता है, अन्यथा null

    • Name
      rigged_character_fbx_url
      Type
      string
      Description

      FBX फ़ॉर्मेट में रिग किए गए कैरेक्टर के लिए डाउनलोड करने योग्य URL।

    • Name
      rigged_character_glb_url
      Type
      string
      Description

      GLB फ़ॉर्मेट में रिग किए गए कैरेक्टर के लिए डाउनलोड करने योग्य URL।

    • Name
      basic_animations
      Type
      object (optional)
      Description

      डिफ़ॉल्ट एनिमेशन के लिए URLs शामिल करता है। (उदाहरण के लिए, यदि generate_basic_animations अप्रत्यक्ष रूप से true था या डिफ़ॉल्ट रूप से सक्षम था)।

      • Name
        walking_glb_url
        Type
        string
        Description
        GLB फ़ॉर्मेट में चलने वाले एनिमेशन के लिए डाउनलोड करने योग्य URL (स्किन के साथ)।
      • Name
        walking_fbx_url
        Type
        string
        Description
        FBX फ़ॉर्मेट में चलने वाले एनिमेशन के लिए डाउनलोड करने योग्य URL (स्किन के साथ)।
      • Name
        walking_armature_glb_url
        Type
        string
        Description
        GLB फ़ॉर्मेट में चलने वाले एनिमेशन आर्मेचर के लिए डाउनलोड करने योग्य URL।
      • Name
        running_glb_url
        Type
        string
        Description
        GLB फ़ॉर्मेट में दौड़ने वाले एनिमेशन के लिए डाउनलोड करने योग्य URL (स्किन के साथ)।
      • Name
        running_fbx_url
        Type
        string
        Description
        FBX फ़ॉर्मेट में दौड़ने वाले एनिमेशन के लिए डाउनलोड करने योग्य URL (स्किन के साथ)।
      • Name
        running_armature_glb_url
        Type
        string
        Description
        GLB फ़ॉर्मेट में दौड़ने वाले एनिमेशन आर्मेचर के लिए डाउनलोड करने योग्य URL।
  • Name
    preceding_tasks
    Type
    integer
    Description

    क्यू में पहले आने वाले टास्क की संख्या। केवल तभी सार्थक है जब स्थिति PENDING हो।

Example Rigging Task Object

{
  "id": "018b314a-a1b5-716d-c222-2f1776f7f579",
  "type": "rig",
  "status": "SUCCEEDED",
  "created_at": 1747032400453,
  "progress": 100,
  "started_at": 1747032401314,
  "finished_at": 1747032418417,
  "expires_at": 1747291618417,
  "task_error": {

    "message": ""

  },

  "consumed_credits": 5,
  "result": {
    "rigged_character_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Character_output.fbx?Expires=...",
    "rigged_character_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Character_output.glb?Expires=...",
    "basic_animations": {
      "walking_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin.glb?Expires=...",
      "walking_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin.fbx?Expires=...",
      "walking_armature_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Walking_withSkin_armature.glb?Expires=...",
      "running_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin.glb?Expires=...",
      "running_fbx_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin.fbx?Expires=...",
      "running_armature_glb_url": "https://assets.meshy.ai/0630d47c-84b8-4d37-bc02-69e45d9272c1/tasks/018b314a-a1b5-716d-c222-2f1776f7f579/output/Animation_Running_withSkin_armature.glb?Expires=..."
    }
  },
  "preceding_tasks": 0
}