> ## 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.

# Create WebRTC Connection

> Create a new WebRTC connection for a product.

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

## Returns

Returns a [WebRTC Connection](https://docs.galtea.ai/v5.14/concepts/product/webrtc-connection.md) object for the given parameters, or `None` if an error occurs. When the platform stores it but cannot return it, `create` raises [`WrittenResourceUnreadableException`](https://docs.galtea.ai/v5.14/sdk/api/galtea#errors) instead: do not create it again.

## Example

```python theme={"system"}
web_rtc_connection = galtea.web_rtc_connections.create(
    product_id=product_id,
    name="production-voice-agent-" + run_identifier,
    api_key="YOUR_PIPECAT_CLOUD_API_KEY",
    agent_name="my-pipecat-agent",
    agent_speaks_first=False,
)
```

## Parameters

**product\_id** `string` *required*

ID of the product this connection belongs to.

**name** `string` *required*

Name of the WebRTC connection. Must be unique per product.

**api\_key** `string` *required*

The Pipecat Cloud **public API key** (`pk_...`) Galtea uses to reach your agent, the credential its runtime `/start` call needs. This is **not** the `pcc_pat_` Personal Access Token used to deploy the agent. This is a secret. Galtea stores it encrypted and the API never returns it. A fetched connection exposes only a `has_api_key` boolean, never the key itself.

**agent\_name** `string` *required*

The name of your deployed Pipecat Cloud agent (for example, the `agent_name` you deployed with). It must match that agent's name exactly. Galtea passes it to Pipecat Cloud's `/start` call to launch the session; if no deployed agent has this name, the call fails.

**agent\_speaks\_first** `boolean`

Whether the voice agent opens the conversation once the session connects. Defaults to `False` (the simulated caller speaks first). Pass `True` for interviewer-style agents that greet the caller first.

> [!NOTE]
>
> The simulated caller's spoken language is taken from each test case's language, not the WebRTC connection, so one connection can serve test cases in different languages. See [WebRTC Connection](https://docs.galtea.ai/v5.14/concepts/product/webrtc-connection.md#how-the-callers-language-is-chosen).


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