# Aspire.Hosting.OpenAI

- Module: `Aspire.Hosting.OpenAI`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `5`
- Types: `2`

## Handles

- [OpenAIModelResource](/reference/api/go/aspire.hosting.openai/openaimodelresource.md) -- `handle` - 1 members
- [OpenAIResource](/reference/api/go/aspire.hosting.openai/openairesource.md) -- `handle` - 3 members

## Functions

- [AddOpenAI](/reference/api/go/aspire.hosting.openai/addopenai.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an OpenAI parent resource that can host multiple models.
- [WithHealthCheck](/reference/api/go/aspire.hosting.openai/withhealthcheck.md) -- `method` - on `OpenAIModelResource` -- Adds a health check to the OpenAI Model resource.
- [AddModel](/reference/api/go/aspire.hosting.openai/addmodel.md) -- `method` - on `OpenAIResource` -- Adds an OpenAI Model child to the provided OpenAI resource.
- [WithApiKey](/reference/api/go/aspire.hosting.openai/withapikey.md) -- `method` - on `OpenAIResource` -- Configures the API key for the OpenAI parent resource from a parameter.
- [WithEndpoint](/reference/api/go/aspire.hosting.openai/withendpoint.md) -- `method` - on `OpenAIResource` -- Sets a custom OpenAI-compatible service endpoint URI on the parent resource.
