Library API Response Types
GetLibraryModelsResponse
Bases: BaseModel
A response for getting library models.
Attributes:
| Name | Type | Description |
|---|---|---|
models |
List[LibraryModel]
|
List of LibraryModel objects containing detailed information about each available model. |
total_count |
int
|
Total number of models matching the query criteria, useful for pagination calculations. |
LibraryModel
Bases: BaseModel
Models response for the library.
Attributes:
| Name | Type | Description |
|---|---|---|
credentials_id |
Optional[UUID]
|
UUID of the required credentials to use this model. None if no specific credentials needed. |
id |
Optional[UUID]
|
Unique identifier for the library model. Used in API calls to specify which model to use. |
category |
Optional[str]
|
Model category (e.g., "Multimodal", "NLP", "ComputerVision"). Helps classify model capabilities. |
description |
Optional[str]
|
Detailed description of the model's purpose, capabilities, and use cases. |
downloads |
int
|
Number of times this model has been downloaded. Indicates popularity and usage. |
type |
str
|
Input type the model accepts (e.g., "text", "image", "audio", "video"). |
languages |
List[str]
|
List of languages the model supports. Important for international applications. |
license_type |
Optional[str]
|
License under which the model is distributed (e.g., "MIT", "Apache20", "Commercial"). |
name |
Optional[str]
|
Internal name of the model. Used for identification and API references. |
display_name |
Optional[str]
|
Human-readable name for display in UIs. More user-friendly than internal name. |
price |
str
|
General pricing information as a string. May include currency and billing details. |
input_token_price |
Optional[str]
|
Cost per input token. Used for precise cost calculation. |
output_token_price |
Optional[str]
|
Cost per output token. Used for precise cost calculation. |
price_type |
str
|
Type of pricing model (e.g., "AITextOutputModelPrice", "AIImageOutputModelPrice"). |
prompt_id |
Optional[UUID]
|
UUID of associated prompt template if applicable. |
url |
Optional[str]
|
URL to model documentation, homepage, or additional information. |
provider |
Optional[str]
|
Company or organization that provides the model (e.g., "OpenAI", "Anthropic", "Google"). |
rating |
int
|
Average user rating of the model (typically 1-5 scale). Indicates user satisfaction. |
tags |
List[str]
|
List of descriptive tags for categorization and search. Helps discovery and filtering. |
available |
bool
|
Whether the model is currently available for use. False if deprecated or temporarily unavailable. |
token_price_conversion |
Optional[TokenPriceConversion]
|
Pre-calculated pricing conversions for different token quantities. |
allow_airia_credentials |
bool
|
Whether the model can be used with Airia-managed credentials. |
allow_byok_credentials |
bool
|
Whether the model supports Bring Your Own Key (BYOK) credentials. |
author |
str
|
Person or organization who created or maintains the model. |
license_link |
Optional[str]
|
Direct URL to the full license text or terms of service. |
released_at |
Optional[datetime]
|
Date when the model was first released or made available. |
deprecated_at |
Optional[datetime]
|
Date when the model was deprecated. None if still active. |
is_open_source |
bool
|
Whether the model is open source. Important for compliance and transparency. |
chat_specialized |
bool
|
Whether the model is optimized for conversational/chat use cases. |
industry |
str
|
Primary industry or domain the model is designed for. |
commercial_use |
bool
|
Whether the model can be used for commercial purposes. |
certifications |
Optional[List[str]]
|
List of compliance certifications (e.g., "SOC2", "HIPAA", "ISO 27001"). |
has_tool_support |
bool
|
Whether the model supports tool calling/function calling capabilities. |
has_stream_support |
bool
|
Whether the model supports streaming responses for real-time output. |
context_window |
int
|
Maximum number of tokens the model can process in a single request. |
max_output_tokens |
int
|
Maximum number of tokens the model can generate in a single response. |
state |
str
|
Current operational state of the model (e.g., "active", "deprecated", "beta"). |
TokenPriceConversion
Bases: BaseModel
Common conversion values for token prices.
Attributes:
| Name | Type | Description |
|---|---|---|
input_token_price_1k |
Optional[str]
|
Cost per 1,000 input tokens in USD. Pre-calculated for convenience when comparing pricing across models. |
output_token_price_1k |
Optional[str]
|
Cost per 1,000 output tokens in USD. Pre-calculated for convenience when comparing pricing across models. |
input_token_price_1m |
Optional[str]
|
Cost per 1 million input tokens in USD. Useful for large-scale usage estimation and enterprise planning. |
output_token_price_1m |
Optional[str]
|
Cost per 1 million output tokens in USD. Useful for large-scale usage estimation and enterprise planning. |