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

# Endpoint Connection Service

> Endpoint Connection Service API methods in the Galtea SDK

> [!WARNING]
>
> You are reading the docs of Galtea 5.17. [Read this page in the latest version](https://docs.galtea.ai/sdk/api/endpoint-connection/service.md).

The Endpoint Connection Service in the Galtea SDK allows you to manage [endpoint connections](https://docs.galtea.ai/v5.17/concepts/product/endpoint-connection.md) for your products.
This Service is exposed by the `galtea.endpoint_connections` object.

> [!NOTE]
>
> Remember that we will be using the `galtea` object. More information [here](https://docs.galtea.ai/v5.17/sdk/api/galtea.md).

## Quick Example

First, initialize the Galtea SDK:

```python theme={"system"}
galtea = Galtea(api_key="YOUR_API_KEY")
```

Create an endpoint connection:

```python theme={"system"}
endpoint_connection = galtea.endpoint_connections.create(
    name="production-chat-api-" + run_identifier,
    product_id=product_id,
    url="https://api.example.com/v1/chat",
    type=EndpointConnectionType.CONVERSATION,
    http_method="POST",
    auth_type="BEARER",
    auth_token="YOUR_AUTH_TOKEN",
    input_template='{"message": "{{ input.user_message }}"}',
    output_mapping={"output": "$.response"},
    timeout=30,
)
```

List endpoint connections for a product:

```python theme={"system"}
endpoint_connections = galtea.endpoint_connections.list(
    product_ids=[product_id],
    sort_by_created_at="desc",
    limit=10,
)
```

Get an endpoint connection by ID:

```python theme={"system"}
endpoint_connection = galtea.endpoint_connections.get(endpoint_connection_id=endpoint_connection_id)
```

## Service Methods

* [Create Endpoint Connection](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/create.md)
* [List Endpoint Connections](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/list.md)
* [Get Endpoint Connection](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/get.md)
* [Get Endpoint Connection By Name](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/get-by-name.md)
* [Update Endpoint Connection](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/update.md)
* [Delete Endpoint Connection](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/delete.md)
* [Test Connection](https://docs.galtea.ai/v5.17/sdk/api/endpoint-connection/test-connection.md)

## Related

> [card] [Endpoint Connection](https://docs.galtea.ai/v5.17/concepts/product/endpoint-connection.md)
>
> A reusable connection to an external endpoint for AI product evaluation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.