horde_sdk.ai_horde_api.apimodels.stats¶
StatsModelsTimeframe ¶
Bases: StrEnum
A timeframe for stats data.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
ImageStatsModelsResponse ¶
Bases: HordeResponseBaseModel
Statistics for image model usage.
Represents the data returned from the /v2/stats/img/models endpoint with http status code 200.
v2 API Model: ImgModelStats
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
validate_timeframe_data
classmethod
¶
Validate the data for a timeframe.
Parameters:
-
v(dict[str, int | None]) –The data for a timeframe.
Raises:
-
ValueError–If the data is invalid.
Returns:
-
dict[str, int]–dict[str, int]: The data for a timeframe.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
get_api_model_name
classmethod
¶
get_timeframe ¶
Return the data for the given timeframe.
Parameters:
-
timeframe(StatsModelsTimeframe) –The timeframe to get the data for.
Returns:
-
dict[str, int]–dict[str, int]: The data for the given timeframe.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
ImageStatsModelsRequest ¶
Bases: BaseAIHordeRequest
Request the usage statistics for image models.
Represents a GET request to the /v2/stats/img/models endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
SinglePeriodImgStat ¶
Bases: HordeAPIObjectBaseModel
Represents the stats for a single period of image generation.
v2 API Model: SinglePeriodImgStat
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
ImageStatsModelsTotalResponse ¶
Bases: HordeResponseBaseModel
Summary statistics for all image models.
Represents the data returned from the /v2/stats/img/totals endpoint with http status code 200.
v2 API Model: StatsImgTotals
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
day
class-attribute
instance-attribute
¶
The total stats for the past day.
hour
class-attribute
instance-attribute
¶
The total stats for the past hour.
minute
class-attribute
instance-attribute
¶
The total stats for the past minute.
month
class-attribute
instance-attribute
¶
The total stats for the past month.
total
class-attribute
instance-attribute
¶
The total stats for all time.
ImageStatsModelsTotalRequest ¶
Bases: BaseAIHordeRequest
Request summary usage statistics across all image models.
Represents a GET request to the /v2/stats/img/totals endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
TextStatsModelResponse ¶
Bases: HordeResponseBaseModel
Statistics for text model usage.
Represents the data returned from the /v2/stats/text/models endpoint with http status code 200.
v2 API Model: TxtModelStats
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
validate_timeframe_data
classmethod
¶
Validate the data for a timeframe.
Parameters:
-
v(dict[str, int | None]) –The data for a timeframe.
Raises:
-
ValueError–If the data is invalid.
Returns:
-
dict[str, int]–dict[str, int]: The data for a timeframe.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
TextStatsModelsRequest ¶
Bases: BaseAIHordeRequest
Request the usage statistics for text models.
Represents a GET request to the /v2/stats/text/models endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
SinglePeriodTxtStat ¶
Bases: HordeAPIObjectBaseModel
Represents the stats for a single period.
v2 API Model: SinglePeriodTxtStat
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
TextStatsModelsTotalResponse ¶
Bases: HordeResponseBaseModel
Summary statistics for all text models.
Represents the data returned from the /v2/stats/text/totals endpoint with http status code 200.
v2 API Model: StatsTxtTotals
Source code in horde_sdk/ai_horde_api/apimodels/stats.py
TextStatsModelsTotalRequest ¶
Bases: BaseAIHordeRequest
Summary usage statistics across all text models.
Represents a GET request to the /v2/stats/text/totals endpoint.