horde_sdk.ai_horde_api.apimodels.styles¶
StyleType ¶
Bases: StrEnum
An enum representing the different types of styles.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
ResponseModelStylesUser ¶
Bases: HordeAPIObjectBaseModel
Represents a style created by a user.
v2 API Model: ResponseModelStylesUser
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
type_
class-attribute
instance-attribute
¶
The type of the style.
StyleExample ¶
Bases: HordeAPIObjectBaseModel
Represents an example of an image generated by a style.
v2 API Model: StyleExample
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
url
class-attribute
instance-attribute
¶
url: str = Field(
examples=[
"https://lemmy.dbzer0.com/pictrs/image/c9915186-ca30-4f5a-873c-a91287fb4419.webp"
]
)
The URL of the image generated by this style.
primary
class-attribute
instance-attribute
¶
When true this image is to be used as the primary example for this style.
ModelStyleInputParamsStable ¶
Bases: _BaseImageGenerateParamMixin
The default parameters to use for all generations using a particular style.
v2 API Model: ModelStyleInputParamsStable
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
steps
class-attribute
instance-attribute
¶
The number of steps to use for the generation.
StyleStable ¶
Bases: HordeResponseBaseModel, _StyleResponseMixin
The details of a style, including its parameters and examples.
Represents the data returned from the following endpoints and http status codes
- /v2/styles/image_by_name/{style_name} | SingleStyleImageByNameRequest [GET] -> 200
- /v2/styles/image/{style_id} | SingleStyleImageByIDRequest [GET] -> 200
v2 API Model: StyleStable
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
params
class-attribute
instance-attribute
¶
The parameters to use for all generations using this style, if not set by the user.
examples
class-attribute
instance-attribute
¶
A list of examples of images generated by this style.
shared_key
class-attribute
instance-attribute
¶
The shared key backing this style, if any.
AllStylesImageResponse ¶
Bases: HordeResponseRootModel[list[StyleStable]]
The a list of styles.
Represents the data returned from the /v2/styles/image endpoint with http status code 200.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
AllStylesImageRequest ¶
Bases: BaseAIHordeRequest
Request to get image styles. Use page to paginate through the results.
Represents a GET request to the /v2/styles/image endpoint.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
sort
class-attribute
instance-attribute
¶
The sort order of the styles.
page
class-attribute
instance-attribute
¶
The page of styles to retrieve. Each page has 25 styles.
tag
class-attribute
instance-attribute
¶
If specified, return only styles with this tag.
model
class-attribute
instance-attribute
¶
If specified, return only styles which use this model.
get_api_model_name
classmethod
¶
get_http_method
classmethod
¶
get_query_fields
classmethod
¶
get_api_endpoint_subpath
classmethod
¶
get_default_success_response_type
classmethod
¶
SingleStyleImageByIDRequest ¶
Bases: BaseAIHordeRequest
Request to get a single image style by its ID.
Represents a GET request to the /v2/styles/image/{style_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
SingleStyleImageByNameRequest ¶
Bases: BaseAIHordeRequest
Request to get a single image style by its name.
Represents a GET request to the /v2/styles/image_by_name/{style_name} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
ModifyStyleImageResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin, ContainsWarningsResponseMixin
The response to modifying an image style, including any warnings.
Represents the data returned from the following endpoints and http status codes
- /v2/styles/image/{style_id} | ModifyStyleImageRequest [PATCH] -> 200
- /v2/styles/image | CreateStyleImageRequest [POST] -> 200
v2 API Model: StyleModify
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
CreateStyleImageRequest ¶
Bases: _StyleMixin, BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a POST request to the /v2/styles/image endpoint.
v2 API Model: ModelStyleInputStable
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
params
instance-attribute
¶
The parameters to use for all generations using this style, if not set by the user.
sharedkey
class-attribute
instance-attribute
¶
sharedkey: str | None = Field(
default=None,
examples=["00000000-0000-0000-0000-000000000000"],
min_length=36,
max_length=36,
)
The UUID of a shared key which will be used to fulfil this style when active.
get_api_model_name
classmethod
¶
get_http_method
classmethod
¶
get_api_endpoint_subpath
classmethod
¶
get_default_success_response_type
classmethod
¶
ModifyStyleImageRequest ¶
Bases: _StyleMixin, BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a PATCH request to the /v2/styles/image/{style_id} endpoint.
v2 API Model: ModelStylePatchStable
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
params
instance-attribute
¶
The parameters to use for all generations using this style, if not set by the user.
sharedkey
class-attribute
instance-attribute
¶
sharedkey: str | None = Field(
examples=["00000000-0000-0000-0000-000000000000"],
min_length=36,
max_length=36,
)
The UUID of a shared key which will be used to fulfil this style when active.
get_api_model_name
classmethod
¶
get_http_method
classmethod
¶
get_api_endpoint_subpath
classmethod
¶
get_default_success_response_type
classmethod
¶
DeleteStyleImageResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Indicates that a style was successfully deleted.
Represents the data returned from the /v2/styles/image/{style_id} endpoint with http status code 200.
v2 API Model: SimpleResponse
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
DeleteStyleImageRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a DELETE request to the /v2/styles/image/{style_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleImageExampleModifyResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin, ContainsWarningsResponseMixin
The response to modifying an image style example, including any warnings.
Represents the data returned from the following endpoints and http status codes
- /v2/styles/image/{style_id}/example/{example_id} | StyleImageExampleModifyRequest [PATCH] -> 200
- /v2/styles/image/{style_id}/example | StyleImageExampleAddRequest [POST] -> 200
v2 API Model: StyleModify
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleImageExampleAddRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a POST request to the /v2/styles/image/{style_id}/example endpoint.
v2 API Model: InputStyleExamplePost
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleImageExampleDeleteResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Indicates that an example was successfully deleted.
Represents the data returned from the /v2/styles/image/{style_id}/example/{example_id} endpoint with http status code 200.
v2 API Model: SimpleResponse
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleImageExampleDeleteRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a DELETE request to the /v2/styles/image/{style_id}/example/{example_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleImageExampleModifyRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Represents a PATCH request to the /v2/styles/image/{style_id}/example/{example_id} endpoint.
v2 API Model: InputStyleExamplePost
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
ModelStyleInputParamsKobold ¶
Bases: HordeResponseBaseModel, _BasePayloadKoboldMixin
The parameters than can be set for a text generation style.
v2 API Model: ModelStyleInputParamsKobold
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
StyleKobold ¶
Bases: HordeResponseBaseModel, _StyleResponseMixin
The details of a text style, including its parameters.
Represents the data returned from the following endpoints and http status codes
- /v2/styles/text_by_name/{style_name} | SingleStyleTextByNameRequest [GET] -> 200
- /v2/styles/text/{style_id} | SingleStyleTextByIDRequest [GET] -> 200
v2 API Model: StyleKobold
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
params
class-attribute
instance-attribute
¶
The parameters to use for all generations using this style, if not set by the user.
AllStylesTextResponse ¶
Bases: HordeResponseRootModel[list[StyleKobold]]
A list of text styles.
Represents the data returned from the /v2/styles/text endpoint with http status code 200.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
AllStylesTextRequest ¶
Bases: BaseAIHordeRequest
Request to get text styles. Use page to paginate through the results.
Represents a GET request to the /v2/styles/text endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
sort
class-attribute
instance-attribute
¶
The sort order of the styles.
page
class-attribute
instance-attribute
¶
The page of styles to retrieve. Each page has 25 styles.
tag
class-attribute
instance-attribute
¶
If specified, return only styles with this tag.
model
class-attribute
instance-attribute
¶
If specified, return only styles which use this model.
get_api_model_name
classmethod
¶
get_http_method
classmethod
¶
get_query_fields
classmethod
¶
get_api_endpoint_subpath
classmethod
¶
get_default_success_response_type
classmethod
¶
SingleStyleTextByIDRequest ¶
Bases: BaseAIHordeRequest
Request to get a single text style by its ID.
Represents a GET request to the /v2/styles/text/{style_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
SingleStyleTextByNameRequest ¶
Bases: BaseAIHordeRequest
Request to get a single text style by its name.
Represents a GET request to the /v2/styles/text_by_name/{style_name} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
ModifyStyleTextResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin, ContainsWarningsResponseMixin
The response to modifying a text style, including any warnings.
Represents the data returned from the following endpoints and http status codes
- /v2/styles/text/{style_id} | ModifyStyleTextRequest [PATCH] -> 200
- /v2/styles/text | CreateStyleTextRequest [POST] -> 200
v2 API Model: StyleModify
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
CreateStyleTextRequest ¶
Bases: BaseAIHordeRequest, _StyleMixin, APIKeyAllowedInRequestMixin
Request to create a new text style with the given parameters.
Represents a POST request to the /v2/styles/text endpoint.
v2 API Model: ModelStyleInputKobold
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
ModifyStyleTextRequest ¶
Bases: BaseAIHordeRequest, _StyleMixin, APIKeyAllowedInRequestMixin
Represents a PATCH request to the /v2/styles/text/{style_id} endpoint.
v2 API Model: ModelStylePatchKobold
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
DeleteStyleTextResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Indicates that a style was successfully deleted.
Represents the data returned from the /v2/styles/text/{style_id} endpoint with http status code 200.
v2 API Model: SimpleResponse
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
DeleteStyleTextRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to delete a text style by its ID.
Note that this is a privileged operation and requires the API key that created the style or admin/moderator privileges.
Represents a DELETE request to the /v2/styles/text/{style_id} endpoint.