status
AlchemyUpscaleResult
Bases: HordeAPIData
Represents the result of an upscale job.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyCaptionResult
Bases: HordeAPIData
Represents the result of a caption job.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyNSFWResult
Bases: HordeAPIData
Represents the result of an NSFW evaluation.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyInterrogationResultItem
Bases: HordeAPIData
Represents an item in the result of an interrogation job.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyInterrogationDetails
Bases: HordeAPIData
The details of an interrogation job.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
tags
instance-attribute
The resulting similar tags of the image.
sites
instance-attribute
The resulting similar sites of the image.
artists
instance-attribute
The resulting similar artists of the image.
flavors
instance-attribute
The resulting similar flavors of the image.
mediums
instance-attribute
The resulting similar mediums of the image.
movements
instance-attribute
The resulting similar movements of the image.
techniques
instance-attribute
The resulting similar techniques of the image.
AlchemyInterrogationResult
Bases: HordeAPIData
Represents the result of an interrogation job. Use the interrogation field for the details.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyFormStatus
Bases: HordeAPIData
Represents the status of a form in an interrogation job.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
result
class-attribute
instance-attribute
result: (
AlchemyInterrogationDetails
| AlchemyNSFWResult
| AlchemyCaptionResult
| AlchemyUpscaleResult
| None
) = None
The result of the form.
model_config
class-attribute
instance-attribute
validate_form
Ensure that the form is a known alchemy type.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
validate_result
Ensure that the result is valid and convert it to the correct type, if possible.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
AlchemyStatusResponse
Bases: HordeResponseBaseModel, ResponseWithProgressMixin
Contains the status of an alchemy job and any completed work (if any).
Represents the data returned from the following endpoints and http status codes
- /v2/interrogate/status/{id} | AlchemyStatusRequest [GET] -> 200
- /v2/interrogate/status/{id} | AlchemyDeleteRequest [DELETE] -> 200
v2 API Model: InterrogationStatus
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
state
instance-attribute
The state of the job. See GENERATION_STATE for possible values.
all_interrogation_results
property
Return all completed interrogation results.
all_nsfw_results
property
Return all completed nsfw results.
all_caption_results
property
Return all completed caption results.
all_upscale_results
property
Return all completed upscale results.
model_config
class-attribute
instance-attribute
time_constructed
property
The time the model was constructed (in epoch time).
get_api_model_name
classmethod
is_job_complete
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
is_job_possible
is_final_follow_up
classmethod
get_finalize_success_request_type
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
AlchemyStatusRequest
Bases: BaseAIHordeRequest, JobRequestMixin, APIKeyAllowedInRequestMixin
Poll for the status of an interrogation job, and retrieve any completed work.
Represents a GET request to the /v2/interrogate/status/{id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/status.py
model_config
class-attribute
instance-attribute
apikey
class-attribute
instance-attribute
Defaults to ANON_API_KEY. See also .is_api_key_required()
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
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
is_api_key_required
classmethod
validate_api_key_length
Validate that the API key is the correct length, or is the special ANON_API_KEY.
Source code in horde_sdk/generic_api/apimodels.py
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
__eq__
__hash__
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
AlchemyDeleteRequest
Bases: BaseAIHordeRequest, JobRequestMixin
Cancel an in-progress interrogation job.
Represents a DELETE request to the /v2/interrogate/status/{id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/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
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.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
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.