API リファレンス

3D モデル

このエンドポイントのモデル(1)

ワークベンチで試す
POST/v1/model3d/tasks
GET/v1/model3d/tasks/{task_id}

非同期の 3D 生成と後処理。operation フィールド 1 つでタスクの処理内容が決まります:テキスト、画像 1 枚、または複数のビューからモデルを作成し、テクスチャ付け、セグメンテーション、リトポロジー、リギングを行います。送信すると task_id が返ります。タスクのボディにモデルの URL が含まれるまでポーリングしてください。

#リクエストパラメーター

  • modelstring必須

    モデル一覧にある 3D モデルの ID(例:tripo-3d)。

  • operationstring必須

    text_to_model · image_to_model · multiview_to_model · texture · smart_segment · retopology · rig · animate。

  • promptstring任意

    作成する内容。text_to_model で使用します。

  • inputstring任意

    image_to_model では公開画像の URL を、texture、smart_segment、retopology、rig、animate では完成した 3D モデルの task_id を指定します。

  • inputsobject[]任意

    multiview_to_model:[{"front": url}, {"left": url}, …] — 正面のビューに加え、少なくとも 1 つの別のビュー。

  • textureboolean任意

    モデルと一緒にテクスチャを生成します。

  • pbrboolean任意

    PBR マテリアルを生成します。

  • texture_promptobject任意

    texture:{"text": "weathered bronze"} で新しい表面を記述します。

  • face_limitinteger任意

    retopology:結果の最大面数。

  • quadboolean任意

    retopology:三角形ではなく四角形のメッシュにします。

  • animationstring任意

    animate:リギング済みのモデルに適用するアニメーション。

#関連するエラー

  • 404 not_foundtask_id が不明か、後続ステップの入力タスクが存在しないか、まだ完了していません。
  • 401Bearer トークンが無効か、ありません。このパスでは error.code が付きません — ステータスで判定してください。
  • 402 insufficient_user_quotaウォレット残高が事前確保の見積額に足りません。
  • 429キー単位のレート制限です。ボディは空なので、Retry-After の時間だけ待ってください。insufficient_user_quota が付いた 429 は、レート制限ではなく 1 日の利用上限額によるものです。
  • 503 model_not_found不明なモデルか、現在そのモデルを提供できる正常なチャネルがありません。

エラーコード一覧 →

#リクエスト例

# 1. make a model from text
curl https://www.aisplice.store/v1/model3d/tasks \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tripo-3d", "operation": "text_to_model", "prompt": "A small ceramic fox", "texture": true}'

# 2. poll until status is completed; the file is in url
curl https://www.aisplice.store/v1/model3d/tasks/$TASK_ID -H "Authorization: Bearer sk-YOUR_KEY"

# 3. texture it: pass the finished task_id as input
curl https://www.aisplice.store/v1/model3d/tasks \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tripo-3d", "operation": "texture", "input": "'$TASK_ID'", "texture_prompt": {"text": "weathered bronze"}}'

#レスポンス

response.json
// POST /v1/model3d/tasks
{"task_id": "task_xxx", "status": "queued"}

// GET /v1/model3d/tasks/{task_id} — after completion
{"task_id": "task_xxx", "status": "completed", "url": "https://…/model.glb", "output": {"model_url": "https://…/model.glb"}}

まだ解決しませんか?

リクエスト ID かエラーメッセージを送っていただければ、こちらで調査します。