output_formatstring必須必須です。ブラウザーや Web ゲームには glb、アニメーションソフトやエンジンには fbx、3D プリントには stl(形状のみ)を選びます。料金は変わりません。
- デフォルト値
- 指定なし
- 使用可能な値
"glb""fbx""stl"
例は、選択中のエンドポイントの公開パラメーター定義から作っています。API キーとサンプル素材を差し替えて、ご自身のサーバーから送信してください。
SDK・連携https://api.spicyapi.ai/api/v1/jobs/createTaskAPI キーはサーバーの環境変数 SPICY_API_KEY に保存します。Bearer 認証を使用し、JSON リクエストには Content-Type: application/json を指定してください。
Authorization: Bearer $SPICY_API_KEY# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "tripo/tools/convert",
"input": {
"fbx_preset": "blender",
"flatten_bottom": false,
"forward_axis": "+x",
"mesh_url": "https://example.com/reference.png",
"output_format": "glb",
"pivot_to_bottom": false,
"quad_mesh": false
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"このモデルの入力スキーマから生成した例です。API はどのリクエストも、同じスキーマで検証します。
これらのフィールドは、リクエスト本文の input オブジェクトに指定します。名前と型は API と一致します。デフォルト値の指定がない項目に、デフォルト値があると想定しないでください。
output_formatstring必須必須です。ブラウザーや Web ゲームには glb、アニメーションソフトやエンジンには fbx、3D プリントには stl(形状のみ)を選びます。料金は変わりません。
"glb""fbx""stl"mesh_urlstring必須変換する 90 MB 以下の GLB、バイナリ FBX、OBJ、STL です。リギング済みやアニメーション付きのファイルも使えます。
in_placeboolean任意既定で無効です。有効にすると、書き出すアニメーションクリップから前進移動を取り除きます。料金は変わりません。
keep_animationboolean任意既定で有効です。骨格とアニメーションクリップを新しいファイルに書き込みます。静止メッシュにする場合は無効にします。料金は変わりません。
bake_texturesboolean任意既定で有効です。高度なマテリアルをベーステクスチャにベイクします。料金は変わりません。
fbx_presetstring任意FBX 書き出し用の互換プリセットです。blender(既定)、3dsmax、mixamo、bake_scale を選べます。料金は変わりません。
"blender""3dsmax""mixamo""bake_scale"forward_axisstring任意出力ファイルでモデルが向く軸です。+x(既定)、-x、+y、-y から選びます。料金は変わりません。
"+x""-x""+y""-y"flatten_bottomboolean任意料金に影響既定で無効です。有効にすると底面を平らにするため、3D プリントの前処理に使えます。上位料金が適用されます。
scale_factornumber任意料金に影響書き出し時の一様な拡大縮小倍率で、既定は 1 です。ほかの値を指定すると上位料金が適用されます。
pivot_to_bottomboolean任意料金に影響既定で無効です。有効にするとピボットを底面の中心に移し、配置時にモデルを地面に接地させやすくします。上位料金が適用されます。
texture_formatstring任意料金に影響書き出すテクスチャは jpeg(既定)、png、webp から選びます。png または webp では上位料金が適用されます。
"jpeg""png""webp"texture_sizeinteger任意料金に影響拡散テクスチャのピクセルサイズで、128~8192、既定は 4096 です。ほかの値を指定すると上位料金が適用されます。
face_limitinteger任意料金に影響任意の最大面数で、48~2,000,000 を指定できます。空欄なら元の面数を保ちます。指定すると上位料金が適用されます。
quad_meshboolean任意料金に影響既定で無効です。有効にすると四角形ポリゴンにリメッシュします。face_limit を指定しなければ約 10,000 面になります。output_format は fbx が必要です。上位料金が適用されます。
{
"additionalProperties": false,
"properties": {
"bake_textures": {
"default": true,
"description": "Bake advanced materials into the base textures. Does not change the price.",
"type": "boolean",
"x-ui": {
"advanced": true,
"affects_price": false,
"order": 35,
"widget": "switch"
}
},
"face_limit": {
"description": "Maximum number of faces, 48 to 2,000,000. Leave empty to keep the original count. Setting it uses the higher rate.",
"maximum": 2000000,
"minimum": 48,
"type": "integer",
"x-ui": {
"affects_price": true,
"order": 75,
"widget": "number"
}
},
"fbx_preset": {
"default": "blender",
"description": "Compatibility preset for FBX exports. Does not change the price.",
"enum": [
"blender",
"3dsmax",
"mixamo",
"bake_scale"
],
"type": "string",
"x-ui": {
"advanced": true,
"affects_price": false,
"enum_labels": {
"3dsmax": "3ds Max",
"bake_scale": "Bake scale",
"blender": "Blender",
"mixamo": "Mixamo"
},
"order": 40,
"widget": "radio"
}
},
"flatten_bottom": {
"default": false,
"description": "Flatten the underside of the model, useful for 3D printing. Uses the higher rate.",
"type": "boolean",
"x-ui": {
"advanced": true,
"affects_price": true,
"order": 50,
"widget": "switch"
}
},
"forward_axis": {
"default": "+x",
"description": "Axis the model faces in the exported file. Does not change the price.",
"enum": [
"+x",
"-x",
"+y",
"-y"
],
"type": "string",
"x-ui": {
"advanced": true,
"affects_price": false,
"enum_labels": {
"+x": "+X",
"+y": "+Y",
"-x": "-X",
"-y": "-Y"
},
"order": 45,
"widget": "radio"
}
},
"in_place": {
"default": false,
"description": "Remove forward movement from animation clips during export. Does not change the price.",
"type": "boolean",
"x-ui": {
"advanced": true,
"affects_price": false,
"order": 25,
"widget": "switch"
}
},
"keep_animation": {
"default": true,
"description": "Keep skeleton and animation data. Turn off for a static mesh. Does not change the price.",
"type": "boolean",
"x-ui": {
"advanced": true,
"affects_price": false,
"order": 30,
"widget": "switch"
}
},
"mesh_url": {
"contentMediaType": [
"model/gltf-binary",
"model/x-fbx",
"model/obj",
"model/stl"
],
"description": "The 3D model to convert: a GLB, binary FBX, OBJ or STL file up to 90 MB. Skeleton and animation are carried over by default.",
"minLength": 1,
"type": "string",
"x-ui": {
"accept": [
"model/gltf-binary",
"model/x-fbx",
"model/obj",
"model/stl"
],
"max_size_mb": 90,
"order": 100,
"primary": true,
"widget": "upload"
}
},
"output_format": {
"description": "Target format: glb for browsers and web games, fbx for animation software and engines, stl for 3D printing (geometry only). Does not change the price.",
"enum": [
"glb",
"fbx",
"stl"
],
"type": "string",
"x-ui": {
"affects_price": false,
"enum_labels": {
"fbx": "FBX",
"glb": "GLB",
"stl": "STL"
},
"order": 95,
"widget": "radio"
}
},
"pivot_to_bottom": {
"default": false,
"description": "Move the pivot to the centre of the model's base. Uses the higher rate.",
"type": "boolean",
"x-ui": {
"advanced": true,
"affects_price": true,
"order": 60,
"widget": "switch"
}
},
"quad_mesh": {
"default": false,
"description": "Remesh to four-sided polygons (about 10,000 faces unless face_limit is set). Requires output_format fbx. Uses the higher rate.",
"type": "boolean",
"x-ui": {
"affects_price": true,
"order": 80,
"widget": "switch"
}
},
"scale_factor": {
"default": 1,
"description": "Uniform scale for the exported model. Any value other than 1 uses the higher rate.",
"maximum": 1000,
"minimum": 0.001,
"type": "number",
"x-ui": {
"advanced": true,
"affects_price": true,
"order": 55,
"widget": "number"
}
},
"texture_format": {
"default": "jpeg",
"description": "Image format of the exported textures. png or webp uses the higher rate.",
"enum": [
"jpeg",
"png",
"webp"
],
"type": "string",
"x-ui": {
"advanced": true,
"affects_price": true,
"enum_labels": {
"jpeg": "JPEG",
"png": "PNG",
"webp": "WebP"
},
"order": 65,
"widget": "radio"
}
},
"texture_size": {
"default": 4096,
"description": "Diffuse texture size in pixels, 128 to 8192. Any value other than 4096 uses the higher rate.",
"maximum": 8192,
"minimum": 128,
"type": "integer",
"x-ui": {
"advanced": true,
"affects_price": true,
"order": 70,
"step": 128,
"widget": "slider"
}
}
},
"required": [
"mesh_url",
"output_format"
],
"type": "object",
"x-pricing": {
"billingMode": "formula",
"variantFields": []
}
}HTTP 202 はタスクを受け付けたという意味で、生成が終わったという意味ではありません。返ってきた taskId を保存し、そのタスクの状態を問い合わせてください。結果を待っている間に、同じ内容でタスクを作り直さないでください。
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/recordInfo?taskId=job_01k3m8x9q2z4v7n5p6r8s0t1w3
{
"code": 200,
"msg": "success",
"request_id": "req_example_create",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"state": "queued",
"estimatedCost": "0.750000"
}
}受理レスポンスには今回の概算料金が含まれるため、アプリのタスク履歴と請求画面に同じ金額を表示できます。
curl --get "https://api.spicyapi.ai/api/v1/jobs/recordInfo" \
--data-urlencode "taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"ポーリングは約 2 秒間隔から始め、徐々に間隔を延ばします。終了状態になったら止めてください。通信が切れたときも、元の taskId で状態を確認します。作成をやり直すときは、同じ冪等キーと同じ本文をそのまま使い回してください。
import { verifyWebhook } from "@spicyapi/sdk";
// express.raw keeps the bytes we signed; express.json never matches.
app.post("/hooks/spicy", express.raw({ type: "application/json" }), (req, res) => {
const { payload } = verifyWebhook({
rawBody: req.body,
timestamp: req.header("X-Webhook-Timestamp"),
signature: req.header("X-Webhook-Signature"),
payloadVersion: Number(req.header("X-Webhook-Payload-Version")),
secret: process.env.SPICY_WEBHOOK_SECRET,
});
res.status(200).end();
void handleFinishedTask(payload);
});タスク作成時に callBackUrl を渡せば、完了したレコードが POST で届きます——ポーリングは一切不要です。配信には毎回 X-Webhook-Timestamp、X-Webhook-Signature、X-Webhook-Payload-Version が付きます。署名は taskId.timestamp.sha256(body) に対する HMAC-SHA256(base64)なので、生のバイト列で検証してください。JSON を解析して再度文字列化するとバイト列が変わり、検証は必ず失敗します。失敗した配信は再送されるため同じ taskId が二度届くことがあります。ハンドラーは冪等に。まず 2xx を返し、処理はその後で——応答が遅いと配信失敗として扱われます。
output を読むのは、state が succeeded のときだけにしてください。失敗したときは errorCode、errorMessage、request_id を手がかりに調べます。例に出ている料金や状態は、実際の請求ではありません。
{
"code": 200,
"msg": "success",
"request_id": "req_example_record",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"model": "tripo/tools/convert",
"state": "succeeded",
"output": {
"assets": [
{
"key": "tasks/2026/08/28/job_01k3m8x9q2z4v7n5p6r8s0t1w3/3f7a1c9e5b2d48f0a6c1e3d5b7f9a1c3.png",
"mime": "image/png",
"url": "https://example.r2.cloudflarestorage.com/results/job_01k3m8x9q2z4v7n5p6r8s0t1w3/result.png?X-Amz-Signature=SIGNATURE_FROM_RESPONSE",
"expiresAt": "2026-08-28T12:20:08.000Z"
}
]
},
"cost": "0.750000",
"settled": true,
"createdAt": "2026-08-28T12:00:00Z",
"completedAt": "2026-08-28T12:00:30Z"
}
}利用可能なファイルは assets[].url からそのまま開くか、ダウンロードできます。API の Authorization ヘッダーは不要です。署名付き URL は expiresAt で失効しますが、保存期間内であればタスクを再取得することで更新できます。処理中または利用できないファイルに URL はありません。署名付き URL は非公開情報として扱ってください。
アプリ、ターミナル、AI アシスタント、ビジュアルワークフローで SpicyAPI を活用。接続ガイドを選んでください。
上のコードを書く必要はありません。MCP サーバーを 1 回接続すれば、MCP に対応するエージェント(Claude Code、Codex、Cursor、Windsurf、VS Code、Gemini CLI、Cline、LibreChat)がこのモデルを名前で実行できます。シェルから 1 つのコマンドで実行することもできます。
Use tripo/tools/convert to generate a portrait of a dancer under neon light, and save it to ./out/.
エージェントは公開カタログからモデルを引き、ローカルファイルを代わりにアップロードし、正確な見積もりと上限額を示して確認を待ちます。承認するまで課金は発生しません。
claude mcp add spicyapi -e SPICY_API_KEY=$SPICY_API_KEY \
-- npx --yes --package=@spicyapi/mcp spicyapi-mcp
npx skills add spicyapi-ai/spicy-skill1 行目でツールを、2 行目で Skill を渡します。Skill は使い方の取り決めです——課金の前に見積もりを取り、ローカルファイルはバイト列を貼らずにアップロードし、完成した成果物の URL を推測せずに読む。ほかのクライアントも同じサーバーをそれぞれの設定ファイルから使います。開発者向けページをご覧ください。
npx @spicyapi/cli tasks create --model tripo/tools/convert \
--input-json '{"fbx_preset":"blender","flatten_bottom":false,"forward_axis":"+x","mesh_url":"https://example.com/reference.png","output_format":"glb","pivot_to_bottom":false,"quad_mesh":false}' \
--wait入力は上の例と同じ、このエンドポイント固有のスキーマに従います。--wait はタスクの完了までポーリングして結果を表示します。CI では --yes を追加すると確認を省略できます。先に SPICY_API_KEY を設定してください。API、CLI、MCP サーバーで同じキーを使えます。
npx @spicyapi/cli files upload ./poster.png
# -> spicy://uploads/01k3m8x9q2z4v7n5p6r8s0t1w3
npx @spicyapi/cli tasks create --model tripo/tools/convert \
--input-json '{"mesh_url":"spicy://uploads/01k3m8x9q2z4v7n5p6r8s0t1w3"}' \
--waitリクエストが受け取るのは URL であってバイト列ではありません。先にアップロードし、出力される spicy:// URI を渡してください。上のフィールド名はこのエンドポイントのスキーマから取ったものです。MCP 経由のエージェントはこの手順を代わりに済ませます——前述の一文が ./poster.png をそのまま指せるのはそのためです。公開 HTTPS で参照できるメディアならアップロードは不要です。
npx @spicyapi/cli tasks create --model tripo/tools/convert \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied--retention は保持期間を短くするだけです——30m、1h、7d、あるいは 0 なら終了と同時に削除。実際に効くのはリクエスト・アカウント設定・プラットフォーム上限のうち最も短い値なので、指定した数値が通った前提で進めず、タスクレコードから読み戻してください。アカウントの許容より長い値を渡しても何も起きません。
ComfyUI Manager か下のコマンドで SpicyAPI ノードをインストールしたら、キャンバスで Tripo 3D Tools · Convert を検索してください。このノードにはこのページと同じオプションがあり、実行前に価格が表示されます。
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi埋め込みパネルはこのページと同じスキーマを参照するため、API 仕様とのずれを防げます。ドキュメント内の検索対象にする場合は、/api/embed/models/ の JSON を取得して描画してください。
<iframe src="https://spicyapi.ai/embed/ja/models/tripo-tools/api?model=tripo%2Ftools%2Fconvert" width="100%" height="560" loading="lazy" title="リクエスト例" style="border:1px solid rgba(0,0,0,.12)"></iframe>