에이전트 명령어

에이전트가 문장, 이미지, 모델 파일을 3D 에셋으로 만들고 텍스처, 리깅, 애니메이션, 변환, 단순화까지 처리할 때 쓰는 명령입니다.

modelgen은 3D 모델을 만듭니다. 프롬프트, 이미지 하나 이상, 모델 파일, 또는 이전 작업을 주면 모델을 만들고, 뒤에 연결한 처리 단계(텍스처, 리깅, 애니메이션, 변환, 단순화…)를 실행하고, 완료를 기다린 뒤 파일을 내려받습니다. 각 생성이나 단계는 3D 서비스의 작업(task)입니다. modelgen은 로컬 상태를 저장하지 않으며, 이전 작업은 id, 짧은 id, 이름으로 다시 찾습니다.

실행 위치

클라우드 팀과 Mac 팀의 에이전트 모두 같은 명령을 쓸 수 있습니다. 로그인과 에이전트 귀속 정보는 에이전트 환경에서 가져오므로 따로 설정할 것이 없습니다. curl과 jq가 필요합니다. 에이전트가 실행될 위치 선택하기를 참고하세요.

개요

modelgen <command> [options]
modelgen --help | --version
명령 하는 일
make <input...> 어떤 입력이든 완성된 3D 파일로 만듭니다. 시나리오 프리셋과 처리 체인은 선택 사항입니다.
generate <endpoint> <input...> 요청한 그대로 한 번 생성합니다.
model <step> [input] refine, texture, stylize, convert, import.
anim <step> [input] check(리깅 가능 여부), rig, retarget.
mesh <step> [input] segment, complete, decimate, smartsegment.
task get, task list, task watch 작업을 조회하고, 나열하고, 완료를 기다립니다.
files upload <path> 이미지나 모델을 업로드하고 파일 토큰을 출력합니다.
history 최근 작업.
redo [target] 이전 작업을 새 시드로 다시 실행합니다.
balance 이번 기간의 AI 사용량과 요금제의 AI 허용량을 비교해 보여 줍니다.
docs 함께 제공되는 참고 문서를 출력합니다.
doctor 환경, 로그인, 연결 상태를 점검합니다.

전역 옵션

옵션 의미
--json stdout에 JSON 한 줄을 출력합니다. stdout이 파이프로 연결되면 기본으로 켜집니다.
--quiet stderr에 진행 상황을 출력하지 않습니다.
--yes, --no-open 받아들이지만 무시합니다. 묻거나 여는 것이 없습니다.
-h, --help 명령 도움말. 예: modelgen make --help.

작업 옵션

make, generate, model, anim, mesh, redo에서 쓸 수 있습니다.

옵션 값 기본값 의미
-o, --out 폴더 $TMPDIR/modelgen-out/<name>-<id8>/ 파일 저장 위치. 그 안의 modelgen-out/<name>-<id8>/에 저장됩니다.
--no-wait — 끔 제출 후 바로 작업 id와 "status":"queued"를 반환합니다.
--no-download — 끔 기다리지만 내려받지는 않습니다.
--timeout 초 1800 기다릴 시간. 그 뒤에도 작업은 계속 실행됩니다.
--name 텍스트 프롬프트나 파일 이름에서 @name으로 작업을 다시 찾을 때 쓸 이름.
-p, --param key=value — 서비스에 보낼 추가 필드, 반복 가능. true, false, 숫자, JSON은 타입이 적용됩니다.
--notify — — 받아들이지만 무시합니다.

입력

입력을 받는 곳에는 다음을 쓸 수 있습니다.

입력 예 의미
텍스트 "a red fox, stylized" 프롬프트(make와 텍스트 엔드포인트용).
이미지 파일 fox.png .png, .jpg, .jpeg, .webp, .bmp, .tiff, .tif, 최대 20 MB. 먼저 업로드됩니다.
모델 파일 chair.glb .glb, .fbx, .obj, .stl, 최대 150 MB. 먼저 업로드됩니다. .gltf는 다른 파일을 참조하므로 단독으로 업로드할 수 없습니다. .glb로 내보내거나 웹 주소를 넘기세요.
웹 주소 https://…/fox.png 그대로 서비스에 전달됩니다.
파일 토큰 file_… modelgen files upload에서 얻습니다.
작업 id task_… 또는 UUID 이전 작업.
짧은 id 3f9a2c 내 작업 id의 앞 6~35자리 16진수. 하나에만 일치해야 합니다.
@last 가장 최근에 성공한 작업.
@last:any 상태와 관계없이 가장 최근 작업.
@2, @3, … 최근 50개 중 두 번째, 세 번째… 최근에 성공한 작업.
@name @fox 그 이름의 작업. 같은 이름이 여럿이면 가장 최근에 성공한 작업을 씁니다(경고 표시).

model, anim, mesh에 입력이 없으면 파이프로 연결된 modelgen 명령에서 작업을 읽고, 없으면 @last를 씁니다.

make

modelgen make [options] <input...>
옵션 값 기본값 의미
--for 아래의 시나리오 없음 모델, 생성 설정, 처리 체인을 미리 설정합니다.
--then 체인. 예: "texture,rig,convert:fbx" 시나리오의 체인, 또는 없음 결과에 순서대로 실행할 단계. 시나리오의 체인을 대체합니다.
--model 생성 모델 id(modelgen make --help에 나옴) 서비스의 고품질 모델 그대로 전달됩니다.
-n, --candidates 1–4 1 각각 다른 시드로 후보를 병렬 생성합니다. 텍스트나 이미지 입력에만 쓸 수 있고 --then과 함께 쓸 수 없습니다.
--seed 숫자 무작위 지오메트리 시드(model_seed).

make가 입력에 따라 하는 일:

입력 실행
텍스트 text-to-model
이미지나 주소 하나 image-to-model
이미지나 주소 2~4개 multiview-to-model
모델 파일 하나 import
작업 참조 --then 체인만(필수)

멀티뷰에서는 이름에 front, back, left, right가 들어간 파일이 해당 뷰로 가고, 나머지는 남은 자리를 front부터 채웁니다. front 뷰는 필수입니다.

프롬프트에 로우 폴리를 뜻하는 말(예: low-poly, lowpoly, low poly, voxel)이 있거나 -p face_limit=가 20000 이하이면 서비스의 로우 폴리 모델이 자동으로 선택됩니다. --model이 항상 우선합니다.

시나리오(--for)

시나리오 생성 이후 체인
game-mobile 로우 폴리 모델, PBR 텍스처(standard), 15000면 convert:format=FBX;texture_size=2048
game-pc PBR 텍스처(detailed) convert:format=FBX
film PBR, 쿼드 메시, 정밀한 지오메트리와 텍스처 없음
print 텍스처 없음 convert:format=STL;flatten_bottom=true
ar-web PBR 텍스처 decimate:face_limit=20000,convert:format=USDZ
anim PBR 텍스처 rig-check, rig(GLB), preset:idle과 preset:walk로 retarget
toy 로우 폴리 모델, PBR 텍스처, 20000면 없음

체인(--then)

단계는 쉼표로 구분합니다. 단계에는 단순 값 step:value나 설정 step:key=value;key=value를 줄 수 있습니다. [...]나 따옴표 안의 값은 통째로 유지되므로 retarget:animations=["preset:idle","preset:walk"]는 하나의 단계입니다.

단계 단순 값이 설정하는 항목 받는 입력
refine — 성공한 text-to-model 작업만
texture texture_quality 모델을 만드는 모든 작업
stylize style 모든 모델
convert format 모든 모델
rig-check(또는 check) — 모든 모델. 변경 없이 넘깁니다
rig rig_type 모든 모델
retarget(또는 animate) animation rig 작업만
segment model 모든 모델
complete — segment 작업만
decimate(또는 lowpoly) face_limit 모든 모델

import와 smartsegment는 파일이나 주소만 받으며 체인에 넣을 수 없습니다. 잘못된 체인은 실행 전에 거부됩니다. 마지막 단계의 파일만 내려받습니다. rig-check가 리깅할 수 없다고 하면 체인은 거기서 멈추고 결과에 stopped_early가 들어갑니다(원본 모델은 그래도 내려받습니다). rig_type을 제안하면 다음 rig가 그것을 씁니다.

generate

modelgen generate <endpoint> [options] <input...>
엔드포인트 입력 결과
text-to-model 프롬프트 3D 모델
image-to-model 이미지 하나 3D 모델
multiview-to-model 뷰 이미지 2~4개 3D 모델
text-to-image 프롬프트 이미지
image-to-image 이미지와 --prompt(또는 -p template=…) 편집된 이미지
image-to-multiview 이미지 하나 4뷰 시트
edit-multiview 멀티뷰 작업 편집된 뷰
image-to-splat 이미지 하나 가우시안 스플랫

--model <id>는 3D 엔드포인트의 모델을 고릅니다(이미지 엔드포인트에는 그대로 전달). --prompt <text>는 image-to-image의 프롬프트입니다. make와 달리 generate는 프롬프트 단어로 로우 폴리 모델을 고르지 않습니다.

생성 검사

modelgen은 요청을 보내기 전에 생성 설정을 검사하고 조정합니다.

설정 규칙
prompt 최대 1024자.
negative_prompt 최대 255자.
pbr=true texture를 켭니다(경고).
generate_parts=true texture, pbr, quad를 끕니다(경고). 텍스처는 나중에 modelgen model texture로 입히세요.
로우 폴리 모델 quad, smart_low_poly, generate_parts, geometry_quality가 제거됩니다(경고). face_limit는 50~20000이어야 합니다.
smart_low_poly=true face_limit는 50020000이어야 합니다(quad와 함께면 50010000).
texture_quality standard, detailed, extreme.
quad=true 출력은 FBX입니다(경고).

model, anim, mesh

modelgen model|anim|mesh <step> [options] [input]
단계 옵션 참고
model refine — text-to-model 초안 작업을 다듬습니다.
model texture --texture-quality standard,detailed,extreme; --texture-alignment original_image,geometry 모델에 텍스처를 다시 입힙니다.
model stylize --style lego,voxel,voronoi,minecraft(필수); --block-size 32–128(minecraft)
model convert --format GLTF,USDZ,FBX,OBJ,STL,3MF(기본값 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를 내보낼 수 없습니다. --fbx-preset은 FBX에만, --export-vertex-colors는 OBJ와 GLTF에만 적용되며, 그 외에는 경고와 함께 제거됩니다.
model import — GLB, FBX, OBJ, STL 파일이나 주소를 가져옵니다(최대 150 MB).
anim check — 모델을 리깅할 수 있는지(riggable) 알려 주고 rig_type을 제안합니다.
anim rig --rig-type biped,quadruped,hexapod,octopod,avian,serpentine,aquatic; --spec <convention>(규칙 목록은 modelgen anim --help에 있음); --out-format glb,fbx 스켈레톤을 바인딩합니다. -p model=이 없으면 체형에 맞는 리그 모델을 고릅니다.
anim retarget --animation preset:walk preset:run …(1~5개); --out-format glb,fbx; --animate-in-place 리깅된 작업에서만.
mesh segment --model <id> 모델을 파트로 나눕니다.
mesh complete --completion-mode ai_completion,quick_cap segment 작업에서만.
mesh decimate --face-limit <n>(50020000, --quad와 함께면 50010000); --quad; --no-bake; -p model=v2.0 또는 v1.0 하이 폴리를 로우 폴리로 줄이며, --no-bake가 없으면 텍스처를 베이크합니다. v1.0에서는 --face-limit가 필수입니다(5002000000, --quad와 함께면 500150000).
mesh smartsegment --seg-type image,model(기본값 model); --granularity coarse,medium,fine; --hint <text> 파일이나 주소만 받습니다.

단계는 받을 수 없는 작업을 거부합니다. 예: retarget only accepts animate_rig tasks (input is a texture_model task). 원본 작업은 성공한 상태여야 합니다.

파이프도 쓸 수 있습니다. JSON 모드(파이프 연결 시 기본값)에서는 단계가 이전 명령 출력에서 작업 id를 읽으므로, modelgen anim check fox.glb | modelgen anim rig는 검사한 모델을 리깅합니다. 이전 명령이 실패하면 그 오류 줄 때문에 다음 명령이 멈춥니다: the previous command in the pipe failed (…); nothing was run.

파일과 출력

작업이 성공하면 파일은 <out>/modelgen-out/<name>-<first 8 of the id>/에 내려받아집니다(<out>은 -o, 없으면 $TMPDIR 또는 /tmp). -o로 지정하지 않으면 프로젝트 폴더에는 아무것도 저장되지 않습니다. 폴더에는 다음이 들어갑니다.

  • 작업의 출력마다 그 이름을 딴 파일 하나. 예: pbr_model.glb, rendered_image.webp
  • 렌더가 있으면 그 사본인 preview.<ext>
  • 작업 id, 유형, 상태, 입력, 출력 필드, 소비 크레딧, 생성 시각, 파일 목록이 담긴 task.json

터미널에서는 결과가 다음처럼 표시됩니다.

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, 그리고 체인에서는 chain(모든 단계의 결과), source_task_id, stopped_early가 나옵니다. -n을 쓰면 {"candidates":[…],"chain":[]}입니다. 진행 상황(<type> · <status> <n>% · <id8>)은 stderr로 갑니다.

다운로드 주소는 몇 분 안에 만료됩니다. 다운로드가 실패하면 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]
명령 참고
task get 작업 하나의 세부 정보: id, 유형, 상태, 진행률, 크레딧, 출력 주소. --step은 파이프라인 단계 정보를 더하고, --download는 성공한 경우 파일을 저장합니다.
task list 여러 작업을 한 번에. id가 없으면 최근 작업(--limit, 기본값 10). 내 것이 아닌 id는 missed 아래에 표시됩니다.
task watch 작업이 끝날 때까지 기다립니다(기본값 1800초). JSON 모드에서는 변경마다 {"event":"progress","task_id":…,"status":…,"progress":…} 한 줄을 스트리밍합니다.
files upload 입력으로 쓸 file_token을 출력합니다.
history 최근 작업(--limit 1~50, 기본값 20): 날짜, 이름, 유형, 상태, id.
redo 이전 작업의 요청을 새 시드(또는 --seed)로 다시 보냅니다. 기본값은 @last입니다.

balance, docs, doctor

modelgen balance는 이번 기간의 AI 사용량을 요금제의 AI 허용량과 비교해 보여 줍니다.

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

요금제에 AI 허용량이 없으면 첫 줄은 AI usage: the plan includes no AI allowance, paid with 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가 나옵니다. 요금제는 air.build/pricing에 있고, 사용량은 설정 › 요금제 및 사용량에서도 볼 수 있습니다.

modelgen docs는 함께 제공되는 가이드를 출력합니다. --topic은 제공 문서 하나를 출력합니다: commands/<cmd>, examples/<scenario>, models, common-errors.

modelgen doctor는 curl, jq, 백엔드 주소, 팀 로그인, 에이전트 ID, 서비스 응답, 제공 문서, 터미널을 점검하며 각각 ✓, ✗, !가 붙은 한 줄로 표시합니다. 중요한 검사가 실패하면 1로 종료합니다.

종료 코드와 오류

오류는 stderr에 Error: <message> 형식으로 출력됩니다. JSON 모드이거나 stdout이 파이프로 연결되면 stdout에도 {"error":true,"exit_code":<n>,"reason":"…"}로 출력됩니다.

종료 코드 의미 해결 방법
0 성공. —
1 예기치 않은 오류, 또는 doctor 검사 실패. modelgen doctor를 실행하세요.
2 잘못된 사용법이나 매개변수. 아무것도 보내지 않았습니다. 메시지를 읽고 명령을 고치세요.
3 로그인 실패, 또는 AirBuild 에이전트 환경에서 실행되지 않음. 에이전트에서 실행하세요.
4 AI 허용량과 크레딧을 모두 사용함. 팀 소유자에게 크레딧 추가나 요금제 변경을 요청하세요.
5 콘텐츠 정책에 의해 거부됨. 프롬프트나 이미지를 바꾸세요.
6 작업이 실패·취소·만료되었거나 대기 시간이 초과됨. 메시지를 읽으세요. 시간 초과 후에도 작업은 계속 실행됩니다: modelgen task get <id>.
7 네트워크나 서비스 오류, 또는 다운로드 실패. 다시 시도하세요. 다운로드는 modelgen task get <id> --download를 쓰세요.
8 찾을 수 없음. id나 이름을 확인하세요.
9 서비스가 바쁨. 잠시 후 다시 시도하세요.
메시지 종료 코드
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

짧은 네트워크 장애와 서비스 바쁨 응답은 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