status
Generation
Bases: HordeAPIObjectBaseModel
Mixin that contains common fields for generation responses.
v2 API Model: Generation
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
model
class-attribute
instance-attribute
The model which generated this image.
state
class-attribute
instance-attribute
OBSOLETE (Use the gen_metadata field). The state of this generation.
worker_id
class-attribute
instance-attribute
The UUID of the worker which generated this image.
worker_name
class-attribute
instance-attribute
The name of the worker which generated this image.
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
ImageGeneration
Bases: Generation
Represents an individual image generation in a status response, including the image data.
Represents the individual image generation responses in a ImageGenerateStatusResponse.
v2 API Model: GenerationStable
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
id_
class-attribute
instance-attribute
The UUID of this generation. Is always returned as a GenerationID, but can initialized from a str.
censored
instance-attribute
When true this image has been censored by the worker's safety filter.
gen_metadata
class-attribute
instance-attribute
Extra metadata about faulted or defaulted components of the generation
model_config
class-attribute
instance-attribute
model
class-attribute
instance-attribute
The model which generated this image.
state
class-attribute
instance-attribute
OBSOLETE (Use the gen_metadata field). The state of this generation.
worker_id
class-attribute
instance-attribute
The UUID of the worker which generated this image.
worker_name
class-attribute
instance-attribute
The name of the worker which generated this image.
get_api_model_name
classmethod
validate_id
Validate the ID is not an empty string.
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
__eq__
__hash__
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
ImageGenerateStatusResponse
Bases: HordeResponseBaseModel, ResponseWithProgressMixin, ResponseGenerationProgressInfoMixin
The current status of an image generation request and the data if it is complete.
Represents the data returned from the following endpoints and http status codes
- /v2/generate/status/{id} | ImageGenerateStatusRequest [GET] -> 200
- /v2/generate/status/{id} | DeleteImageGenerateRequest [DELETE] -> 200
v2 API Model: RequestStatusStable
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
generations
class-attribute
instance-attribute
The individual image generation responses in this request.
shared
class-attribute
instance-attribute
If True, These images have been shared with LAION.
model_config
class-attribute
instance-attribute
restarted
instance-attribute
The amount of jobs that timed out and had to be restarted or were reported as failed by a worker.
faulted
class-attribute
instance-attribute
True when this request caused an internal server error and could not be completed.
wait_time
instance-attribute
The expected amount to wait (in seconds) to generate all jobs in this request.
queue_position
instance-attribute
The position in the requests queue. This position is determined by relative Kudos amounts.
kudos
instance-attribute
The amount of total Kudos this request has consumed until now.
is_possible
class-attribute
instance-attribute
If False, this request will not be able to be completed with the pool of workers currently available.
time_constructed
property
The time the model was constructed (in epoch time).
get_api_model_name
classmethod
get_finalize_success_request_type
classmethod
is_job_complete
is_job_possible
is_final_follow_up
classmethod
__eq__
__hash__
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
DeleteImageGenerateRequest
Bases: BaseAIHordeRequest, JobRequestMixin
Request to cancel an image generation by ID.
Represents a DELETE request to the /v2/generate/status/{id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
model_config
class-attribute
instance-attribute
id_
class-attribute
instance-attribute
The UUID for this job. Use this to post the results in the future.
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
__eq__
__hash__
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
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
ImageGenerateStatusRequest
Bases: BaseAIHordeRequest, JobRequestMixin
Request the status of an image generation by ID.
Important: This is a rate limited endpoint. Prefer using the check endpoint when simply checking the status.
Use this endpoint when you need to get the resulting image data.
See :class:horde_sdk.api_horde_api.apimodels.generate.check.ImageGenerateCheckRequest
for more information.
Represents a GET request to the /v2/generate/status/{id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/generate/status.py
model_config
class-attribute
instance-attribute
id_
class-attribute
instance-attribute
The UUID for this job. Use this to post the results in the future.
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
__eq__
__hash__
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
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.