users
ContributionsDetails
Bases: HordeAPIObjectBaseModel
How many images and megapixelsteps this user has generated.
v2 API Model: ContributionsDetails
Source code in horde_sdk/ai_horde_api/apimodels/users.py
fulfillments
class-attribute
instance-attribute
How many images this user has generated.
megapixelsteps
class-attribute
instance-attribute
How many megapixelsteps this user has generated.
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
UserKudosDetails
Bases: HordeAPIObjectBaseModel
The details of the kudos this user has accumulated, used, sent and received.
v2 API Model: UserKudosDetails
Source code in horde_sdk/ai_horde_api/apimodels/users.py
accumulated
class-attribute
instance-attribute
The amount of Kudos accumulated or used for generating images.
admin
class-attribute
instance-attribute
The amount of Kudos this user has been given by the Horde admins.
awarded
class-attribute
instance-attribute
The amount of Kudos this user has been awarded from things like rating images.
gifted
class-attribute
instance-attribute
The amount of Kudos this user has given to other users.
received
class-attribute
instance-attribute
The amount of Kudos this user has been given by other users.
donated
class-attribute
instance-attribute
The amount of Kudos this user has donated to support education accounts.
recurring
class-attribute
instance-attribute
The amount of Kudos this user has received from recurring rewards.
styled
class-attribute
instance-attribute
The amount of Kudos this user has received from styling images.
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
MonthlyKudos
Bases: HordeAPIObjectBaseModel
The details of the monthly kudos this user receives.
v2 API Model: MonthlyKudos
Source code in horde_sdk/ai_horde_api/apimodels/users.py
amount
class-attribute
instance-attribute
How much recurring Kudos this user receives monthly.
last_received
class-attribute
instance-attribute
Last date this user received monthly Kudos.
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
UserThingRecords
Bases: HordeAPIObjectBaseModel
How many images, texts, megapixelsteps and tokens this user has generated or requested.
v2 API Model: UserThingRecords
Source code in horde_sdk/ai_horde_api/apimodels/users.py
megapixelsteps
class-attribute
instance-attribute
How many megapixelsteps this user has generated or requested.
tokens
class-attribute
instance-attribute
How many token this user has generated or requested.
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
UserAmountRecords
Bases: HordeAPIObjectBaseModel
How many images, texts, megapixelsteps and tokens this user has generated or requested.
v2 API Model: UserAmountRecords
Source code in horde_sdk/ai_horde_api/apimodels/users.py
image
class-attribute
instance-attribute
How many images this user has generated or requested.
interrogation
class-attribute
instance-attribute
How many texts this user has generated or requested.
text
class-attribute
instance-attribute
How many texts this user has generated or requested.
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
UserRecords
Bases: HordeAPIObjectBaseModel
How many images, texts, megapixelsteps, tokens and styles this user has generated, requested or has had used.
v2 API Model: UserRecords
Source code in horde_sdk/ai_horde_api/apimodels/users.py
contribution
class-attribute
instance-attribute
How much this user has contributed.
fulfillment
class-attribute
instance-attribute
How much this user has fulfilled.
request
class-attribute
instance-attribute
How much this user has requested.
usage
class-attribute
instance-attribute
How much this user has used.
style
class-attribute
instance-attribute
How much this user's styles have been used.
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
UsageDetails
Bases: HordeAPIObjectBaseModel
How many images and megapixelsteps this user has requested.
v2 API Model: UsageDetails
Source code in horde_sdk/ai_horde_api/apimodels/users.py
megapixelsteps
class-attribute
instance-attribute
How many megapixelsteps this user has requested.
requests
class-attribute
instance-attribute
How many images this user has requested.
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
ActiveGenerations
Bases: HordeAPIObjectBaseModel
A list of generations that are currently active for this user.
v2 API Model: ActiveGenerations
Source code in horde_sdk/ai_horde_api/apimodels/users.py
text
class-attribute
instance-attribute
The IDs of the text generations that are currently active for this user.
image
class-attribute
instance-attribute
The IDs of the image generations that are currently active for this user.
alchemy
class-attribute
instance-attribute
The IDs of the alchemy generations that are currently active for this user.
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
UserDetailsResponse
Bases: HordeResponseBaseModel
The details of a user.
Note that the response will contain only information the requesting user has permission to see. The owner of the account, moderators and admins will see more information than other users.
Represents the data returned from the following endpoints and http status codes
- /v2/users/{user_id} | SingleUserDetailsRequest [GET] -> 200
- /v2/find_user | FindUserRequest [GET] -> 200
v2 API Model: UserDetails
Source code in horde_sdk/ai_horde_api/apimodels/users.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | |
active_generations
class-attribute
instance-attribute
The active generations this user has requested.
admin_comment
class-attribute
instance-attribute
(Privileged) Comments from the horde admins about this user.
account_age
class-attribute
instance-attribute
How many seconds since this account was created.
concurrency
class-attribute
instance-attribute
How many concurrent generations this user may request.
contact
class-attribute
instance-attribute
(Privileged) Contact details for the horde admins to reach the user in case of emergency.
contributions
class-attribute
instance-attribute
How many images and megapixelsteps this user has generated.
customizer
class-attribute
instance-attribute
If this user can run custom models.
evaluating_kudos
class-attribute
instance-attribute
evaluating_kudos: float | None = Field(
default=None,
description="(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When this number reaches a pre-specified threshold, they automatically become trusted.",
)
(Privileged) The amount of Evaluating Kudos this untrusted user has from generations and uptime. When this number reaches a pre-specified threshold, they automatically become trusted.
flagged
class-attribute
instance-attribute
This user has been flagged for suspicious activity.
id_
class-attribute
instance-attribute
The user unique ID. It is always an integer.
kudos
class-attribute
instance-attribute
kudos: float | None = Field(
default=None,
description="The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image generations.",
)
The amount of Kudos this user has. The amount of Kudos determines the priority when requesting image generations.
kudos_details
class-attribute
instance-attribute
How much Kudos this user has accumulated or used for generating images.
moderator
class-attribute
instance-attribute
This user is a Horde moderator.
monthly_kudos
class-attribute
instance-attribute
How much recurring Kudos this user receives monthly.
pseudonymous
class-attribute
instance-attribute
If true, this user has not registered using an oauth service.
records
class-attribute
instance-attribute
How many images, texts, megapixelsteps and tokens this user has generated or requested.
sharedkey_ids
class-attribute
instance-attribute
The IDs of the shared keys this user has access to.
service
class-attribute
instance-attribute
This user is a Horde service account and can provide the proxied_user field.
special
class-attribute
instance-attribute
(Privileged) This user has been given the Special role.
deleted
class-attribute
instance-attribute
If True, this user has been deleted.
suspicious
class-attribute
instance-attribute
(Privileged) How much suspicion this user has accumulated.
trusted
class-attribute
instance-attribute
This user is a trusted member of the Horde.
usage
class-attribute
instance-attribute
How many images and megapixelsteps this user has requested.
username
class-attribute
instance-attribute
The user's unique Username. It is a combination of their chosen alias plus their ID.
vpn
class-attribute
instance-attribute
(Privileged) This user has been given the VPN role.
education
class-attribute
instance-attribute
(This user has been given the education role.
worker_count
class-attribute
instance-attribute
How many workers this user has created (active or inactive).
worker_ids
class-attribute
instance-attribute
The IDs of the workers this user has created (active or inactive).
worker_invited
class-attribute
instance-attribute
worker_invited: int | None = Field(
default=None,
description="Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user cannot add (new) workers to the horde.",
)
Whether this user has been invited to join a worker to the horde and how many of them. When 0, this user cannot add (new) workers to the horde.
styles
class-attribute
instance-attribute
The styles this user has created.
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
ListUsersDetailsResponse
Bases: HordeResponseRootModel[list[UserDetailsResponse]]
The response for a list of user details.
Represents the data returned from the /v2/users endpoint with http status code 200.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/users.py
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
ListUsersDetailsRequest
Bases: BaseAIHordeRequest
Represents a request to list all users.
Represents a GET request to the /v2/users endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/users.py
sort
class-attribute
instance-attribute
The field to sort the users by. The default is by kudos.
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
SingleUserDetailsRequest
Bases: BaseAIHordeRequest, MessageSpecifiesUserIDMixin
Represents a GET request to the /v2/users/{user_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/users.py
model_config
class-attribute
instance-attribute
user_id
instance-attribute
The user's ID, as a str, but only containing numeric values.
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
user_id_is_numeric
Check if the ID is a numeric string.
The API endpoint expects a string, but the only valid values would be numbers only.
Source code in horde_sdk/generic_api/apimodels.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
ModifyUser
Bases: _ModifyUserBase
Underlying model for modifying a user.
Source code in horde_sdk/ai_horde_api/apimodels/users.py
kudos
class-attribute
instance-attribute
The amount of kudos to modify (can be negative).
reset_suspicion
class-attribute
instance-attribute
Set the user's suspicion back to 0.
undelete
class-attribute
instance-attribute
When set to true, A user's who's marked to be deleted will become active again.
model_config
class-attribute
instance-attribute
admin_comment
class-attribute
instance-attribute
Add further information about this user for the other admins.
concurrency
class-attribute
instance-attribute
The amount of concurrent request this user can have.
contact
class-attribute
instance-attribute
contact: str | None = Field(
default=None,
examples=["email@example.com"],
max_length=500,
min_length=5,
)
Contact details for the horde admins to reach the user in case of emergency. This is only visible to horde moderators.
customizer
class-attribute
instance-attribute
When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Horde Model Reference.
education
class-attribute
instance-attribute
When set to true, the user is considered an education account and some options become more restrictive.
filtered
class-attribute
instance-attribute
When set to true, the replacement filter will always be applied against this user
flagged
class-attribute
instance-attribute
When set to true, the user cannot transfer kudos and all their workers are put into permanent maintenance.
moderator
class-attribute
instance-attribute
Set to true to make this user a horde moderator.
monthly_kudos
class-attribute
instance-attribute
When specified, will start assigning the user monthly kudos, starting now!
public_workers
class-attribute
instance-attribute
Set to true to make this user display their worker IDs.
service
class-attribute
instance-attribute
When set to true, the user is considered a service account proxying the requests for other users.
special
class-attribute
instance-attribute
When set to true, The user can send special payloads.
trusted
class-attribute
instance-attribute
When set to true,the user and their servers will not be affected by suspicion.
usage_multiplier
class-attribute
instance-attribute
The amount by which to multiply the users kudos consumption.
username
class-attribute
instance-attribute
When specified, will change the username. No profanity allowed!
vpn
class-attribute
instance-attribute
When set to true, the user will be able to onboard workers behind a VPN. This should be used as a temporary solution until the user is trusted.
worker_invited
class-attribute
instance-attribute
Set to the amount of workers this user is allowed to join to the horde when in worker invite-only mode.
get_api_model_name
abstractmethod
classmethod
Return the name of the model as seen in the published swagger doc.
If none, there is no payload, such as for a GET request.
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
ModifyUserReply
Bases: _ModifyUserBase
Base class for the response returned when modifying a user.
Source code in horde_sdk/ai_horde_api/apimodels/users.py
new_kudos
class-attribute
instance-attribute
The new amount of kudos this user has.
new_suspicion
class-attribute
instance-attribute
The new amount of suspicion this user has.
undeleted
class-attribute
instance-attribute
True if the user was undeleted with this operation.
model_config
class-attribute
instance-attribute
admin_comment
class-attribute
instance-attribute
Add further information about this user for the other admins.
concurrency
class-attribute
instance-attribute
The amount of concurrent request this user can have.
contact
class-attribute
instance-attribute
contact: str | None = Field(
default=None,
examples=["email@example.com"],
max_length=500,
min_length=5,
)
Contact details for the horde admins to reach the user in case of emergency. This is only visible to horde moderators.
customizer
class-attribute
instance-attribute
When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Horde Model Reference.
education
class-attribute
instance-attribute
When set to true, the user is considered an education account and some options become more restrictive.
filtered
class-attribute
instance-attribute
When set to true, the replacement filter will always be applied against this user
flagged
class-attribute
instance-attribute
When set to true, the user cannot transfer kudos and all their workers are put into permanent maintenance.
moderator
class-attribute
instance-attribute
Set to true to make this user a horde moderator.
monthly_kudos
class-attribute
instance-attribute
When specified, will start assigning the user monthly kudos, starting now!
public_workers
class-attribute
instance-attribute
Set to true to make this user display their worker IDs.
service
class-attribute
instance-attribute
When set to true, the user is considered a service account proxying the requests for other users.
special
class-attribute
instance-attribute
When set to true, The user can send special payloads.
trusted
class-attribute
instance-attribute
When set to true,the user and their servers will not be affected by suspicion.
usage_multiplier
class-attribute
instance-attribute
The amount by which to multiply the users kudos consumption.
username
class-attribute
instance-attribute
When specified, will change the username. No profanity allowed!
vpn
class-attribute
instance-attribute
When set to true, the user will be able to onboard workers behind a VPN. This should be used as a temporary solution until the user is trusted.
worker_invited
class-attribute
instance-attribute
Set to the amount of workers this user is allowed to join to the horde when in worker invite-only mode.
get_api_model_name
abstractmethod
classmethod
Return the name of the model as seen in the published swagger doc.
If none, there is no payload, such as for a GET request.
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
ModifyUserResponse
Bases: HordeResponseBaseModel, ModifyUserReply
Represents the data returned from the /v2/users/{user_id} endpoint with http status code 200.
v2 API Model: ModifyUser
Source code in horde_sdk/ai_horde_api/apimodels/users.py
model_config
class-attribute
instance-attribute
admin_comment
class-attribute
instance-attribute
Add further information about this user for the other admins.
concurrency
class-attribute
instance-attribute
The amount of concurrent request this user can have.
contact
class-attribute
instance-attribute
contact: str | None = Field(
default=None,
examples=["email@example.com"],
max_length=500,
min_length=5,
)
Contact details for the horde admins to reach the user in case of emergency. This is only visible to horde moderators.
customizer
class-attribute
instance-attribute
When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Horde Model Reference.
education
class-attribute
instance-attribute
When set to true, the user is considered an education account and some options become more restrictive.
filtered
class-attribute
instance-attribute
When set to true, the replacement filter will always be applied against this user
flagged
class-attribute
instance-attribute
When set to true, the user cannot transfer kudos and all their workers are put into permanent maintenance.
moderator
class-attribute
instance-attribute
Set to true to make this user a horde moderator.
monthly_kudos
class-attribute
instance-attribute
When specified, will start assigning the user monthly kudos, starting now!
public_workers
class-attribute
instance-attribute
Set to true to make this user display their worker IDs.
service
class-attribute
instance-attribute
When set to true, the user is considered a service account proxying the requests for other users.
special
class-attribute
instance-attribute
When set to true, The user can send special payloads.
trusted
class-attribute
instance-attribute
When set to true,the user and their servers will not be affected by suspicion.
usage_multiplier
class-attribute
instance-attribute
The amount by which to multiply the users kudos consumption.
username
class-attribute
instance-attribute
When specified, will change the username. No profanity allowed!
vpn
class-attribute
instance-attribute
When set to true, the user will be able to onboard workers behind a VPN. This should be used as a temporary solution until the user is trusted.
worker_invited
class-attribute
instance-attribute
Set to the amount of workers this user is allowed to join to the horde when in worker invite-only mode.
new_kudos
class-attribute
instance-attribute
The new amount of kudos this user has.
new_suspicion
class-attribute
instance-attribute
The new amount of suspicion this user has.
undeleted
class-attribute
instance-attribute
True if the user was undeleted with this operation.
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
ModifyUserRequest
Bases: BaseAIHordeRequest, MessageSpecifiesUserIDMixin, ModifyUser, APIKeyAllowedInRequestMixin
Represents a PUT request to the /v2/users/{user_id} endpoint.
v2 API Model: ModifyUserInput
Source code in horde_sdk/ai_horde_api/apimodels/users.py
model_config
class-attribute
instance-attribute
apikey
class-attribute
instance-attribute
Defaults to ANON_API_KEY. See also .is_api_key_required()
admin_comment
class-attribute
instance-attribute
Add further information about this user for the other admins.
concurrency
class-attribute
instance-attribute
The amount of concurrent request this user can have.
contact
class-attribute
instance-attribute
contact: str | None = Field(
default=None,
examples=["email@example.com"],
max_length=500,
min_length=5,
)
Contact details for the horde admins to reach the user in case of emergency. This is only visible to horde moderators.
customizer
class-attribute
instance-attribute
When set to true, the user will be able to serve custom Stable Diffusion models which do not exist in the Official AI Horde Model Reference.
education
class-attribute
instance-attribute
When set to true, the user is considered an education account and some options become more restrictive.
filtered
class-attribute
instance-attribute
When set to true, the replacement filter will always be applied against this user
flagged
class-attribute
instance-attribute
When set to true, the user cannot transfer kudos and all their workers are put into permanent maintenance.
moderator
class-attribute
instance-attribute
Set to true to make this user a horde moderator.
monthly_kudos
class-attribute
instance-attribute
When specified, will start assigning the user monthly kudos, starting now!
public_workers
class-attribute
instance-attribute
Set to true to make this user display their worker IDs.
service
class-attribute
instance-attribute
When set to true, the user is considered a service account proxying the requests for other users.
special
class-attribute
instance-attribute
When set to true, The user can send special payloads.
trusted
class-attribute
instance-attribute
When set to true,the user and their servers will not be affected by suspicion.
usage_multiplier
class-attribute
instance-attribute
The amount by which to multiply the users kudos consumption.
username
class-attribute
instance-attribute
When specified, will change the username. No profanity allowed!
vpn
class-attribute
instance-attribute
When set to true, the user will be able to onboard workers behind a VPN. This should be used as a temporary solution until the user is trusted.
worker_invited
class-attribute
instance-attribute
Set to the amount of workers this user is allowed to join to the horde when in worker invite-only mode.
kudos
class-attribute
instance-attribute
The amount of kudos to modify (can be negative).
reset_suspicion
class-attribute
instance-attribute
Set the user's suspicion back to 0.
undelete
class-attribute
instance-attribute
When set to true, A user's who's marked to be deleted will become active again.
user_id
instance-attribute
The user's ID, as a str, but only containing numeric values.
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
is_api_key_required
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
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
user_id_is_numeric
Check if the ID is a numeric string.
The API endpoint expects a string, but the only valid values would be numbers only.
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
DeleteUserResponse
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Confirmation that a user was deleted.
Represents the data returned from the /v2/users/{user_id} endpoint with http status code 200.
v2 API Model: SimpleResponse
Source code in horde_sdk/ai_horde_api/apimodels/users.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
DeleteUserRequest
Bases: BaseAIHordeRequest, MessageSpecifiesUserIDMixin, APIKeyAllowedInRequestMixin
Request to delete a user.
Note that this is a privileged operation and requires the owning user, a moderator, or admin API key.
Represents a DELETE request to the /v2/users/{user_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/users.py
model_config
class-attribute
instance-attribute
apikey
class-attribute
instance-attribute
Defaults to ANON_API_KEY. See also .is_api_key_required()
user_id
instance-attribute
The user's ID, as a str, but only containing numeric values.
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
is_api_key_required
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
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
user_id_is_numeric
Check if the ID is a numeric string.
The API endpoint expects a string, but the only valid values would be numbers only.
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.