# GitHubModelResource Properties

- Package: [Aspire.Hosting.GitHub.Models](/reference/api/csharp/aspire.hosting.github.models.md)
- Type: [GitHubModelResource](/reference/api/csharp/aspire.hosting.github.models/githubmodelresource.md)
- Kind: `Properties`
- Members: `5`

Represents a GitHub Model resource.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs#L77)

Gets the connection string expression for the GitHub Models resource.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## Key

- Name: `Key`
- Modifiers: `get`
- Returns: `ParameterResource`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs)

Gets or sets the API key (PAT or GitHub App minted token) for accessing GitHub Models.

```csharp
public ParameterResource Key { get; }
```

## Remarks

The token must have the

```csharp
models: read
```

permission if using a fine-grained PAT or GitHub App minted token.

## Model

- Name: `Model`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs)

Gets or sets the model name, e.g., "openai/gpt-4o-mini".

```csharp
public string Model { get; set; }
```

## Organization

- Name: `Organization`
- Modifiers: `nullable` `get; set`
- Returns: `ParameterResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs)

Gets or sets the organization login associated with the organization to which the request is to be attributed.

```csharp
public ParameterResource? Organization { get; set; }
```

## Remarks

If set, the token must be attributed to an organization.

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs#L85)

Gets the endpoint URI expression for the GitHub Models resource.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format matches the configured endpoint, for example `https://models.github.ai/inference` or `https://models.github.ai/orgs/{organization}/inference` when an organization is specified.
