--- title: Client description: tRPC-Nuxt provides first class integration with tRPC. --- # Nuxt client The magic of tRPC is making strongly typed API calls without relying on code generation. With full-stack TypeScript projects, you can directly import types from the server into the client! This is a vital part of how tRPC works. ## Initialize a tRPC client Create a typesafe client via a Nuxt [plugin](https://nuxt.com/docs/guide/directory-structure/plugins) with the `createTRPCNuxtClient` method from `trpc-nuxt/client`, and add a `links` array with a [terminating link](https://trpc.io/docs/links#the-terminating-link). If you want to learn more about tRPC links, check out the docs [here](https://trpc.io/docs/links): ::alert{type="info"} `createTRPCNuxtClient` extends [createTRPCProxyClient](https://trpc.io/docs/vanilla#initialize-a-trpc-client) and adds a `useQuery` method built on top of [useAsyncData](https://nuxt.com/docs/api/composables/use-async-data). :: ```ts [plugins/client.ts] import { createTRPCNuxtClient, httpBatchLink } from 'trpc-nuxt/client' import type { AppRouter } from '~/server/trpc/routers' export default defineNuxtPlugin(() => { const client = createTRPCNuxtClient({ links: [ httpBatchLink({ url: '/api/trpc', }), ], }) return { provide: { client, }, } }) ``` As you can see, we passed `AppRouter` as a type argument of `createTRPCNuxtClient`. This returns a strongly typed `client` instance, a proxy that mirrors the structure of your `AppRouter` on the client: ```vue [pages/index.vue] ```