# Create A Fund Client

The `CityFundClient` is your primary interface for all deposit and funding operations. Unlike `CityClient`, it does not require a wallet connection — it authenticates via an API key issued for your integration.

```
import { CityFundClient } from "@cityprotocol/core";

const fundClient = new CityFundClient({
  apiKey: process.env.FUN_API_KEY!,
});
```

> **Note:** Your `FUN_API_KEY` is a server-side secret tied to your fun.xyz integration. Never expose it in client-side bundles. See the **Backend Integration** section below for the recommended pattern.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://city-protocol.gitbook.io/docs/software-development-kit/deposit-add-fund/create-a-fund-client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
