Compare commits
2 commits
4c2f22bf3e
...
722e0260f5
| Author | SHA1 | Date | |
|---|---|---|---|
| 722e0260f5 | |||
| a96a254473 |
2 changed files with 23 additions and 3 deletions
|
|
@ -232,6 +232,26 @@ def output_json(models):
|
||||||
def main():
|
def main():
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
|
# Handle --help before making any API calls
|
||||||
|
if "--help" in args or "-h" in args:
|
||||||
|
print("""List Venice.ai Video Models
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python list_video_models.py # List all models
|
||||||
|
python list_video_models.py --detailed # Show full specs for each model
|
||||||
|
python list_video_models.py --model <id> # Show specs for specific model
|
||||||
|
python list_video_models.py --json # Output as JSON
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help, -h Show this help message
|
||||||
|
--detailed Show full specifications for all models
|
||||||
|
--model <id> Show specs for a specific model (supports partial match)
|
||||||
|
--json Output all models as JSON
|
||||||
|
|
||||||
|
Environment:
|
||||||
|
VENICE_API_KEY Required. Your Venice.ai API key.""")
|
||||||
|
return
|
||||||
|
|
||||||
print("Fetching Venice.ai video models...")
|
print("Fetching Venice.ai video models...")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,14 +125,14 @@ def get_video_quote(
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
VENICE_QUOTE_URL,
|
VENICE_QUOTE_URL,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
json=request.model_dump(),
|
json=request.dict(),
|
||||||
timeout=30
|
timeout=30
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
result = VideoQuoteResponse(**response.json())
|
result = VideoQuoteResponse(**response.json())
|
||||||
result.model = model
|
result.model = model
|
||||||
result.config = request.model_dump()
|
result.config = request.dict()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -172,7 +172,7 @@ if __name__ == "__main__":
|
||||||
duration="10s",
|
duration="10s",
|
||||||
aspect_ratio="16:9",
|
aspect_ratio="16:9",
|
||||||
resolution="720p",
|
resolution="720p",
|
||||||
audio=True
|
audio=False
|
||||||
)
|
)
|
||||||
print(f" ✅ Quote: ${quote.quote:.2f}")
|
print(f" ✅ Quote: ${quote.quote:.2f}")
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue