Automatische Modellauswahl
Basis-URL https://arteza.ai/api/v1
OpenAPI 3.1-Spezifikation für SDK-Generatoren und Agenten: /api/v1/openapi.json
Offizielle SDKs für TypeScript und Python, eine Kommandozeile und Agent-Skills: SDKs und CLI
Senden Sie "model": "auto" mit einem "route"-Objekt, und Arteza wählt das Modell aus: Es liest die gesendeten Medien, um die Aufgabe zu bestimmen (ein Bild plus "video" ist Bild-zu-Video, Audio plus ein Gesicht ist ein Avatar), behält nur Modelle, die es mit diesen Feldern tun können, und ordnet sie nach route.priority -- Qualität (Standard), Geschwindigkeit oder Kosten -- optional unter route.max_credits. Die Antwort enthält ein "routing"-Objekt mit dem Modell, dem Grund und den Alternativen. POST /v1/estimate mit "model": "auto" ist ein kostenloser Testlauf.
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": []
# }