एजेंट कमांड

वह command जिससे एजेंट किसी वाक्य, image या model file को 3D assets में बदलते हैं, फिर उन्हें texture, rig, animate, convert और simplify करते हैं।

modelgen 3D models बनाता है। इसे एक prompt, एक या ज़्यादा images, एक model file या कोई पिछला task दें, और यह model बनाता है, उसके बाद जोड़े गए processing steps (texture, rig, animate, convert, simplify…) चलाता है, इंतज़ार करता है और फ़ाइलें डाउनलोड करता है। हर generation या step 3D service पर एक task है; modelgen कोई local state नहीं रखता, और पिछले tasks id, short id या नाम से दोबारा मिल जाते हैं।

यह कहाँ चलता है

यही command cloud टीम और Mac टीम, दोनों के एजेंट्स के लिए उपलब्ध है। Sign-in और एजेंट attribution एजेंट के environment से आते हैं, इसलिए कुछ सेट नहीं करना पड़ता। इसके लिए curl और jq चाहिए। देखें चुनें कि आपके एजेंट कहाँ चलें।

Synopsis

modelgen <command> [options]
modelgen --help | --version
Command यह क्या करती है
make <input...> किसी भी input से तैयार 3D files, वैकल्पिक scenario preset और processing chain के साथ।
generate <endpoint> <input...> एक generation, ठीक वैसा जैसा माँगा गया।
model <step> [input] refine, texture, stylize, convert, import।
anim <step> [input] check (क्या इसे rig किया जा सकता है?), rig, retarget।
mesh <step> [input] segment, complete, decimate, smartsegment।
task get, task list, task watch Tasks पढ़ती है, उनकी सूची बनाती है और उनका इंतज़ार करती है।
files upload <path> Image या model अपलोड करके उसका file token दिखाती है।
history आपके हाल के tasks।
redo [target] किसी पिछले task को नए seed के साथ फिर चलाती है।
balance इस period का AI usage, plan के AI allowance के मुकाबले।
docs साथ आए reference docs दिखाती है।
doctor Environment, sign-in और reachability जाँचती है।

Global options

Option मतलब
--json stdout पर एक JSON line। stdout pipe होने पर डिफ़ॉल्ट रूप से चालू।
--quiet stderr पर कोई progress lines नहीं।
--yes, --no-open स्वीकार किए जाते हैं पर अनदेखे; कुछ भी prompt या open नहीं होता।
-h, --help किसी command की help, जैसे modelgen make --help।

Task options

make, generate, model, anim, mesh और redo ये options लेते हैं:

Option Value Default मतलब
-o, --out एक folder $TMPDIR/modelgen-out/<name>-<id8>/ फ़ाइलें कहाँ जाएँ। वे इसके अंदर modelgen-out/<name>-<id8>/ में आती हैं।
--no-wait — Off Submit करके task id और "status":"queued" के साथ तुरंत लौट आता है।
--no-download — Off इंतज़ार करता है, पर डाउनलोड नहीं करता।
--timeout Seconds 1800 कितनी देर इंतज़ार करना है। उसके बाद भी task चलता रहता है।
--name Text Prompt या file name से एक नाम, जिससे task को @name से दोबारा ढूँढा जा सके।
-p, --param key=value — Service के लिए कोई भी अतिरिक्त field, कई बार दे सकते हैं। true, false, numbers और JSON typed होते हैं।
--notify — — स्वीकार किया जाता है पर अनदेखा।

Inputs

जहाँ भी input लिया जाता है, वह इनमें से कुछ भी हो सकता है:

Input उदाहरण मतलब
Text "a red fox, stylized" एक prompt (make और text endpoints के लिए)।
Image file fox.png .png, .jpg, .jpeg, .webp, .bmp, .tiff, .tif, 20 MB तक। पहले अपलोड होती है।
Model file chair.glb .glb, .fbx, .obj, .stl, 150 MB तक। पहले अपलोड होती है। .gltf अकेले अपलोड नहीं हो सकती (यह दूसरी फ़ाइलों का हवाला देती है); .glb export करें या web address दें।
Web address https://…/fox.png Service को जैसा है वैसा भेजा जाता है।
File token file_… modelgen files upload से।
Task id task_… या UUID कोई पिछला task।
Short id 3f9a2c आपके किसी task id के पहले 6–35 hex characters; यह सिर्फ़ एक से मेल खाना चाहिए।
@last आपका सबसे नया सफल task।
@last:any आपका सबसे नया task, उसका status चाहे जो हो।
@2, @3, … आपके पिछले 50 में से दूसरा, तीसरा… सबसे नया सफल task।
@name @fox उस नाम वाला task। अगर कई का एक ही नाम है, तो सबसे नया सफल task इस्तेमाल होता है (warning के साथ)।

जब model, anim या mesh को कोई input नहीं मिलता, तो वे pipe से आए modelgen command से task पढ़ते हैं, वरना @last इस्तेमाल करते हैं।

make

modelgen make [options] <input...>
Option Value Default मतलब
--for नीचे दिया कोई scenario None Model, generation settings और processing chain पहले से सेट करता है।
--then एक chain, जैसे "texture,rig,convert:fbx" Scenario की chain, या कोई नहीं नतीजे पर क्रम से चलने वाले steps। Scenario की chain की जगह लेता है।
--model Generation model id (ids modelgen make --help में हैं) Service का high-fidelity model जैसा दिया वैसा भेजा जाता है।
-n, --candidates 1–4 1 उतने candidates parallel में बनाता है, हर एक का अपना seed। सिर्फ़ text या image inputs के लिए, और --then के साथ नहीं।
--seed एक number Random Geometry seed (model_seed)।

make input के साथ क्या करता है:

आप देते हैं यह चलाता है
Text text-to-model
एक image या address image-to-model
2–4 images या addresses multiview-to-model
एक model file import
Task reference सिर्फ़ --then chain, जो ज़रूरी है

Multiview में, जिस फ़ाइल के नाम में front, back, left या right हो, वह उसी view में जाती है; बाकी फ़ाइलें बचे slots भरती हैं, पहले front। Front view ज़रूरी है।

Service का low-poly model अपने आप चुना जाता है जब prompt में low poly कहा गया हो (जैसे low-poly, lowpoly, low poly, voxel) या जब -p face_limit= 20000 या उससे कम हो। --model हमेशा प्राथमिकता पाता है।

Scenarios (--for)

Scenario Generation उसके बाद की chain
game-mobile Low-poly model, PBR textures (standard), 15000 faces convert:format=FBX;texture_size=2048
game-pc PBR textures (detailed) convert:format=FBX
film PBR, quad mesh, detailed geometry और textures None
print कोई textures नहीं convert:format=STL;flatten_bottom=true
ar-web PBR textures decimate:face_limit=20000,convert:format=USDZ
anim PBR textures rig-check, rig (GLB), preset:idle और preset:walk के साथ retarget
toy Low-poly model, PBR textures, 20000 faces None

Chains (--then)

Steps commas से अलग होते हैं। एक step सीधी value ले सकता है, step:value, या settings, step:key=value;key=value। [...] या quotes के अंदर की values पूरी रखी जाती हैं, इसलिए retarget:animations=["preset:idle","preset:walk"] एक ही step है।

Step सीधी value क्या सेट करती है क्या स्वीकार करता है
refine — सिर्फ़ सफल text-to-model task
texture texture_quality Model बनाने वाला कोई भी task
stylize style कोई भी model
convert format कोई भी model
rig-check (या check) — कोई भी model; उसे बिना बदले आगे भेजता है
rig rig_type कोई भी model
retarget (या animate) animation सिर्फ़ rig task
segment model कोई भी model
complete — सिर्फ़ segment task
decimate (या lowpoly) face_limit कोई भी model

import और smartsegment सिर्फ़ file या address लेते हैं और chain का हिस्सा नहीं हो सकते। गलत chain कुछ भी चलने से पहले ही ठुकरा दी जाती है। सिर्फ़ आख़िरी step की फ़ाइलें डाउनलोड होती हैं। अगर rig-check कहे कि model rig नहीं हो सकता, तो chain वहीं रुक जाती है और नतीजे में stopped_early होता है (source model फिर भी डाउनलोड होता है); अगर यह कोई rig_type सुझाए, तो अगला rig उसे इस्तेमाल करता है।

generate

modelgen generate <endpoint> [options] <input...>
Endpoint Input नतीजा
text-to-model एक prompt एक 3D model
image-to-model एक image एक 3D model
multiview-to-model 2–4 view images एक 3D model
text-to-image एक prompt एक image
image-to-image एक image, --prompt (या -p template=…) के साथ एक edited image
image-to-multiview एक image एक 4-view sheet
edit-multiview एक multiview task Edited views
image-to-splat एक image एक Gaussian splat

--model <id> 3D endpoints के लिए model चुनता है (और image endpoints के लिए आगे भेज दिया जाता है); --prompt <text> image-to-image का prompt है। make के उलट, generate prompt के शब्दों से कभी low-poly model नहीं चुनता।

Generation checks

कुछ भी भेजने से पहले modelgen generation settings जाँचता और ठीक करता है:

Setting नियम
prompt अधिकतम 1024 characters।
negative_prompt अधिकतम 255 characters।
pbr=true texture चालू कर देता है (warning)।
generate_parts=true texture, pbr और quad बंद कर देता है (warning); बाद में modelgen model texture से texture करें।
Low-poly model quad, smart_low_poly, generate_parts और geometry_quality हटा दिए जाते हैं (warning); face_limit 50–20000 होना चाहिए।
smart_low_poly=true face_limit 500–20000 होना चाहिए (quad के साथ 500–10000)।
texture_quality standard, detailed या extreme।
quad=true Output FBX होता है (warning)।

model, anim, mesh

modelgen model|anim|mesh <step> [options] [input]
Step Options नोट्स
model refine — Draft text-to-model task को refine करता है।
model texture --texture-quality standard,detailed,extreme; --texture-alignment original_image,geometry Model को फिर से texture करता है।
model stylize --style lego,voxel,voronoi,minecraft (ज़रूरी); --block-size 32–128 (minecraft)
model convert --format GLTF,USDZ,FBX,OBJ,STL,3MF (default GLTF); --texture-size <px>; --texture-format BMP,DPX,HDR,JPEG,OPEN_EXR,PNG,TARGA,TIFF,WEBP; --face-limit <n>; --quad; --flatten-bottom; --fbx-preset <preset> (blender, 3dsmax, या modelgen model convert --help में दिया कोई और); --export-orientation +x,-x,+y,-y; --scale-factor <n>; --auto-size; --pivot-to-center-bottom; --export-vertex-colors --quad GLTF export नहीं कर सकता। --fbx-preset सिर्फ़ FBX पर और --export-vertex-colors सिर्फ़ OBJ और GLTF पर लागू होते हैं; वरना warning के साथ हटा दिए जाते हैं।
model import — GLB, FBX, OBJ या STL file या address import करता है (150 MB तक)।
anim check — बताता है कि model rig हो सकता है या नहीं (riggable) और एक rig_type सुझाता है।
anim rig --rig-type biped,quadruped,hexapod,octopod,avian,serpentine,aquatic; --spec <convention> (conventions modelgen anim --help में दी हैं); --out-format glb,fbx Skeleton bind करता है। -p model= के बिना, body type के हिसाब से rig model चुना जाता है।
anim retarget --animation preset:walk preset:run … (1–5); --out-format glb,fbx; --animate-in-place सिर्फ़ rigged task पर।
mesh segment --model <id> Model को हिस्सों में बाँटता है।
mesh complete --completion-mode ai_completion,quick_cap सिर्फ़ segment task पर।
mesh decimate --face-limit <n> (500–20000, या --quad के साथ 500–10000); --quad; --no-bake; -p model=v2.0 या v1.0 High-poly से low-poly, textures bake करते हुए, जब तक --no-bake न हो। v1.0 के साथ --face-limit ज़रूरी है (500–2000000, या --quad के साथ 500–150000)।
mesh smartsegment --seg-type image,model (default model); --granularity coarse,medium,fine; --hint <text> सिर्फ़ file या address लेता है।

कोई step ऐसा task ठुकरा देता है जिसे वह नहीं ले सकता, जैसे retarget only accepts animate_rig tasks (input is a texture_model task)। Source task सफल होना चाहिए।

Piping काम करती है: JSON mode में (pipe होने पर डिफ़ॉल्ट), step पिछले command के output से task id पढ़ता है, इसलिए modelgen anim check fox.glb | modelgen anim rig उसी model को rig करता है जिसे जाँचा गया था। अगर पिछला command fail हुआ, तो उसकी error line अगले को रोक देती है: the previous command in the pipe failed (…); nothing was run.

Files और output

Task सफल होने पर उसकी फ़ाइलें <out>/modelgen-out/<name>-<first 8 of the id>/ में डाउनलोड होती हैं (<out> यानी -o, वरना $TMPDIR या /tmp)। जब तक -o प्रोजेक्ट folder की ओर इशारा न करे, वहाँ कुछ नहीं आता। Folder में:

  • task के हर output की एक फ़ाइल, उसी के नाम पर, जैसे pbr_model.glb, rendered_image.webp;
  • preview.<ext>, render की एक कॉपी, अगर render हो;
  • task.json, जिसमें task id, type, status, input, output fields, खर्च हुए credits, बनने का समय और file list होती है।

Terminal में नतीजा ऐसा दिखता है:

task <task_id> success
vendor credits consumed: <n>
artifacts: /abs/path/modelgen-out/fox-1a2b3c4d
model file: /abs/path/modelgen-out/fox-1a2b3c4d/pbr_model.glb
preview: /abs/path/modelgen-out/fox-1a2b3c4d/preview.webp

JSON के रूप में: task_id, type, status, credits_consumed, output_dir, files, model_file, preview, और chains के लिए chain (हर step का नतीजा), source_task_id और stopped_early। -n के साथ, {"candidates":[…],"chain":[]}। Progress (<type> · <status> <n>% · <id8>) stderr पर जाता है।

Download addresses कुछ ही मिनटों में expire हो जाते हैं। अगर डाउनलोड fail हो, तो नए addresses के लिए modelgen task get <id> --download चलाएँ।

task, files, history, redo

modelgen task get <task> [--step] [--download] [-o <dir>]
modelgen task list [tasks...] [--limit <n>]
modelgen task watch <task> [--download] [-o <dir>] [--timeout <seconds>]
modelgen files upload <path>
modelgen history [--limit <n>]
modelgen redo [target] [--seed <n>] [task options]
Command नोट्स
task get एक task का ब्योरा: id, type, status, progress, credits और output addresses। --step pipeline step का ब्योरा जोड़ता है; --download सफल होने पर फ़ाइलें सेव करता है।
task list एक साथ कई tasks; ids के बिना, आपके सबसे नए (--limit, default 10)। जो ids आपके नहीं हैं, वे missed में दिखते हैं।
task watch Task पूरा होने तक इंतज़ार करता है (default 1800 seconds)। JSON mode में हर बदलाव पर एक {"event":"progress","task_id":…,"status":…,"progress":…} line stream करता है।
files upload Input के रूप में इस्तेमाल करने के लिए file_token दिखाता है।
history आपके हाल के tasks (--limit 1–50, default 20): तारीख, नाम, type, status और id।
redo किसी पिछले task की request नए seed (या --seed) के साथ फिर भेजता है। Default @last।

balance, docs, doctor

modelgen balance इस period का AI usage plan के AI allowance के मुकाबले दिखाता है:

AI usage: <percent>% of this period's plan allowance (<n> credits beyond the plan)
credits left: <n> (<n> credits owed)

जब plan में कोई AI allowance नहीं होता, तो पहली line AI usage: the plan includes no AI allowance, paid with credits होती है। जब allowance और credits खत्म हो जाते हैं, तो यह ! AI allowance and credits exhausted — ask your user to add credits or upgrade the plan जोड़ता है। JSON के रूप में: used_usd, included_usd, overage_usd, credit_balance_usd, used_percent, overage_credits, credits_left, credits_owed, has_capacity, period_end। Plans air.build/pricing पर हैं; usage Settings › Plan & Usage में भी दिखता है।

modelgen docs साथ आई guide दिखाता है; --topic एक bundled doc दिखाता है: commands/<cmd>, examples/<scenario>, models या common-errors।

modelgen doctor curl, jq, backend address, टीम sign-in, एजेंट identity, service जवाब दे रही है या नहीं, bundled docs और terminal जाँचता है, हर एक की एक line ✓, ✗ या ! के साथ। कोई critical check fail होने पर यह 1 के साथ exit करता है।

Exit codes और errors

Errors stderr पर Error: <message> के रूप में जाते हैं। JSON mode में, या stdout pipe होने पर, error stdout पर भी {"error":true,"exit_code":<n>,"reason":"…"} के रूप में छपता है।

Exit code मतलब क्या करें
0 सफल। —
1 अनपेक्षित error, या fail हुआ doctor check। modelgen doctor चलाएँ।
2 गलत usage या parameters; कुछ नहीं भेजा गया। Message पढ़ें और command ठीक करें।
3 Sign-in fail हुआ, या यह AirBuild एजेंट के environment में नहीं चल रहा। इसे किसी एजेंट से चलाएँ।
4 AI allowance और credits खत्म हो गए। टीम के owner से credits जोड़ने या plan बदलने को कहें।
5 Content policy ने ठुकरा दिया। Prompt या image बदलें।
6 Task fail, cancel या expire हुआ, या इंतज़ार का समय खत्म हुआ। Message पढ़ें। Timeout के बाद task चलता रहता है: modelgen task get <id>।
7 Network या service error, या डाउनलोड fail हुआ। फिर कोशिश करें; डाउनलोड के लिए modelgen task get <id> --download इस्तेमाल करें।
8 नहीं मिला। Id या नाम जाँचें।
9 Service व्यस्त है। इंतज़ार करके फिर कोशिश करें।
Message Exit
no input given. 2
file not found: "PATH" (if you meant a text prompt, quote a sentence instead). 2
"PATH" exists but has an unsupported extension ".EXT" (…). 2
NAME is N MB, over the 20 MB image limit. / … over the 150 MB model limit. 2
a task reference needs processing steps: add --then (e.g. modelgen make @last --then texture,convert:fbx). 2
unknown step "X" (valid: …). / unknown scenario "X" (valid: …). 2
step "X" only accepts … tasks, but the previous step produces "…". 2
at most 4 candidates per run (-n 4). 2
multiview needs 2–4 images (got N). / multiview requires a front view — name one file with "front" or pass it first. 2
no successful task yet. / no task named "@X"; "modelgen history" lists your tasks. 2
"X" matches N of your tasks; give more characters or the full id. 2
task ID is running; processing steps need a successful upstream task (wait with "modelgen task watch ID"). 2
task ID failed: <reason> (और cancelled, banned, expired) 6
task ID is still running after Ns (it keeps running server-side; check later with "modelgen task get ID") 6
artifact download failed (…) 7
could not reach the Airbuild creative service: … 7

छोटी network failures और busy जवाबों पर modelgen हार मानने से पहले अपने आप कुछ बार फिर कोशिश करता है।

उदाहरण

टर्मिनल विंडो
# A prompt to a textured model, downloaded under $TMPDIR
modelgen make "a stylized red fox, game asset" --name fox

# A mobile game asset from a concept image, in the project folder
modelgen make concept.png --for game-mobile -o Assets/Models

# Rig and animate an earlier task, then export FBX
modelgen make @fox --then "rig-check,rig,retarget:animations=[\"preset:idle\",\"preset:walk\"],convert:fbx"

# Simplify an earlier task and convert the result for AR
modelgen mesh decimate @fox --face-limit 8000 --no-download --json | modelgen model convert --format USDZ