> ## Documentation Index
> Fetch the complete documentation index at: https://yieldxyz.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> The @yieldxyz/sdk TypeScript client, generated from the Yield API OpenAPI spec for the Earn endpoints.

[`@yieldxyz/sdk`](https://www.npmjs.com/package/@yieldxyz/sdk) is a TypeScript client generated from the Yield API OpenAPI spec. It covers the Earn API (`https://api.yield.xyz`) only. It does not call the Trade or Borrow hosts, and it has no functions for tokens, campaigns, KYC status or simulation: call those over HTTP.

```bash theme={null}
npm install @yieldxyz/sdk
```

Configure it once with your project key, then call the generated functions. They mirror the Earn operations, such as `getYields`, `getYield`, `getYieldBalances`, `enterYield` and `submitTransactionHash`.

```typescript theme={null}
import { sdk } from "@yieldxyz/sdk";

sdk.configure({ apiKey: process.env.YIELD_API_KEY! });

const yields = await sdk.api.getYields({ limit: 5 });
```

The client is generated, so it can trail the live spec. If a function you need is missing, call the endpoint over HTTP using the [Earn reference](/api-reference/YieldsController_getYields).

The SDK returns unsigned transactions like the raw API. Signing stays with you; see [Authentication](/api-reference/authentication) for keys and the [quickstart](/documentation/get-started/quickstart) for the flow.


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