# Function: createTRPCProxyClient()

> 

> **createTRPCProxyClient**\<`TRouter`\>(`opts`): [`TRPCClient`](https://trpc.io/docs/typedoc/client/index/type-aliases/TRPCClient.md)\<`TRouter`\>

Defined in: [packages/client/src/createTRPCClient.ts:208](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/client/src/createTRPCClient.ts#L208)

Creates a typed client for a router. Pass the router's type, and the
links that send its calls.

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* `AnyRouter` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `opts` | `CreateTRPCClientOptions`\<`TRouter`\> |

## Returns

[`TRPCClient`](https://trpc.io/docs/typedoc/client/index/type-aliases/TRPCClient.md)\<`TRouter`\>

## Example

```ts
const client = createTRPCClient<AppRouter>({
  links: [httpBatchLink({ url: 'http://localhost:3000/trpc' })],
});
const post = await client.post.byId.query({ id: '1' });
```

## See

https://trpc.io/docs/client/vanilla/setup#3-initialize-the-trpc-client
