> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# integration

## Integration

Factory interface for managing Galileo integrations.

Integration is the main entry point for working with LLM providers and other
external services in the Galileo platform. It provides factory methods to create
new integrations and list existing ones.

The Integration class returns Provider objects, which are immutable proxies to
integrations stored in the Galileo API. Provider classes should not be imported
or instantiated directly - always use the Integration class methods.

**Examples**

```python theme={null}
# List all available integration types (including unconnected)
available_types = Integration.list(all=True)
# Returns: ['anthropic', 'aws_bedrock', 'azure', 'openai', ...]

# Create a new OpenAI integration
openai = Integration.create_openai(
    token="sk-proj-...",
    organization_id="org-..."
)
print(f"Created: {openai.id}")

# Create an Azure integration
azure = Integration.create_azure(
    token="your-key",
    endpoint="https://your-resource.openai.azure.com"
)

# List all connected integrations (returns provider proxy objects)
providers = Integration.list()
for provider in providers:
    print(f"{provider.name}: {provider.id}")
    print(f"Created by: {provider.created_by}")
    print(f"Selected: {provider.is_selected}")

# Update provider credentials
openai.update(
    token="new-sk-proj-...",
    organization_id="new-org-..."
)

# Refresh provider state from API
openai.refresh()

# Get available models (placeholder - not yet implemented)
# models = openai.models

# Delete a provider
openai.delete()

# Create other providers
bedrock = Integration.create_bedrock(
    aws_access_key_id="AKIA...",
    aws_secret_access_key="...",
    region="us-west-2"
)

anthropic = Integration.create_anthropic(token="sk-ant-...")
```

### anthropic

```python theme={null}
def anthropic(cls) -> Provider | UnconfiguredProvider
```

Get the configured Anthropic (Claude) integration.

**Examples**

```python theme={null}
anthropic = Integration.anthropic
if anthropic:
    print(f"Anthropic integration: {anthropic.id}")
```

### azure

```python theme={null}
def azure(cls) -> Provider | UnconfiguredProvider
```

Get the configured Azure OpenAI integration.

**Examples**

```python theme={null}
azure = Integration.azure
if azure:
    print(f"Azure integration: {azure.id}")
```

### bedrock

```python theme={null}
def bedrock(cls) -> Provider | UnconfiguredProvider
```

Get the configured AWS Bedrock integration.

**Examples**

```python theme={null}
bedrock = Integration.bedrock
if bedrock:
    print(f"Bedrock integration: {bedrock.id}")
```

### create\_anthropic

```python theme={null}
def create_anthropic(cls, *, token: str) -> AnthropicProvider
```

Create a new Anthropic (Claude) integration.

**Arguments**

* `token` (`str`): Anthropic API token.

### create\_azure

```python theme={null}
def create_azure(cls, *, token: str, endpoint: str) -> AzureProvider
```

Create a new Azure OpenAI integration.

**Arguments**

* `token` (`str`): Azure API key.
* `endpoint` (`str`): Azure OpenAI endpoint URL.

### create\_bedrock

```python theme={null}
def create_bedrock(cls,
                   *,
                   aws_access_key_id: str,
                   aws_secret_access_key: str,
                   region: str='us-east-1',
                   credential_type: str='key_secret') -> BedrockProvider
```

Create a new AWS Bedrock integration.

**Arguments**

* `aws_access_key_id` (`str`): AWS access key ID.
* `aws_secret_access_key` (`str`): AWS secret access key.
* `region` (`str`): AWS region. Defaults to "us-east-1".
* `credential_type` (`str`): Type of credentials. Defaults to "key\_secret".

### create\_openai

```python theme={null}
def create_openai(cls,
                  *,
                  token: str,
                  organization_id: str | None=None) -> OpenAIProvider
```

Create a new OpenAI integration.

**Arguments**

* `token` (`str`): OpenAI API token.
* `organization_id` (`str | None`): Optional organization ID.

### list

```python theme={null}
def list(cls, *, all: bool=False) -> list[Provider] | list[str]
```

List integrations.

**Arguments**

* `all` (`bool`): If True, returns all available integration types (including
  unconnected ones) as a list of strings. If False, returns
  only the configured integrations as Provider objects.
  Defaults to False.

### mistral

```python theme={null}
def mistral(cls) -> Provider | UnconfiguredProvider
```

Get the configured Mistral AI integration.

**Examples**

```python theme={null}
mistral = Integration.mistral
if mistral:
    print(f"Mistral integration: {mistral.id}")
```

### openai

```python theme={null}
def openai(cls) -> Provider | UnconfiguredProvider
```

Get the configured OpenAI integration.

**Examples**

```python theme={null}
openai = Integration.openai
if openai:
    print(f"OpenAI integration: {openai.id}")
```

### refresh

```python theme={null}
def refresh(self) -> None
```

Refresh the integration state from the remote API.

Note: Currently, the API does not support fetching individual integrations
by ID. This method will re-fetch all integrations and find the matching one.

## Raises

APIError: If the API call fails or the integration is not found.

### vertex\_ai

```python theme={null}
def vertex_ai(cls) -> Provider | UnconfiguredProvider
```

Get the configured Google Vertex AI integration.

**Examples**

```python theme={null}
vertex = Integration.vertex_ai
if vertex:
    print(f"Vertex AI integration: {vertex.id}")
```
