Skip to content

horde_sdk.ai_horde_api.apimodels.teams

TeamDetails

Bases: HordeResponseBaseModel, TeamDetailsLite

Details about a team, including the models and workers that are part of it.

Represents the data returned from the /v2/teams/{team_id} endpoint with http status code 200.

v2 API Model: TeamDetails

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
@Unhashable
@Unequatable
class TeamDetails(HordeResponseBaseModel, TeamDetailsLite):
    """Details about a team, including the models and workers that are part of it.

    Represents the data returned from the /v2/teams/{team_id} endpoint with http status code 200.

    v2 API Model: `TeamDetails`
    """

    info: str | None = Field(
        default=None,
        examples=[
            "Anarchy is emergent order.",
        ],
    )
    """Extra information or comments about this team provided by its owner."""
    creator: str | None = Field(
        default=None,
        examples=["db0#1"],
    )
    """The alias of the user which created this team."""
    kudos: float | None = Field(
        default=None,
    )
    """How many Kudos the workers in this team have been rewarded while part of this team."""
    models: list[ActiveModelLite] | None = None
    """The models that this team has run."""
    requests_fulfilled: int | None = Field(
        default=None,
    )
    """How many images this team's workers have generated."""
    uptime: int | None = Field(
        default=None,
    )
    """The total amount of time workers have stayed online while on this team."""
    worker_count: int | None = Field(
        default=None,
        examples=[10],
    )
    """How many workers have been dedicated to this team."""
    workers: list[WorkerDetailLite] | None = None
    """The workers that have been dedicated to this team."""

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

info class-attribute instance-attribute

info: str | None = Field(
    default=None, examples=["Anarchy is emergent order."]
)

Extra information or comments about this team provided by its owner.

creator class-attribute instance-attribute

creator: str | None = Field(
    default=None, examples=["db0#1"]
)

The alias of the user which created this team.

kudos class-attribute instance-attribute

kudos: float | None = Field(default=None)

How many Kudos the workers in this team have been rewarded while part of this team.

models class-attribute instance-attribute

models: list[ActiveModelLite] | None = None

The models that this team has run.

requests_fulfilled class-attribute instance-attribute

requests_fulfilled: int | None = Field(default=None)

How many images this team's workers have generated.

uptime class-attribute instance-attribute

uptime: int | None = Field(default=None)

The total amount of time workers have stayed online while on this team.

worker_count class-attribute instance-attribute

worker_count: int | None = Field(
    default=None, examples=[10]
)

How many workers have been dedicated to this team.

workers class-attribute instance-attribute

workers: list[WorkerDetailLite] | None = None

The workers that have been dedicated to this team.

get_api_model_name classmethod

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

AllTeamDetailsResponse

Bases: HordeResponseRootModel[list[TeamDetails]]

Details about all teams, including the models and workers that are part of them.

Represents the data returned from the /v2/teams endpoint with http status code 200.

v2 API Model: _ANONYMOUS_MODEL

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
@Unhashable
@Unequatable
class AllTeamDetailsResponse(HordeResponseRootModel[list[TeamDetails]]):
    """Details about all teams, including the models and workers that are part of them.

    Represents the data returned from the /v2/teams endpoint with http status code 200.

    v2 API Model: `_ANONYMOUS_MODEL`
    """

    root: list[TeamDetails]
    """The underlying list of teams."""

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

root instance-attribute

root: list[TeamDetails]

The underlying list of teams.

get_api_model_name classmethod

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

AllTeamDetailsRequest

Bases: BaseAIHordeRequest

Request to get details about all teams.

Represents a GET request to the /v2/teams endpoint.

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class AllTeamDetailsRequest(
    BaseAIHordeRequest,
):
    """Request to get details about all teams.

    Represents a GET request to the /v2/teams endpoint.
    """

    @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_teams_all

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

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/teams.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/teams.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/teams.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_teams_all

get_default_success_response_type classmethod

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

SingleTeamDetailsRequest

Bases: BaseAIHordeRequest

Request to get details about a single team by ID.

Represents a GET request to the /v2/teams/{team_id} endpoint.

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class SingleTeamDetailsRequest(
    BaseAIHordeRequest,
):
    """Request to get details about a single team by ID.

    Represents a GET request to the /v2/teams/{team_id} endpoint.
    """

    team_id: str
    """The ID of the team to get details for."""

    @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_teams_single

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

team_id instance-attribute

team_id: str

The ID of the team to get details for.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/teams.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/teams.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/teams.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_teams_single

get_default_success_response_type classmethod

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

ModifyTeam

Bases: HordeResponseBaseModel

Details about a team that has been modified.

Represents the data returned from the following endpoints and http status codes
  • /v2/teams/{team_id} | ModifyTeamRequest [PATCH] -> 200
  • /v2/teams | CreateTeamRequest [POST] -> 200

v2 API Model: ModifyTeam

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class ModifyTeam(HordeResponseBaseModel):
    """Details about a team that has been modified.

    Represents the data returned from the following endpoints and http status codes:
        - /v2/teams/{team_id} | ModifyTeamRequest [PATCH] -> 200
        - /v2/teams | CreateTeamRequest [POST] -> 200

    v2 API Model: `ModifyTeam`
    """

    id_: str = Field(alias="id")
    """The ID of the team."""
    name: str
    """The name of the team."""
    info: str | None = Field(
        default=None,
        examples=[
            "Anarchy is emergent order.",
        ],
    )
    """Extra information or comments about this team provided by its owner."""

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

id_ class-attribute instance-attribute

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

The ID of the team.

name instance-attribute

name: str

The name of the team.

info class-attribute instance-attribute

info: str | None = Field(
    default=None, examples=["Anarchy is emergent order."]
)

Extra information or comments about this team provided by its owner.

get_api_model_name classmethod

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

ModifyTeamInput

Bases: HordeAPIObjectBaseModel

Input data for modifying a team.

v2 API Model: ModifyTeamInput

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class ModifyTeamInput(HordeAPIObjectBaseModel):
    """Input data for modifying a team.

    v2 API Model: `ModifyTeamInput`
    """

    name: str
    """The name of the team."""

    info: str | None = Field(
        default=None,
        examples=[
            "Anarchy is emergent order.",
        ],
    )
    """Extra information or comments about this team provided by its owner."""

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

name instance-attribute

name: str

The name of the team.

info class-attribute instance-attribute

info: str | None = Field(
    default=None, examples=["Anarchy is emergent order."]
)

Extra information or comments about this team provided by its owner.

get_api_model_name classmethod

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

CreateTeamRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin, ModifyTeamInput

Request to create a new team.

Represents a POST request to the /v2/teams endpoint.

v2 API Model: CreateTeamInput

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class CreateTeamRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
    ModifyTeamInput,
):
    """Request to create a new team.

    Represents a POST request to the /v2/teams endpoint.

    v2 API Model: `CreateTeamInput`
    """

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

    @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_teams_all

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

get_api_model_name classmethod

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

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/teams.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/teams.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_teams_all

get_default_success_response_type classmethod

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

ModifyTeamRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin, ModifyTeamInput

Request to modify a team by ID.

Represents a PATCH request to the /v2/teams/{team_id} endpoint.

v2 API Model: ModifyTeamInput

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class ModifyTeamRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
    ModifyTeamInput,
):
    """Request to modify a team by ID.

    Represents a PATCH request to the /v2/teams/{team_id} endpoint.

    v2 API Model: `ModifyTeamInput`
    """

    team_id: str
    """The ID of the team to modify."""

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

    @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_teams_single

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

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

team_id instance-attribute

team_id: str

The ID of the team to modify.

get_api_model_name classmethod

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

get_http_method classmethod

get_http_method() -> HTTPMethod
Source code in horde_sdk/ai_horde_api/apimodels/teams.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/teams.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_teams_single

get_default_success_response_type classmethod

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

is_api_key_required classmethod

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

DeleteTeamResponse

Bases: HordeResponseBaseModel

The team id and name that was just deleted.

Represents the data returned from the /v2/teams/{team_id} endpoint with http status code 200.

v2 API Model: DeletedTeam

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class DeleteTeamResponse(HordeResponseBaseModel):
    """The team id and name that was just deleted.

    Represents the data returned from the /v2/teams/{team_id} endpoint with http status code 200.

    v2 API Model: `DeletedTeam`
    """

    deleted_id: str
    """The ID of the team that was deleted."""
    deleted_name: str
    """The name of the team that was deleted."""

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

deleted_id instance-attribute

deleted_id: str

The ID of the team that was deleted.

deleted_name instance-attribute

deleted_name: str

The name of the team that was deleted.

get_api_model_name classmethod

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

DeleteTeamRequest

Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin

Request to delete a team by ID.

Represents a DELETE request to the /v2/teams/{team_id} endpoint.

Source code in horde_sdk/ai_horde_api/apimodels/teams.py
class DeleteTeamRequest(
    BaseAIHordeRequest,
    APIKeyAllowedInRequestMixin,
):
    """Request to delete a team by ID.

    Represents a DELETE request to the /v2/teams/{team_id} endpoint.
    """

    team_id: str
    """The ID of the team 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_teams_single

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

team_id instance-attribute

team_id: str

The ID of the team to delete.

get_api_model_name classmethod

get_api_model_name() -> None
Source code in horde_sdk/ai_horde_api/apimodels/teams.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/teams.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/teams.py
@override
@classmethod
def get_api_endpoint_subpath(cls) -> AI_HORDE_API_ENDPOINT_SUBPATH:
    return AI_HORDE_API_ENDPOINT_SUBPATH.v2_teams_single

get_default_success_response_type classmethod

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