horde_sdk.ai_horde_api.apimodels.collections¶
ResponseModelStylesShort ¶
Bases: HordeAPIObjectBaseModel
The name and ID of a style.
v2 API Model: ResponseModelStylesShort
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
ResponseModelCollection ¶
Bases: HordeResponseBaseModel
A collection of styles.
Represents the data returned from the following endpoints and http status codes
- /v2/collection_by_name/{collection_name} | CollectionByNameRequest [GET] -> 200
- /v2/collections/{collection_id} | CollectionByIDRequest [GET] -> 200
v2 API Model: ResponseModelCollection
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
id
instance-attribute
¶
The UUID of the collection. Use this to use this collection of retrieve its information in the future.
name
class-attribute
instance-attribute
¶
The name for the collection. Case-sensitive and unique per user.
type
class-attribute
instance-attribute
¶
The kind of styles stored in this collection.
info
class-attribute
instance-attribute
¶
Extra information about this collection.
public
class-attribute
instance-attribute
¶
When true this collection will be listed among all collection publicly.When false, information about this collection can only be seen by people who know its ID or name.
styles
class-attribute
instance-attribute
¶
The styles contained in this collection.
use_count
class-attribute
instance-attribute
¶
The number of times this collection has been used.
AllCollectionsResponse ¶
Bases: HordeResponseRootModel[list[ResponseModelCollection]]
A list of collections.
Represents the data returned from the /v2/collections endpoint with http status code 200.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
AllCollectionsRequest ¶
Bases: BaseAIHordeRequest
Request to get all collections, optionally filtered by type and sorted by popularity or age.
Data is paginated. Each page has 25 collections. Set page to get the next page.
Represents a GET request to the /v2/collections endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
sort
class-attribute
instance-attribute
¶
sort: Literal["popular", "age"] = Field(
default="popular",
description="The sort order for the collections.",
)
page
class-attribute
instance-attribute
¶
page: int = Field(
default=1,
description="The page number for the collections. Each page has 25 styles.",
)
type_
class-attribute
instance-attribute
¶
type_: Literal["image", "text", "all"] = Field(
alias="type",
default="all",
description="The type of collections to retrieve.",
)
get_api_model_name
classmethod
¶
get_http_method
classmethod
¶
get_query_fields
classmethod
¶
get_api_endpoint_subpath
classmethod
¶
get_default_success_response_type
classmethod
¶
CollectionByIDRequest ¶
Bases: BaseAIHordeRequest
Request to get a collection by its ID.
Represents a GET request to the /v2/collections/{collection_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
CollectionByNameRequest ¶
Bases: BaseAIHordeRequest
Request to get a collection by its name.
Represents a GET request to the /v2/collection_by_name/{collection_name} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
CreateCollectionResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin, ContainsWarningsResponseMixin
Indicates that a collection was created and provides its ID and any warnings.
Represents the data returned from the /v2/collections endpoint with http status code 200.
v2 API Model: StyleModify
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
id_
class-attribute
instance-attribute
¶
CreateCollectionRequest ¶
Bases: _InputModelCollectionMixin, BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to create a collection.
Represents a POST request to the /v2/collections endpoint.
v2 API Model: InputModelCollection
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
DeleteCollectionResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin
Returns an "OK" message when a collection is successfully deleted with http status code 200.
Represents the data returned from the /v2/collections/{collection_id} endpoint with http status code 200.
v2 API Model: SimpleResponse
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
DeleteCollectionRequest ¶
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to delete a collection by its ID.
Represents a DELETE request to the /v2/collections/{collection_id} endpoint.
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
UpdateCollectionResponse ¶
Bases: HordeResponseBaseModel, ContainsMessageResponseMixin, ContainsWarningsResponseMixin
Returns an "OK" message when a collection is successfully updated with http status code 200.
Note: If issues are detected, they will be returned in the warnings field.
Represents the data returned from the /v2/collections/{collection_id} endpoint with http status code 200.
v2 API Model: StyleModify
Source code in horde_sdk/ai_horde_api/apimodels/collections.py
id_
class-attribute
instance-attribute
¶
The ID of the collection that was updated.
UpdateCollectionRequest ¶
Bases: _InputModelCollectionMixin, BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to update a collection by its ID.
Note: Always check the warnings field on response for any issues that may have occurred during the update.
Represents a PATCH request to the /v2/collections/{collection_id} endpoint.
v2 API Model: InputModelCollection