status
AIHordeHeartbeatResponse
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Returns the status of the AI Horde API and a message if present.
Represents the data returned from the /v2/status/heartbeat endpoint with http status code 200.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/status.py
model_config
class-attribute
instance-attribute
message
class-attribute
instance-attribute
A message from the API. This is typically an error or warning message, but may also be informational.
time_constructed
property
The time the model was constructed (in epoch time).
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
AIHordeHeartbeatRequest
Bases: BaseAIHordeRequest
Request a heartbeat from the AI Horde API, suitable for checking if the API is up and running.
These requests may also return other meta information, such as the version of the API.
Represents a GET request to the /v2/status/heartbeat endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
model_config
class-attribute
instance-attribute
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
HordePerformanceResponse
Bases: HordeResponseBaseModel
Information about the performance of the horde, such as worker counts and queue sizes.
Represents the data returned from the /v2/status/performance endpoint with http status code 200.
v2 API Model: HordePerformance
Source code in horde_sdk/ai_horde_api/apimodels/status.py
interrogator_count
class-attribute
instance-attribute
interrogator_count: int | None = Field(
default=None,
description="How many workers are actively processing image interrogations in this {horde_noun} in the past 5 minutes.",
)
How many workers are actively processing image interrogations in this {horde_noun} in the past 5 minutes.
interrogator_thread_count
class-attribute
instance-attribute
interrogator_thread_count: int | None = Field(
default=None,
description="How many worker threads are actively processing image interrogation in this {horde_noun} in the past 5 minutes.",
)
How many worker threads are actively processing image interrogation in this {horde_noun} in the past 5 minutes.
past_minute_megapixelsteps
class-attribute
instance-attribute
How many megapixelsteps this horde generated in the last minute.
past_minute_tokens
class-attribute
instance-attribute
How many tokens this horde generated in the last minute.
queued_forms
class-attribute
instance-attribute
The amount of image interrogations waiting and processing currently in this horde.
queued_megapixelsteps
class-attribute
instance-attribute
The amount of megapixelsteps in waiting and processing requests currently in this horde.
queued_requests
class-attribute
instance-attribute
The amount of waiting and processing image requests currently in this horde.
queued_text_requests
class-attribute
instance-attribute
The amount of waiting and processing text requests currently in this horde.
queued_tokens
class-attribute
instance-attribute
The amount of tokens in waiting and processing requests currently in this horde.
text_thread_count
class-attribute
instance-attribute
text_thread_count: int | None = Field(
default=None,
description="How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes.",
)
How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes.
text_worker_count
class-attribute
instance-attribute
How many workers are actively processing prompt generations in this horde in the past 5 minutes.
thread_count
class-attribute
instance-attribute
thread_count: int | None = Field(
default=None,
description="How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes.",
)
How many worker threads are actively processing prompt generations in this {horde_noun} in the past 5 minutes.
worker_count
class-attribute
instance-attribute
How many workers are actively processing prompt generations in this horde in the past 5 minutes.
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
HordePerformanceRequest
Bases: BaseAIHordeRequest
Request performance information about the horde, such as worker counts and queue sizes.
Represents a GET request to the /v2/status/performance endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
model_config
class-attribute
instance-attribute
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
Newspiece
Bases: HordeAPIObjectBaseModel
A piece of news from the horde, such as updates or other news from the AI-Horde team.
v2 API Model: Newspiece
Source code in horde_sdk/ai_horde_api/apimodels/status.py
date_published
class-attribute
instance-attribute
The date this newspiece was published.
importance
class-attribute
instance-attribute
How critical this piece of news is.
newspiece
class-attribute
instance-attribute
The actual piece of news.
tags
class-attribute
instance-attribute
The tags associated with this newspiece.
title
class-attribute
instance-attribute
The title of this newspiece.
more_info_urls
class-attribute
instance-attribute
The URLs for more information about this newspiece.
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
NewsResponse
Bases: HordeResponseRootModel[list[Newspiece]]
A list of newspieces from the horde, which are updates or other news from the AI-Horde team.
Represents the data returned from the /v2/status/news endpoint with http status code 200.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
__iter__
__getitem__
get_api_model_name
classmethod
__eq__
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
NewsRequest
Bases: BaseAIHordeRequest
Request news from the horde, such as updates or other news from the AI-Horde team.
Represents a GET request to the /v2/status/news endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
model_config
class-attribute
instance-attribute
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
HordeStatusModelsAllResponse
Bases: HordeResponseRootModel[list[ActiveModel]]
A list of details about active models in the horde.
Represents the data returned from the /v2/status/models endpoint with http status code 200.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
__iter__
__getitem__
get_api_model_name
classmethod
__eq__
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
HordeStatusModelsAllRequest
Bases: BaseAIHordeRequest
Request details about models in the horde.
Represents a GET request to the /v2/status/models endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
type_
class-attribute
instance-attribute
The type of model to filter by.
min_count
class-attribute
instance-attribute
Filter only models that have at least this amount of threads serving.
max_count
class-attribute
instance-attribute
Filter only models that have at most this amount of threads serving.
model_state
class-attribute
instance-attribute
If 'known', only show stats for known models in the model reference. If 'custom' only show stats for custom models. If 'all' shows stats for all models.
model_config
class-attribute
instance-attribute
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
get_query_fields
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
HordeStatusModelsSingleResponse
Bases: HordeResponseRootModel[list[ActiveModel]]
A list of details about a single active model in the horde.
Represents the data returned from the /v2/status/models/{model_name} endpoint with http status code 200.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
__iter__
__getitem__
get_api_model_name
classmethod
__eq__
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
HordeStatusModelsSingleRequest
Bases: BaseAIHordeRequest
Request details about a single model in the horde by its name.
Represents a GET request to the /v2/status/models/{model_name} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/status.py
model_config
class-attribute
instance-attribute
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
HordeModes
Bases: HordeAPIObjectBaseModel
The current modes of the horde, such as maintenance mode, invite-only mode, and raid mode.
v2 API Model: HordeModes
Source code in horde_sdk/ai_horde_api/apimodels/status.py
maintenance_mode
class-attribute
instance-attribute
Whether the horde is in maintenance mode.
invite_only_mode
class-attribute
instance-attribute
Whether the horde is in invite-only mode.
raid_mode
class-attribute
instance-attribute
Whether the horde is in raid mode.
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.