# withApiKey

- Module: [Aspire.Hosting.GitHub.Models](/reference/api/typescript/aspire.hosting.github.models.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Configures the API key for the GitHub Model resource from a parameter.

## Definition

```typescript
interface GitHubModelResource {
  // ... omitted for brevity
  withApiKey(apiKey: ParameterResource): GitHubModelResource
}
```

## Parameters

- `apiKey` (`ParameterResource`)

## Returns

[GitHubModelResource](/reference/api/typescript/aspire.hosting.github.models/githubmodelresource.md) `builder`

## Applies to

- [GitHubModelResource](/reference/api/typescript/aspire.hosting.github.models/githubmodelresource.md)
