API Reference
ApocBuff
Bases: APIModel
Represents the fixed global buff in Apocalyptic Shadow.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of the buff. |
desc |
str
|
Description of the effect. |
ApocDetail
Bases: EndgameBaseModel
, ApocBase
Apocalyptic Shadow event details.
Attributes:
Name | Type | Description |
---|---|---|
buff |
ApocBuff
|
The static global buff applied in all stages. |
buff_list_1 |
list[EndgameBuffOptions]
|
Selectable buffs for first half. |
buff_list_2 |
list[EndgameBuffOptions]
|
Selectable buffs for second half. |
Character
Bases: APIModel
Represent an HSR character.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the character. |
icon |
str
|
The icon URL of the character. |
rarity |
Literal[4, 5]
|
The rarity of the character. |
description |
str
|
The description of the character. |
path |
HSRPath
|
The path of the character. |
element |
HSRElement
|
The element of the character. |
names |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
A dictionary of names in different languages. |
name |
str
|
The name of the character. |
CharacterDetail
Bases: APIModel
Represent an HSR character detail.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the character. |
name |
str
|
The name of the character. |
description |
str
|
The description of the character. |
rarity |
Literal[4, 5]
|
The rarity of the character. |
eidolons |
dict[str, Eidolon]
|
A dictionary of eidolons for the character. |
skills |
dict[str, Skill]
|
A dictionary of skills for the character. |
ascension_stats |
dict[str, dict[str, Any]]
|
A dictionary of ascension stats for the character. |
gacha_art
property
Get the character's gacha art URL.
icon
property
Get the character's icon URL.
ChildMonster
Bases: APIModel
Represent the specific details of a monster type.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of this instance of the monster. |
attack_modify_ratio |
float
|
Multiplier applied to the monster's base attack. |
defence_modify_ratio |
float
|
Multiplier applied to the monster's base defense. |
hp_modify_ratio |
float
|
Multiplier applied to the monster's base HP. |
spd_modify_ratio |
float
|
Multiplier applied to the monster's base speed. |
spd_modify_value |
float | None
|
An optional fixed value added to the monster's speed (can override base speed). |
stance_modify_value |
float
|
Multiplier applied to the monster's base toughness. |
stance_weak_list |
list[HSRElement]
|
List of elemental types that this monster is weak to (for toughness damage). |
damage_type_resistances |
list[DamageTypeResistance]
|
List of resistances the monster has against specific elements. |
skills |
list[HSREnemySkill]
|
List of skills this monster instance can use in combat. |
DamageTypeResistance
Bases: APIModel
Represent the damage resistance of an enemy in HSR.
Attributes:
Name | Type | Description |
---|---|---|
element |
HSRElement
|
The element of the resistance. |
value |
float
|
The value of the resistance. |
Eidolon
Bases: APIModel
Represent a character's eidolon.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the eidolon. |
name |
str
|
The name of the eidolon. |
description |
str
|
The description of the eidolon. |
parameters |
list[float]
|
A list of parameters for the eidolon. |
image
property
Get the eidolon's image URL.
EliteGroup
Bases: APIModel
Represent an EliteGroup in HSR.
All enemies in HSR follow the following formula for ATK, DEF, HP, and SPD: Base x BaseModifyRatio x EliteGroup Ratio x HardLevelGroup(Level) Ratio x (1 + HPMultiplier)
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the group. |
attack_ratio |
float
|
The ratio to multiply to get final attack. |
defence_ratio |
float
|
The ratio to multiply to get final defence. |
hp_ratio |
float
|
The ratio to multiply to get final HP. |
spd_ratio |
float
|
The ratio to multiply to get final speed. |
EndgameBaseModel
Bases: APIModel
Abstract base class for all HSR endgame modes.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
Unique ID of the endgame event. |
name |
str
|
Display name of the event. |
begin_time |
str
|
Event start timestamp. |
end_time |
str
|
Event end timestamp. |
stages |
list[EndgameStage]
|
List of stages in this endgame mode. |
EndgameBuffOptions
Bases: APIModel
Represents a selectable buff modifier in endgame.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name of the buff. |
desc |
str
|
Description of the buff effect. |
params |
list[float]
|
List of parameters applied by the buff. |
EndgameHalf
Bases: APIModel
Represents one half of an endgame stage (first or second).
Attributes:
Name | Type | Description |
---|---|---|
hlg_id |
int
|
ID of the HardLevelGroup used to determine difficulty scaling. |
hlg_level |
int
|
Level of the HardLevelGroup (affects enemy stats). |
eg_id |
int
|
ID of the EliteGroup (affects enemy traits). |
waves |
list[EndgameWave]
|
List of enemy waves in this half. |
EndgameStage
Bases: APIModel
Represents a stage in an endgame mode.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
Unique ID of the stage. |
name |
str
|
Stage name. |
first_half_weaknesses |
list[HSRElement]
|
Elements that enemies in the first half are weak to. |
second_half_weaknesses |
list[HSRElement]
|
Elements that enemies in the second half are weak to. |
first_half |
EndgameHalf
|
The first half of the stage. |
second_half |
EndgameHalf | None
|
The second half of the stage. |
EndgameSummary
Bases: APIModel
Summary metadata for an HSR endgame event.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
ID of the endgame. |
type |
HSREndgameType
|
The type/category of the endgame. |
names |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
Dictionary containing localized names in English (en), Chinese (cn), Korean (kr), and Japanese (jp). |
name |
str
|
The selected name to display (populated during post-processing). |
begin |
str
|
Event start timestamp. |
end |
str
|
Event end timestamp. |
EndgameWave
Bases: APIModel
Represents a wave of enemies in an endgame half.
Attributes:
Name | Type | Description |
---|---|---|
enemies |
list[int]
|
A list of enemy IDs. |
hp_multiplier |
float
|
Multiplier applied to enemy HP in this wave. |
__extract_monster_ids(values)
classmethod
If this model is being parsed from a raw dictionary with Monster1, Monster2... keys, extract them into the 'enemies' list. Otherwise, assume enemies is already provided.
FullApocDetail
Bases: FullEndgameBaseModel
, ApocBase
Apocalyptic Shadow event details with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
buff |
ApocBuff
|
The static global buff applied in all stages. |
buff_list_1 |
list[EndgameBuffOptions]
|
Selectable buffs for first half. |
buff_list_2 |
list[EndgameBuffOptions]
|
Selectable buffs for second half. |
FullEndgameBaseModel
Bases: EndgameBaseModel
Endgame base model with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
Unique ID of the endgame event. |
name |
str
|
Display name of the event. |
begin_time |
str
|
Event start timestamp. |
end_time |
str
|
Event end timestamp. |
stages |
list[FullEndgameStage]
|
List of stages in this endgame mode with processed enemies. |
FullEndgameHalf
Bases: EndgameHalf
Represents one half of an endgame stage (first or second) with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
hlg_id |
int
|
ID of the HardLevelGroup used to determine difficulty scaling. |
hlg_level |
int
|
Level of the HardLevelGroup (affects enemy stats). |
eg_id |
int
|
ID of the EliteGroup (affects enemy traits). |
waves |
list[FullEndgameWave]
|
List of enemy waves in this half with processed enemies. |
FullEndgameStage
Bases: EndgameStage
Represents a stage in an endgame mode with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
first_half |
FullEndgameHalf
|
The first half of the stage with processed enemies. |
second_half |
FullEndgameHalf | None
|
The second half of the stage with processed enemies. |
FullEndgameWave
Bases: EndgameWave
Represents a wave of processed enemies in an endgame half.
Attributes:
Name | Type | Description |
---|---|---|
enemies |
list[ProcessedEnemy]
|
A list of processed enemy instances. |
hp_multiplier |
float
|
Multiplier applied to enemy HP in this wave. |
FullMOCDetail
Bases: FullEndgameBaseModel
, MOCBase
Memory of Chaos event details with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
memory_turbulence |
str
|
Global modifier for the current MoC rotation. |
FullPFDetail
Bases: FullEndgameBaseModel
, PFBase
Pure Fiction event details with processed enemies.
Attributes:
Name | Type | Description |
---|---|---|
buff_options |
list[EndgameBuffOptions]
|
First tier of optional buffs. |
buff_suboptions |
list[EndgameBuffOptions]
|
Second tier of optional buffs. |
HSREnemySkill
Bases: APIModel
Represents an enemy skill's information.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The id of the skill. |
name |
str
|
The name of the skill |
desc |
str
|
The description of what the skill does |
damage_type |
HSRElement | None
|
The type of damage the skill does (out of the HSRElements or None) |
HardLevelGroup
Bases: APIModel
Represent a HardLevelGroup in HSR.
All enemies in HSR follow the following formula for ATK, DEF, HP, and SPD: Base x BaseModifyRatio x EliteGroup Ratio x HardLevelGroup(Level) Ratio x (1 + HPMultiplier)
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the group. |
level |
int
|
The level of the enemy. |
attack_ratio |
float
|
The ratio to multiply to get final attack. |
defence_ratio |
float
|
The ratio to multiply to get final defence. |
hp_ratio |
float
|
The ratio to multiply to get final HP. |
spd_ratio |
float
|
The ratio to multiply to get final speed. |
LightCone
Bases: APIModel
Represent an HSR light cone.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the light cone. |
rarity |
Literal[3, 4, 5]
|
The rarity of the light cone. |
description |
str
|
The description of the light cone. |
path |
HSRPath
|
The path of the light cone. |
names |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
A dictionary of names in different languages. |
name |
str
|
The name of the light cone. |
icon
property
Get the light cone's icon URL.
LightConeDetail
Bases: APIModel
Represent an HSR light cone detail.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the light cone. |
name |
str
|
The name of the light cone. |
description |
str
|
The description of the light cone. |
path |
HSRPath
|
The path of the light cone. |
rarity |
Literal[3, 4, 5]
|
The rarity of the light cone. |
superimpose_info |
SuperimposeInfo
|
Superimpose information for the light cone. |
ascension_stats |
list[dict[str, Any]]
|
A list of ascension stats for the light cone. |
icon
property
Get the light cone's icon URL.
image
property
Get the light cone's image URL.
MOCDetail
Bases: EndgameBaseModel
, MOCBase
Memory of Chaos event details.
Attributes:
Name | Type | Description |
---|---|---|
memory_turbulence |
str
|
Global modifier for the current MoC rotation. |
Monster
Bases: APIModel
Represent an enemy monster in HSR.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the monster. |
icon |
str
|
The icon URL of the monster. |
children |
list[int]
|
A list of child monster IDs associated with this monster. |
weaknesses |
list[HSRElement]
|
List of elements that this monster is weak to (used for breaking toughness). |
names |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
A dictionary of names in different languages. |
description |
str
|
The English description of the monster. |
name |
str
|
The English name of the monster. |
MonsterDetail
Bases: APIModel
Represent an enemy monster with details in HSR.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
Unique identifier for the monster. |
name |
str
|
Name of the monster. |
description |
str
|
The description of the monster. |
attack_base |
float
|
The base attack stat for this monster. |
defence_base |
float
|
The base defense stat. |
hp_base |
float
|
The base HP value. |
spd_base |
float
|
The base speed stat. |
stance_base |
float
|
The base toughness value. |
status_resistance_base |
float
|
The base status resistance (used for debuff resist chance). |
monster_types |
list[ChildMonster]
|
A list of |
icon
property
Get the monster's icon URL.
New
Bases: APIModel
Represent new Honkai Star Rail data.
Attributes:
Name | Type | Description |
---|---|---|
character_ids |
list[int]
|
A list of character IDs. |
light_cone_ids |
list[int]
|
A list of light cone IDs. |
relic_set_ids |
list[int]
|
A list of relic set IDs. |
monster_ids |
list[int]
|
A list of monster IDs. |
item_ids |
list[int]
|
A list of item IDs. |
version |
str
|
The current version. |
PFDetail
Bases: EndgameBaseModel
, PFBase
Pure Fiction event details.
Attributes:
Name | Type | Description |
---|---|---|
buff_options |
list[EndgameBuffOptions]
|
First tier of optional buffs. |
buff_suboptions |
list[EndgameBuffOptions]
|
Second tier of optional buffs. |
ProcessedEnemy
Bases: APIModel
Represents a processed enemy instance in a HSR endgame stage.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The unique monster ID. |
name |
str
|
The name of the enemy. |
weaknesses |
list[HSRElement]
|
A list of elements this enemy is weak to. |
level |
int
|
The level of the enemy. |
base_hp |
int
|
The calculated HP of the enemy after all multipliers. |
speed |
int | None
|
The calculated speed value. |
toughness |
int | None
|
The calculated toughness value. |
effect_res |
float | None
|
Total status effect resistance value. |
Relic
Bases: APIModel
Represent an HSR relic.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the relic. |
name |
str
|
The name of the relic. |
description |
str
|
The description of the relic. |
story |
str
|
The story of the relic. |
icon
property
Get the relic's icon URL.
RelicSet
Bases: APIModel
Represent an HSR relic set.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The ID of the relic set. |
icon |
str
|
The icon URL of the relic set. |
names |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
A dictionary of names in different languages. |
name |
str
|
The name of the relic set. |
set_effect |
RelicSetEffects
|
The set effects of the relic set. |
RelicSetDetail
Bases: APIModel
Represent an HSR relic set detail.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the relic set. |
icon |
str
|
The icon URL of the relic set. |
parts |
dict[str, Relic]
|
A dictionary of relic parts. |
set_effects |
SetDetailSetEffects
|
The set effects of the relic set. |
RelicSetEffect
Bases: APIModel
Represent a relic set effect.
Attributes:
Name | Type | Description |
---|---|---|
descriptions |
dict[Literal['en', 'cn', 'kr', 'jp'], str]
|
A dictionary of descriptions in different languages. |
description |
str
|
The description of the relic set effect. |
parameters |
list[float]
|
A list of parameters for the relic set effect. |
RelicSetEffects
Bases: APIModel
Represent a relic set's set effects.
Attributes:
Name | Type | Description |
---|---|---|
two_piece |
RelicSetEffect
|
The two-piece set effect. |
four_piece |
RelicSetEffect | None
|
The four-piece set effect, if available. |
SetDetailSetEffect
Bases: APIModel
Represent a relic set detail's set effect.
Attributes:
Name | Type | Description |
---|---|---|
description |
str
|
The description of the set effect. |
parameters |
list[float]
|
A list of parameters for the set effect. |
SetDetailSetEffects
Bases: APIModel
Represent relic set detail's set effects.
Attributes:
Name | Type | Description |
---|---|---|
two_piece |
SetDetailSetEffect
|
The two-piece set effect. |
four_piece |
SetDetailSetEffect | None
|
The four-piece set effect, if available. |
Skill
Bases: APIModel
Represent a character's skill.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the skill. |
description |
str | None
|
The description of the skill, if available. |
type |
str | None
|
The type of the skill, if available. |
tag |
str
|
The tag of the skill. |
energy_generation |
int | None
|
The energy generation of the skill, if available. |
level_info |
dict[str, SkillLevelInfo]
|
A dictionary of skill level information. |
max_level
property
Get the skill's maximum level.
SkillLevelInfo
Bases: APIModel
Represent a skill's level information.
Attributes:
Name | Type | Description |
---|---|---|
level |
int
|
The level of the skill. |
parameters |
list[float]
|
A list of parameters for the skill level. |
SuperimposeInfo
Bases: APIModel
Represent a light cone's superimpose information.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the superimpose information. |
description |
str
|
The description of the superimpose information. |
parameters |
dict[str, list[float]]
|
A dictionary of parameters for the superimpose information. |