Skip to content

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
class StyleType(StrEnum):
    """An enum representing the different types of styles."""

    image = auto()
    text = auto()

image class-attribute instance-attribute

image = auto()

text class-attribute instance-attribute

text = auto()

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
class ResponseModelStylesUser(HordeAPIObjectBaseModel):
    """Represents a style created by a user.

    v2 API Model: `ResponseModelStylesUser`
    """

    name: str
    """The name of the style."""
    id_: str = Field(alias="id")
    """The ID of the style."""
    type_: StyleType = Field(alias="type")
    """The type of the style."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ResponseModelStylesUser"

name instance-attribute

name: str

The name of the style.

id_ class-attribute instance-attribute

id_: str = Field(alias='id')

The ID of the style.

type_ class-attribute instance-attribute

type_: StyleType = Field(alias='type')

The type of the style.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ResponseModelStylesUser"

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
class StyleExample(HordeAPIObjectBaseModel):
    """Represents an example of an image generated by a style.

    v2 API Model: `StyleExample`
    """

    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: bool = False
    """When true this image is to be used as the primary example for this style."""

    id_: str = Field(alias="id")
    """The UUID of this example."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleExample"

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

primary: bool = False

When true this image is to be used as the primary example for this style.

id_ class-attribute instance-attribute

id_: str = Field(alias='id')

The UUID of this example.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleExample"

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
class ModelStyleInputParamsStable(_BaseImageGenerateParamMixin):
    """The default parameters to use for all generations using a particular style.

    v2 API Model: `ModelStyleInputParamsStable`
    """

    steps: int = Field(
        default=20,
        examples=[
            20,
        ],
    )
    """The number of steps to use for the generation."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStyleInputParamsStable"

steps class-attribute instance-attribute

steps: int = Field(default=20, examples=[20])

The number of steps to use for the generation.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStyleInputParamsStable"

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
@Unhashable
@Unequatable
class StyleStable(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`
    """

    params: ModelStyleInputParamsStable | None = None
    """The parameters to use for all generations using this style, if not set by the user."""

    examples: list[StyleExample] | None = None
    """A list of examples of images generated by this style."""
    shared_key: ExpiryStrSharedKeyDetailsResponse | None = None
    """The shared key backing this style, if any."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleStable"

params class-attribute instance-attribute

params: ModelStyleInputParamsStable | None = None

The parameters to use for all generations using this style, if not set by the user.

examples class-attribute instance-attribute

examples: list[StyleExample] | None = None

A list of examples of images generated by this style.

shared_key class-attribute instance-attribute

shared_key: ExpiryStrSharedKeyDetailsResponse | None = None

The shared key backing this style, if any.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleStable"

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
@Unhashable
@Unequatable
class AllStylesImageResponse(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`
    """

    root: list[StyleStable]
    """The underlying list of styles."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return _ANONYMOUS_MODEL

root instance-attribute

root: list[StyleStable]

The underlying list of styles.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return _ANONYMOUS_MODEL

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
class AllStylesImageRequest(
    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`
    """

    sort: Literal["popular", "age"] = "popular"
    """The sort order of the styles."""

    page: int = 1
    """The page of styles to retrieve. Each page has 25 styles."""

    tag: str | None = None
    """If specified, return only styles with this tag."""

    model: str | None = None
    """If specified, return only styles which use this model."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return _ANONYMOUS_MODEL

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_query_fields(cls) -> list[str]:
        return ["sort", "page", "tag", "model"]

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[AllStylesImageResponse]:
        return AllStylesImageResponse

sort class-attribute instance-attribute

sort: Literal['popular', 'age'] = 'popular'

The sort order of the styles.

page class-attribute instance-attribute

page: int = 1

The page of styles to retrieve. Each page has 25 styles.

tag class-attribute instance-attribute

tag: str | None = None

If specified, return only styles with this tag.

model class-attribute instance-attribute

model: str | None = None

If specified, return only styles which use this model.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return _ANONYMOUS_MODEL

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_query_fields classmethod

get_query_fields() -> list[str]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_query_fields(cls) -> list[str]:
    return ["sort", "page", "tag", "model"]

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[AllStylesImageResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[AllStylesImageResponse]:
    return AllStylesImageResponse

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
class SingleStyleImageByIDRequest(
    BaseAIHordeRequest,
):
    """Request to get a single image style by its ID.

    Represents a GET request to the /v2/styles/image/{style_id} endpoint.
    """

    style_id: str
    """The ID of the style to retrieve."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleStable]:
        return StyleStable

style_id instance-attribute

style_id: str

The ID of the style to retrieve.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> type[StyleStable]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleStable]:
    return StyleStable

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
class SingleStyleImageByNameRequest(
    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.
    """

    style_name: str
    """The name of the style to retrieve."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_name

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleStable]:
        return StyleStable

style_name instance-attribute

style_name: str

The name of the style to retrieve.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_name

get_default_success_response_type classmethod

get_default_success_response_type() -> type[StyleStable]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleStable]:
    return StyleStable

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
class ModifyStyleImageResponse(
    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`
    """

    id_: str = Field(alias="id")
    """The ID of the style."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleModify"

id_ class-attribute instance-attribute

id_: str = Field(alias='id')

The ID of the style.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleModify"

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
class CreateStyleImageRequest(
    _StyleMixin,
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a POST request to the /v2/styles/image endpoint.

    v2 API Model: `ModelStyleInputStable`
    """

    params: ModelStyleInputParamsStable
    """The parameters to use for all generations using this style, if not set by the user."""

    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."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStyleInputStable"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.POST

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[ModifyStyleImageResponse]:
        return ModifyStyleImageResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

params instance-attribute

params: ModelStyleInputParamsStable

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_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStyleInputStable"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.POST

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[ModifyStyleImageResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[ModifyStyleImageResponse]:
    return ModifyStyleImageResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True

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
class ModifyStyleImageRequest(
    _StyleMixin,
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a PATCH request to the /v2/styles/image/{style_id} endpoint.

    v2 API Model: `ModelStylePatchStable`
    """

    style_id: str
    """The ID of the style to modify."""

    params: ModelStyleInputParamsStable
    """The parameters to use for all generations using this style, if not set by the user."""

    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."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStylePatchStable"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.PATCH

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[ModifyStyleImageResponse]:
        return ModifyStyleImageResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

style_id instance-attribute

style_id: str

The ID of the style to modify.

params instance-attribute

params: ModelStyleInputParamsStable

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_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStylePatchStable"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.PATCH

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[ModifyStyleImageResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[ModifyStyleImageResponse]:
    return ModifyStyleImageResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True

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
class DeleteStyleImageResponse(
    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`
    """

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "SimpleResponse"

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "SimpleResponse"

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
class DeleteStyleImageRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a DELETE request to the /v2/styles/image/{style_id} endpoint."""

    style_id: str
    """The ID of the style to delete."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.DELETE

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[DeleteStyleImageResponse]:
        return DeleteStyleImageResponse

style_id instance-attribute

style_id: str

The ID of the style to delete.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.DELETE

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[DeleteStyleImageResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[DeleteStyleImageResponse]:
    return DeleteStyleImageResponse

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
class StyleImageExampleModifyResponse(
    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`
    """

    id_: str = Field(alias="id")
    """The ID of the example."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleModify"

id_ class-attribute instance-attribute

id_: str = Field(alias='id')

The ID of the example.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleModify"

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
class StyleImageExampleAddRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a POST request to the /v2/styles/image/{style_id}/example endpoint.

    v2 API Model: `InputStyleExamplePost`
    """

    style_id: str
    """The ID of the style to add the example to."""

    url: str
    """The URL of the image to add as an example."""

    primary: bool = False
    """When true this image is to be used as the primary example for this style."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "InputStyleExamplePost"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.POST

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleImageExampleModifyResponse]:
        return StyleImageExampleModifyResponse

style_id instance-attribute

style_id: str

The ID of the style to add the example to.

url instance-attribute

url: str

The URL of the image to add as an example.

primary class-attribute instance-attribute

primary: bool = False

When true this image is to be used as the primary example for this style.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "InputStyleExamplePost"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.POST

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[StyleImageExampleModifyResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleImageExampleModifyResponse]:
    return StyleImageExampleModifyResponse

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
class StyleImageExampleDeleteResponse(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`
    """

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "SimpleResponse"

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "SimpleResponse"

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
class StyleImageExampleDeleteRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a DELETE request to the /v2/styles/image/{style_id}/example/{example_id} endpoint."""

    style_id: str
    """The ID of the style to delete the example from."""

    example_id: str
    """The ID of the example to delete."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.DELETE

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id_example_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleImageExampleDeleteResponse]:
        return StyleImageExampleDeleteResponse

style_id instance-attribute

style_id: str

The ID of the style to delete the example from.

example_id instance-attribute

example_id: str

The ID of the example to delete.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.DELETE

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id_example_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[StyleImageExampleDeleteResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleImageExampleDeleteResponse]:
    return StyleImageExampleDeleteResponse

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
class StyleImageExampleModifyRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Represents a PATCH request to the /v2/styles/image/{style_id}/example/{example_id} endpoint.

    v2 API Model: `InputStyleExamplePost`
    """

    style_id: str
    """The ID of the style to modify the example of."""

    example_id: str
    """The ID of the example to modify."""

    url: str
    """The URL of the image to add as an example."""

    primary: bool = False
    """When true this image is to be used as the primary example for this style."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "InputStyleExamplePost"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.PATCH

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id_example_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleImageExampleModifyResponse]:
        return StyleImageExampleModifyResponse

style_id instance-attribute

style_id: str

The ID of the style to modify the example of.

example_id instance-attribute

example_id: str

The ID of the example to modify.

url instance-attribute

url: str

The URL of the image to add as an example.

primary class-attribute instance-attribute

primary: bool = False

When true this image is to be used as the primary example for this style.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "InputStyleExamplePost"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.PATCH

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_image_example_by_style_id_example_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[StyleImageExampleModifyResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleImageExampleModifyResponse]:
    return StyleImageExampleModifyResponse

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
class ModelStyleInputParamsKobold(HordeResponseBaseModel, _BasePayloadKoboldMixin):
    """The parameters than can be set for a text generation style.

    v2 API Model: `ModelStyleInputParamsKobold`
    """

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStyleInputParamsKobold"

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStyleInputParamsKobold"

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
class StyleKobold(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`
    """

    params: ModelStyleInputParamsKobold | None = None
    """The parameters to use for all generations using this style, if not set by the user."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleKobold"

params class-attribute instance-attribute

params: ModelStyleInputParamsKobold | None = None

The parameters to use for all generations using this style, if not set by the user.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleKobold"

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
@Unhashable
@Unequatable
class AllStylesTextResponse(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`
    """

    root: list[StyleKobold]
    """The underlying list of styles."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return _ANONYMOUS_MODEL

root instance-attribute

root: list[StyleKobold]

The underlying list of styles.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return _ANONYMOUS_MODEL

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
class AllStylesTextRequest(
    BaseAIHordeRequest,
):
    """Request to get text styles. Use `page` to paginate through the results.

    Represents a GET request to the /v2/styles/text endpoint.
    """

    sort: Literal["popular", "age"] = "popular"
    """The sort order of the styles."""

    page: int = 1
    """The page of styles to retrieve. Each page has 25 styles."""

    tag: str | None = None
    """If specified, return only styles with this tag."""

    model: str | None = None
    """If specified, return only styles which use this model."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_query_fields(cls) -> list[str]:
        return ["sort", "page", "tag", "model"]

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[AllStylesTextResponse]:
        return AllStylesTextResponse

sort class-attribute instance-attribute

sort: Literal['popular', 'age'] = 'popular'

The sort order of the styles.

page class-attribute instance-attribute

page: int = 1

The page of styles to retrieve. Each page has 25 styles.

tag class-attribute instance-attribute

tag: str | None = None

If specified, return only styles with this tag.

model class-attribute instance-attribute

model: str | None = None

If specified, return only styles which use this model.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_query_fields classmethod

get_query_fields() -> list[str]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_query_fields(cls) -> list[str]:
    return ["sort", "page", "tag", "model"]

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[AllStylesTextResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[AllStylesTextResponse]:
    return AllStylesTextResponse

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
class SingleStyleTextByIDRequest(
    BaseAIHordeRequest,
):
    """Request to get a single text style by its ID.

    Represents a GET request to the /v2/styles/text/{style_id} endpoint.
    """

    style_id: str
    """The ID of the style to retrieve."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleKobold]:
        return StyleKobold

style_id instance-attribute

style_id: str

The ID of the style to retrieve.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> type[StyleKobold]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleKobold]:
    return StyleKobold

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
class SingleStyleTextByNameRequest(
    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.
    """

    style_name: str
    """The name of the style to retrieve."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.GET

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_name

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[StyleKobold]:
        return StyleKobold

style_name instance-attribute

style_name: str

The name of the style to retrieve.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.GET

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_name

get_default_success_response_type classmethod

get_default_success_response_type() -> type[StyleKobold]
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[StyleKobold]:
    return StyleKobold

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
class ModifyStyleTextResponse(
    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`
    """

    id_: str = Field(alias="id")
    """The ID of the style."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "StyleModify"

id_ class-attribute instance-attribute

id_: str = Field(alias='id')

The ID of the style.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "StyleModify"

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
class CreateStyleTextRequest(
    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`
    """

    params: ModelStyleInputParamsKobold
    """The parameters to use for all generations using this style, if not set by the user."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStyleInputKobold"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.POST

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[ModifyStyleTextResponse]:
        return ModifyStyleTextResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

params instance-attribute

params: ModelStyleInputParamsKobold

The parameters to use for all generations using this style, if not set by the user.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStyleInputKobold"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.POST

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[ModifyStyleTextResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[ModifyStyleTextResponse]:
    return ModifyStyleTextResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True

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
class ModifyStyleTextRequest(
    BaseAIHordeRequest,
    _StyleMixin,
    APIKeyAllowedInRequestMixin,
):
    """Represents a PATCH request to the /v2/styles/text/{style_id} endpoint.

    v2 API Model: `ModelStylePatchKobold`
    """

    style_id: str
    """The ID of the style to modify."""

    params: ModelStyleInputParamsKobold
    """The parameters to use for all generations using this style, if not set by the user."""

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "ModelStylePatchKobold"

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.PATCH

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[ModifyStyleTextResponse]:
        return ModifyStyleTextResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

style_id instance-attribute

style_id: str

The ID of the style to modify.

params instance-attribute

params: ModelStyleInputParamsKobold

The parameters to use for all generations using this style, if not set by the user.

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "ModelStylePatchKobold"

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.PATCH

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[ModifyStyleTextResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[ModifyStyleTextResponse]:
    return ModifyStyleTextResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True

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
class DeleteStyleTextResponse(
    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`
    """

    @override
    @classmethod
    def get_api_model_name(cls) -> str:
        return "SimpleResponse"

get_api_model_name classmethod

get_api_model_name() -> str
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> str:
    return "SimpleResponse"

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.

Source code in horde_sdk/ai_horde_api/apimodels/styles.py
class DeleteStyleTextRequest(
    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.
    """

    style_id: str
    """The ID of the style to delete."""

    @override
    @classmethod
    def get_api_model_name(cls) -> None:
        return None

    @override
    @classmethod
    def get_http_method(cls) -> HTTPMethod:
        return HTTPMethod.DELETE

    @override
    @classmethod
    def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
        return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

    @override
    @classmethod
    def get_default_success_response_type(cls) -> type[DeleteStyleTextResponse]:
        return DeleteStyleTextResponse

    @override
    @classmethod
    def is_api_key_required(cls) -> bool:
        return True

style_id instance-attribute

style_id: str

The ID of the style to delete.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_model_name(cls) -> None:
    return None

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_http_method(cls) -> HTTPMethod:
    return HTTPMethod.DELETE

get_api_endpoint_subpath classmethod

get_api_endpoint_subpath() -> AI_HORDE_API_ENDPOINT_SUBPATH
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_styles_text_by_id

get_default_success_response_type classmethod

get_default_success_response_type() -> (
    type[DeleteStyleTextResponse]
)
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def get_default_success_response_type(cls) -> type[DeleteStyleTextResponse]:
    return DeleteStyleTextResponse

is_api_key_required classmethod

is_api_key_required() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/styles.py
@override
@classmethod
def is_api_key_required(cls) -> bool:
    return True