自動モデル選択

ベースURL https://arteza.ai/api/v1

OpenAPI 3.1 仕様、SDK ジェネレータとエージェント向け: /api/v1/openapi.json

TypeScriptとPythonの公式SDK、コマンドラインとエージェントスキル: SDKsおよびCLI

「model」: 「auto」と「route」オブジェクトを送信すると、Arteza がモデルを選択します。送信されたメディアを読んでタスクを判定し(画像と「video」は画像からビデオ、オーディオと顔はアバター)、それらのフィールドで実行可能なモデルのみを保持し、route.priority ——品質(デフォルト)、速度、またはコスト——でランク付けします(オプションで route.max_credits の下で)。レスポンスは、モデル、理由、次点候補の名前を持つ「routing」オブジェクトを含みます。POST /v1/estimate に「model」: 「auto」を送信すると無料のドライラン実行ができます。

curl https://arteza.ai/api/v1/generations \
  -H "Authorization: Bearer $ARTEZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "route": { "output": "video", "priority": "cost", "max_credits": 5 },
    "input": { "prompt": "A red fox runs through fresh snow at dawn", "image_url": "https://example.com/fox.jpg" }
  }'

# 202 ... "routing": {
#   "task": "image-to-video", "priority": "cost",
#   "chosen": { "model": "...", "credits": 1.7, "seconds": 90 },
#   "reason": "the lowest price for image-to-video with these inputs ...",
#   "alternatives": [ ... ], "dropped_fields": []
# }