रिगिंग एपीआई

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

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


POST/openapi/v1/rigging

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

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

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

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

पैरामीटर

  • 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-अनव्रैप्ड बेस कलर टेक्सचर छवि। सार्वजनिक रूप से सुलभ 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 कार्य का संदर्भ नहीं देता है।
    • चेहरा संख्या अधिकतम सीमा से अधिक: इनपुट मॉडल में 300,000 से अधिक चेहरे हैं। कृपया रिगिंग से पहले चेहरों की संख्या को कम करने के लिए रीमेश API का उपयोग करें।
  • Name
    401 - Unauthorized
    Description

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

  • Name
    402 - Payment Required
    Description

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

  • Name
    422 - Unprocessable Entity
    Description

    पोज़ अनुमान विफल। प्रदान किया गया मॉडल एक मान्य मानवाकार चरित्र नहीं हो सकता है।

  • 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

एक रिगिंग कार्य प्राप्त करें

यह एंडपॉइंट आपको एक मान्य कार्य id दिए जाने पर एक रिगिंग कार्य प्राप्त करने की अनुमति देता है। शामिल गुणों को देखने के लिए रिगिंग कार्य ऑब्जेक्ट देखें।

पैरामीटर

  • Name
    id
    Type
    path
    Description

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

रिटर्न्स

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

अनुरोध

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

प्रतिक्रिया

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

अनुरोध

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

प्रतिक्रिया

// Returns 200 Ok on success.

GET/openapi/v1/rigging

रिगिंग कार्यों की सूची

कॉलर के रिगिंग कार्यों की एक पेजिनेटेड सूची लौटाता है, नवीनतम पहले। page_num और page_size के माध्यम से मानक पेजिनेशन।

ध्यान दें कि API के माध्यम से बनाए गए कार्य API के माध्यम से प्रबंधित होते हैं — वे वेब ऐप के My Assets में दिखाई नहीं देते। उस कार्य को खोजने के लिए इस एंडपॉइंट का उपयोग करें जिसका ID आपके पास अब नहीं है।

Request

GET
/openapi/v1/rigging
curl "https://api.meshy.ai/openapi/v1/rigging?page_num=1&page_size=20" \
-H "Authorization: Bearer ${YOUR_API_KEY}"

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

एक रिगिंग कार्य स्ट्रीम करें

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

पैरामीटर्स

  • Name
    id
    Type
    path
    Description

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

रिटर्न्स

रिगिंग कार्य ऑब्जेक्ट्स की एक स्ट्रीम को सर्वर-सेंट इवेंट्स के रूप में लौटाता है।

PENDING या IN_PROGRESS कार्यों के लिए, प्रतिक्रिया स्ट्रीम में केवल आवश्यक 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

    कार्य की प्रगति (0-100)। 0 यदि शुरू नहीं हुआ, 100 यदि सफल हुआ।

  • Name
    created_at
    Type
    timestamp
    Description

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

  • Name
    started_at
    Type
    timestamp
    Description

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

  • Name
    finished_at
    Type
    timestamp
    Description

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

  • Name
    expires_at
    Type
    timestamp
    Description

    टाइमस्टैंप (मिलीसेकंड में युग के बाद से) जब कार्य के परिणाम संपत्तियाँ समाप्त हो जाती हैं और हटाई जा सकती हैं।

  • Name
    task_error
    Type
    object
    Description

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

  • 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 अप्रत्यक्ष रूप से सत्य था या डिफ़ॉल्ट रूप से सक्षम था)।

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