> For the complete documentation index, see [llms.txt](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://black-horizon-studios.gitbook.io/emerald-ai-wiki/api/available-api/health-api.md).

# Health API

## Instantly Refill AI Health

Instantly heals this AI back to full health.

{% code fullWidth="false" %}

```csharp
EmeraldAPI.Health.InstantlyRefillAIHealth(EmeraldSystem EmeraldComponent)
```

{% endcode %}

{% code fullWidth="false" %}

```csharp
//Example - It is recomended that EmeraldComponent is cached somewhere
EmeraldSystem EmeraldComponent = GetComponent<EmeraldSystem>();
EmeraldAPI.Health.InstantlyRefillAIHealth(EmeraldComponent);
```

{% endcode %}

## Update Health

Updates the AI's Current and Max Health.

{% code fullWidth="false" %}

```csharp
EmeraldAPI.Health.UpdateHealth(EmeraldSystem EmeraldComponent, int MaxHealth, int CurrentHealth)
```

{% endcode %}

{% code fullWidth="false" %}

```csharp
//Example - It is recomended that EmeraldComponent is cached somewhere
EmeraldSystem EmeraldComponent = GetComponent<EmeraldSystem>();
EmeraldAPI.Health.UpdateHealth(EmeraldComponent, 100, 100);
```

{% endcode %}
