venice_ai.types.identifiers
Semantic type definitions for Venice AI identifiers.
This module provides typed, normalized identifiers for various entities used throughout the Venice AI API, improving type safety and IDE support.
Design Philosophy: These types are intentionally lenient. The API is the authoritative source for valid identifiers. These types provide: 1. Semantic clarity (distinguishing model IDs from other strings) 2. Case normalization (model IDs are case-insensitive) 3. Basic format hints for IDE autocomplete
They do NOT strictly validate - that's the API's job.
normalize_model_id
def normalize_model_id(value: str) -> str
Normalize a Venice AI model ID.
Performs case normalization and basic cleanup. Does not strictly validate the format - the API is the authoritative source.
Arguments:
value- The model ID string to normalize
Returns:
The normalized model ID (lowercase, stripped)
Raises:
ValueError- If the value is empty
Examples:
>>> normalize_model_id("LLAMA-3.3-70B")
'llama-3.3-70b'
>>> normalize_model_id(" venice-sd35 ")
'venice-sd35'
normalize_queue_id
def normalize_queue_id(value: str) -> str
Normalize a video queue ID.
Queue IDs are UUIDs returned by the video queue endpoint.
Arguments:
value- The queue ID string to normalize
Returns:
The normalized queue ID (lowercase, stripped)
Raises:
ValueError- If the value is empty