# Function createClient

- createClient<A extends Registry<any>>(
  endpointOrConfig?:
  | string
  | {
  disableMetadataLookup?: boolean;
  encoding?: "json"
  | "cbor"
  | "bare";
  endpoint?: string;
  getUpgradeWebSocket?: GetUpgradeWebSocket;
  headers?: Record<string, string>;
  namespace?: string;
  runnerName?: string;
  token?: string;
  },
  ): Client<A>

  Creates a client with the actor accessor proxy.

  #### Type Parameters

  - A extends Registry<any>

  #### Parameters

  - `Optional` endpointOrConfig:
    | string
    | {
    disableMetadataLookup?: boolean;
    encoding?: "json"
    | "cbor"
    | "bare";
    endpoint?: string;
    getUpgradeWebSocket?: GetUpgradeWebSocket;
    headers?: Record<string, string>;
    namespace?: string;
    runnerName?: string;
    token?: string;
    }
    - string
    - {
      disableMetadataLookup?: boolean;
      encoding?: "json" | "cbor" | "bare";
      endpoint?: string;
      getUpgradeWebSocket?: GetUpgradeWebSocket;
      headers?: Record<string, string>;
      namespace?: string;
      runnerName?: string;
      token?: string;
      }

      - ##### `Optional` disableMetadataLookup?: boolean

        Whether to automatically perform health checks when the client is created.

      - ##### `Optional` encoding?: "json" | "cbor" | "bare"

      - ##### `Optional` endpoint?: string

        Endpoint to connect to for Rivet Engine or RivetKit manager API.

      - ##### `Optional` getUpgradeWebSocket?: GetUpgradeWebSocket

      - ##### `Optional` headers?: Record<string, string>

      - ##### `Optional` namespace?: string

        Namespace to connect to.

      - ##### `Optional` runnerName?: string

        Name of the runner. This is used to group together runners in to different pools.

      - ##### `Optional` token?: string

        Token to use to authenticate with the API.

  #### Returns Client<A>

  - Defined in rivetkit-typescript/packages/rivetkit/src/client/mod.ts:44