Automatic model choice
Base URL https://arteza.ai/api/v1
OpenAPI 3.1 specification, for SDK generators and agents: /api/v1/openapi.json
Official SDKs for TypeScript and Python, a command line and agent skills: SDKs and CLI
Send "model": "auto" with a "route" object and Arteza picks the model: it reads the media you sent to work out the task (an image plus "video" is image-to-video, audio plus a face is an avatar), keeps only models that can do it with those fields, and ranks them by route.priority -- quality (default), speed or cost -- optionally under route.max_credits. The response carries a "routing" object naming the model, the reason and the runners-up. POST /v1/estimate with "model": "auto" is a free dry run.
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": []
# }